Last time I talked about how I took the open source Verifla logic analyzer and modified it to have some extra features. As promised, this time I want to show it in action, so you can incorporate it into your own designs. The original code didn’t actually capture your data. Instead, it created a Verilog simulation that would produce identical outputs to your FPGA. If you were trying to do some black box simulation, that probably makes sense. I just wanted to view data, so I created a simple C program that generates a VCD file you can read with common tools like
gtkwave. It is all on GitHub along with the original files, even though some of those are not updated to match the new code (notably, the PDF document and the examples).
If you have enough pins, of course, you can use an external logic analyzer. If you have enough free space on the FPGA, you could put something like SUMP or SUMP2 in your design which would be very flexible. However, since these analyzers are made to be configurable from the host computer, they probably have a lot of circuitry that will compete with yours for FPGA space. You configure Verifla at compile time which is not as convenient but lets it have a smaller footprint.
Continue reading “X-Ray Vision for FPGAs: Using Verifla”
Sometimes you start something simple and then it just leads to a chain reaction of things. I wanted to write a post about doing state machines in Verilog and target the Lattice iCEstick board that we often use for quick FPGA projects. That led to a small problem: how do you show what’s going on inside? In this series of posts, we’ll look at building a logic analyzer into an FPGA to help debug itself, instantiating memory, and — finally — state machines.
Logic analysis is a common tool in FPGA development. If you use Altera, they have Signal Tap available that lets you build a simple logic analyzer into the FPGA that talks back to your PC. Xilinx has ChipScope which is about the same. Sometimes those tools either cost money or are limited in some way in the free versions. I have my sights set on a tool that can be used with the Lattice architecture.
Sure, you can ship data out on I/O pins and then use a regular logic analyzer to pick up the data. But that isn’t very handy. So I thought about writing a generic logic analyzer component. But before I did I decided to check to see if someone else had already done it.
Spoiler alert: they did, but I wanted something a little different so I wound up extending the program significantly. What I wound up with is a reasonably portable Verilog logic analyzer that can produce traces like this one:
Keep in mind, this isn’t a simulation. This is real data pulled off the actual FPGA. Yes, that is gtkwave producing the plots, but the input data is a VCD file generated from samples taken inside the FPGA.
Continue reading “Logic Analyzers for FPGAs: A Verilog Odyssey”
For those just starting out in the world of RC, a low cost transmitter like the Flysky FS-i6S can be very compelling. But is buying a cheap transmitter setting yourself up for failure down the line? The general feel in the RC community has been that cheaper transmitters have higher latency or “lag” on their inputs, which is precisely the kind of thing you want to avoid when flying along at 40+ MPH. As such, the general wisdom has been that your transmitter is one area where you don’t want to cheap out.
Wanting to put that theory to the test, [Marek Baczynski] set out to compare the response time between the Flysky FS-i6S and the more established Taranis X9D. In the video after the break, he uses his Saleae logic analyzer to time how long it takes movement on the transmitter sticks to get interpreted as servo commands at the receiver.
[Marek] connects the logic analyzer directly to the gimbals of both transmitters, allowing him to see user input before any processing is done by the electronics. It’s particularly interesting to see how the smooth analog curves of the gimbals are converted to a “staircase” digital output.
The final results of the latency test end up being fairly surprising. To put it simply: the cheaper Flysky radio not only more accurately interprets the user’s input, but does it considerably faster than the Taranis. [Marek] says he was so surprised by these results that he re-ran the test three times to verify.
But even taking into account the apparently higher fidelity of the cheap radio, he cautions you shouldn’t swap out your gear just yet. Higher end transmitters have a number of other features which make them worth hanging on to, even if the newer generation of radios is slightly faster. The real takeaway from this video is that if you’re just getting into the RC game, these cheaper transmitters aren’t necessarily the kiss of death the community makes them out to be.
Experiments like this and the recent detailed analysis of common hobby motors show just how seriously people take the world of RC. It’s unlikely this single experiment will quell the debate about “cheap” RC transmitters, but perhaps it’s a start.
Continue reading “Quantifying Latency in Cheap RC Transmitters”
[Larry Wall], the father of Perl, lists the three great virtues of all programmers: Laziness, Impatience, and Hubris. After seeing that Saleae jacked up the prices on their popular logic analyzers to ludicrous levels, [CNLohr] added a fourth virtue: Spite. And since his tests with a Cypress FX3 over the last few days may lead to a dirt-cheap DIY logic analyzer, we may soon be able to add another virtue: Thrift.
The story begins a year or two ago when [CNLohr] got a Cypress FX3 development board for $45. The board sat unused for want of a Windows machine, but after seeing our recent article on a minimalist logic analyzer based on an FX2, he started playing with the board to see if it could fan the flames of his Saleae hatred. The FX3 is a neat little chip that has a 100-MHz General Programmable Interface (GPIF) bus that basically lets it act like an easy to use FPGA.
Prepared to spend months on the project, he was surprised to make significant progress on his mission of spiteful thrift within a few days, reading 16 bits off the GPIF at over 200 megabytes per second and dumping it over the USB 3.0 port. [Charles]’ libraries for the FX3 lay the foundation for a lot of cool stuff, from logic analyzers to SDRs and beyond — now someone just has to build them.
The search for a cheap but capable logic analyzer is nothing new, of course. Last year, both [Jenny List] and [Bil Herd] looked at the $22 iCEstick as a potential Saleae beater.
Continue reading “Spite, Thrift, and the Virtues of an Affordable Logic Analyzer”
There are a lot of cool ways to wrap a case around your custom PC build. But the off-the-shelf stuff doesn’t really set your machine apart from the herd, no matter how many RGB LEDs you put inside. If you really want to stand out, think out of the box, and build your PC into the case of an old logic analyzer.
Looking for a little retro cool factor, [Bob Alexander] turned to the world’s boneyard, eBay, and rounded up a dead H-P 1653 logic analyzer. State of the art in 1989 but not worth repairing by [Bob]’s lights, so he proceeded to remove the original 10″ CRT to make room for an alternate display. After a bit of experimentation, he settled on an LCD panel mounted behind a sheet of acrylic that he thermoformed to the shape of the CRT face. All the original guts were removed to make way for the motherboard and power supply, and a custom PCB to interface the original keypad and rotary encoder into the PC. The old buttons now launch various programs and the encoder acts as the PC volume control. The floppy drive made way for a USB hub, the BNC connectors became power and reset buttons, and a photo taken through the CRT bezel before the electronics were removed provides a window into the soul of the original instrument. It’s a really nice build, and totally unique.
Need some inspiration for your custom case mod? This wall-mounted render farm is pretty snazzy. Or perhaps you’d prefer something more apocalyptic, like this ammo can PC.
Careful not to sneeze while using this diminutive logic analyzer — you could send it flying across the bench.
Undertaken more for the challenge than as a practical bench tool, [Uwe Hermann]’s tiny logic analyzer is an object lesson on getting a usable circuit as small as possible. Sure, some sacrifices had to be made; it’s only an eight-channel instrument without any kind of input protection at all, and lacks niceties like an EEPROM. But that allows it to fit on a mere 11 x 11-mm fleck of PCB. That’s a pretty impressive feat of miniaturization, given that the Cypress microcontroller running the show is in QFN package that takes up 64-mm² all by itself. A micro-USB connector takes up much of the back side of the board and allows the analyzer to talk to sigrok, an open-source signal analysis suite.
Everything about the project is totally open, including the PCB files, so you can build your own if you feel up to the challenge. We’d strongly suggest you check out this primer on logic analyzers first, though, especially since it focuses on the capabilities of the sigrok suite.
The DSLogic open source logic analyzer is on its second release (the plus version) and [OpenTechLab] has a comprehensive review of the new model, which, unlike the original model, includes a different method of connecting probes and provides a separate ground for each input pin.
The device is pretty simple inside with an FPGA, a RAM, and a USB microcontroller. There’s also a configuration EEPROM and a switching power supply. The device stores up to 256 megabits internally and can sample 400 million samples per second on 4 of its 16 channels. [OpenTechLab] even puts the board under a microscope and maps out the input circuit.
Continue reading “DSLogic Plus Teardown and Review”