FPGA Starter Videos To Help Soften That Learning Curve

Digi-Key have been producing YouTube videos for a number of years now, and if you weren’t aware, they’re definitely worthy of some viewing time. The playlist we’re highlighting here is a pretty good introduction to FPGAs, specifically those supported by open source tools, with low cost hardware. If you’ve always wanted to get into hacking FPGA platforms, but don’t know where to start, this is going to be a big help. After first covering what an FPGA is and is not, and why you want to use one, [Shawn Hymel] dives in to the toolchain.

We’re really lucky that the bitstream for the Lattice iCE40 was reverse engineered by the super talented Claire (née Clifford) Wolf (AMP hour interview) which enabled the project ICEstorm toolchain to be created. Leveraging Yosys for synthesis and logic mapping, Icarus verilog coupled with GTKwave for simulation, netpnr for place and route and finally the project ICEstorm bitstream tools for packing into iCE40 format and loading onto the hardware. The whole toolchain flow is managed by APIO for simplicity, that is, provided your FPGA board is supported!

Of course, [Shawn] is using the low cost (for an FPGA) ICEStick by Lattice for this tutorial series, and they’re currently hard to get (you know why by now!) but, there are many other boards you could use. If you want to play with applications coupling a ARM micro to an FPGA, then the excellent BlackIce Mx is an option, but there are many other boards now with an decent micro nestled next to an FPGA and a few peripherals for convenience.

We should mention here, that project ICEstorm and the iCE40 is not the only show in town. Project Trellis has had our eye for a while, which targets the more complex Lattice ECP5 device. Yosys and friends do support more architectures, but the available flows usually require at least some vendor tool support at this time (looking straight at you, Xilinx) but as more devices get decoded, the open source tools will grow, and we will bring you that news!

What’s nice about this Digi-Key YT series, is that it doesn’t just cover the basic toolchain flow, then drop you in at the deep end of a big learning curve. There are videos covering subjects such as finite state machines (FSMs), test-benching and simulation, using embedded (block) memories, PLLs, harder subjects like dealing with metastability and clock-domain crossing (OK, he covers one technique – there’s more than one way to skin that particular cat) before finally looking at soft cores like the RISC-V. Lots to learn, and pretty well executed if you ask us! A Github version is available, for those who can’t stand watching the videos!

Continue reading “FPGA Starter Videos To Help Soften That Learning Curve”

Mithro Runs Down Open Source FPGA Toolchains

Tim [Mithro] Ansell has a lot to tell you about the current state of open FPGA tooling: 115 slides in 25 minutes if you’re counting. His SymbiFlow project aims to be the GCC of FPGA toolchains: cross-platform, multi-platform, completely free, and all-encompassing. That means that it’s an umbrella framework for all of the work that everyone else is doing, from work on synthesis and verification tools, to placing and routing, to vendor-specific chip libraries. His talk catches you up with the state of the art at the end of 2019, and it’s embedded below. Spoiler alert: SymbiFlow has the big Xilinx 7-series FPGAs in its crosshairs, and is closing in. SymbiFlow is that close to getting a networked Linux system on the FPGA fabric in a Xilinx 7 today, completely independent of any vendor tools.

But let’s step back a sec for a little background. When you code for an FPGA, words you type get turned into a bitstream of ones and zeroes that flip perhaps a few million switches inside the chip. Going from a higher-level language to a bitstream is a lot like compiling normal programming languages, except with the twist that the resulting computational logic doesn’t map straight into a machine language, but rather into lower-level physical hardware on the FPGA. So “compilation” for FPGAs involves two steps: synthesis and place-and-routing. Synthesis takes the higher-level language that you write and turns it into a set of networks and timing requirements that represent the same logic, and can work across chip families. Yosys is the open-source synthesis tool of choice here.

Continue reading “Mithro Runs Down Open Source FPGA Toolchains”

New Part Day: LED Driver Is FPGA Dev Board In Disguise

Our new part of the day is the ColorLight 5A-75B, a board that’s meant to drive eight of those ubiquitous high-density color LED panels over gigabit Ethernet. If you were building a commercial LED wall, you’d screw a bunch of the LED panels together, daisy-chain a bunch of these boards to drive them, supply power, and you’d be done. Because of that high-volume application, these boards are inexpensive, around $15 each, and available as quickly as you can get stuff shipped from China.

But we’re not here to talk commercial applications. Managing fast Ethernet and pushing so many pixels in real time is a task best handled by an FPGA, and [Tom Verbeure] noticed that these things were essentially amazing FPGA development boards and started hacking on them. [q3k] put it up on GitHub, and you can follow along with the chubby75 reverse engineering project to dig into their secrets.

While the first generations of these boards used the old-standby Spartan 6, things got interesting for fans of open FPGA tools when newer versions were found using the Lattice ECP5-25 chips, the little brother of the stonking big chip [Sprite_TM] used on the 2019 Hackaday Supercon badge. If you want to grab one you’re looking for ColorLight boards marked with revision 6 or 7 as of this writing.

What does this mean? For the price of a gourmet hamburger, you get an FPGA that’s big enough to run a RISC-V softcore, two 166 MHz, 2 MB SDRAMS, flash for the FPGA bitstream, a bazillion digital outputs on 5 V level shifters, and two gigabit Ethernet ports. The JTAG port is broken out in 0.1″ headers, and it works with OpenOCD, which is ridiculously convenient. How’s that for a well-stocked budget FPGA dev board that’s served by a completely open toolchain? Continue reading “New Part Day: LED Driver Is FPGA Dev Board In Disguise”

Bringing FPGA Development To The Masses

The Field Programmable Gate Array (FPGA) is one of the most exciting tools in the modern hacker’s arsenal. If you can master the FPGA, you can create hardware devices that not only morph and change based on your current needs, but can power through repetitive tasks at phenomenal rates. The only problem is, working with FPGAs can be a bit intimidating for newbies. One could argue that the technology is waiting on its “Arduino” moment; the introduction of a cheap development board coupled with easy to use software that brings FPGA hacking into the mainstream.

If everything goes according to plan, the wait might soon be over. [Ryan Jacobs] believes his project WebFPGA is the easiest and fastest way to get your hands dirty with this incredible technology. Outwardly the hardware could pass for an Arduino Nano clone, with a bunch of GPIO pins and a couple of LEDs on a small breadboard-friendly PCB. Certainly a no-frills presentation. It’s the software side is where things get interesting: all you need to develop for this FPGA is a modern web browser.

Currently Chrome, Opera, and Edge are supported, even if they’re running on relatively low-end computers. [Ryan] says this makes it much easier and cheaper to roll out FPGA classes in schools, as students can do everything with their existing Chromebooks. As the video after the break shows, you can even get away with using a sufficiently powerful smartphone to do some FPGA hacking on the go.

So what’s the trick? Essentially the heavy-lifting is done remotely: all of the synthesis is performed in their cloud backend, with the final bitstream delivered to the user for installation through WebUSB. If you’re more comfortable on the command line, [Ryan] says they’re currently working on tools which will allow you to perform all the necessary interactions with their cloud service without the browser.

The more critical Hackaday reader will likely be concerned about lock-in. What happens if you buy one of these development boards without a license for the service, or worse, what happens if WebFPGA goes belly-up down the road? To that end, [Ryan] makes it clear that their hardware is completely compatible with existing offline FPGA development tools such as the open source IceStorm.

We’ve seen considerable interest in low-cost FPGA development platforms, with readers perhaps recalling the excitement surrounding the fire sale of the Pano Logic thin clients. Despite efforts to make developing for these systems even easier, it’s hard to imagine the bar getting much lower than what WebFPGA is shooting for. Their Kickstarter campaign is close to crossing the finish line, and we’re very interested to see where the product goes from here.

Continue reading “Bringing FPGA Development To The Masses”

Hackaday Podcast 002: Curious Gadgets And The FPGA Brain Trust

In this week’s podcast, editors Elliot Williams and Mike Szczys look back on favorite hacks and articles from the week. Highlights include a deep dive in barn-door telescope trackers, listening in on mains power, the backstory of a supercomputer inventor, and crazy test practices with new jet engine designs. We discuss some of our favorite circuit sculptures, and look at a new textile-based computer and an old server-based one.

This week, a round table of who’s-who in the Open Source FPGA movement discusses what’s next in 2019. David Shah, Clifford Wolf, Piotr Esden-Tempski, and Tim Ansell spoke with Elliot at 35C3.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 002: Curious Gadgets And The FPGA Brain Trust”

ULX3S: An Open-Source Lattice ECP5 FPGA PCB

The hackers over at Radiona.org, a Zagreb Makerspace, have been hard at work designing the ULX3S, an open-source development board for LATTICE ECP5 FPGAs. This board might help make 2019 the Year of the Hacker FPGA, whose occurrence has been predicted once again after not quite materializing in 2018. Even a quick look at the board and the open-source development surrounding it hints that this time might be different.

Bottom side of ULX3S PCB

The ULX3S was developed primarily as an educational tool for undergraduate-level digital logic classes. As such, it falls into the “kitchen sink” category of FPGA boards, which include a comprehensive suite of peripherals and devices for development, as opposed to more bare-bones FPGA breakouts. The board includes 32 MB SDRAM, WiFi via an ESP-32 (supporting over-the-air update), a connector for an SPI OLED display, USB, HDMI, a microSD slot, eight channels of 12-bit ADC (1 MS/s), a real-time-clock, 56 GPIO pins, six buttons, 11 LEDs, and an onboard antenna for 433 MHz FM/ASK. This seems like a great set of I/Os for both students and anyone else starting FPGA development.

The ULX3S supports members of the Lattice ECP5 FPGA family, ranging from the 12F (12 k LUTs) to the 85F (84 k LUTs). What can you do with this much FPGA horsepower? Have a look at the long list of examples curated in the ULX3S Links repo. There, you’ll find code from retro-computing to retro-gaming, the usual LED and HDMI demos, and even Linux running on a mor1kx OpenRISC core. Maybe the most interesting links in the repo, however, are those that show how to program the FPGA with a completely open-source toolchain. Proprietary toolchains are the last link keeping some vendor’s FPGAs from wider adoption in the OSHW community, and it’s great to see people chipping away at them.

The board itself is completely open-source. In the GitHub repo, you’ll find the KiCAD 5 design files for the PCB released under an MIT-style license. Even more impressive is the advice in the README, which not only welcomes independent production of the boards, but gives some solid advice on dealing with PCBA vendors during manufacture. Our own advice is to do the right thing and offer the developers a cut if you decide to independently market this board, even though you aren’t required to by the license. If want one, but don’t want to manufacture your own, you can contact the developers using the email or gitter links at the bottom of the ULX3S page: they’re currently doing a small production run.

The Radiona Org folks have created a few videos showcasing example code. Check out how the on-board ESP-32 runs a web server that can load bitstreams into the FPGA (in this case for some retro-gaming), after the break.

Continue reading “ULX3S: An Open-Source Lattice ECP5 FPGA PCB”

Open Source IDE For FPGAs As QtCreator Learns Verilog

Classic battles: PC vs Mac, Emacs vs Vi, Tastes Great vs Less Filling, and certainly one that we debate around the Hackaday watercooler: command line or IDE? There’s something to be said for using good old command line tools, and even if you like to configure your favorite editor to be nearly an IDE, at least it is one you are familiar with and presumably leverage over several different uses.

Most commercial FPGA tools come with a heavy-weight IDE. The open source tools for Lattice (IceStorm) typically is driven by the command line or a makefile. Until now. [Rochus-Keller] released VerilogCreator which is a plugin for QtCreator.

We were impressed because as IDEs go, QtCreator is both useful and lightweight, two things that don’t go together for many similar tools. [FPGAwars] has had an IDE based on Atom (apio-ide) although it hasn’t been updated in nearly a year. IceStudio sees more updates, of course, but it isn’t so much an IDE as a GUI-based code builder.

[Rochus-Keller] says there’s more to come. However, even at this early stage the IDE does syntax coloring, tooltips, inline messages, and can analyze source code allowing you to cross-reference symbols as you’d expect. There are configurations for Icarus to do simulations or you can use Verilator or Yosys — the synthesizer behind IceStorm. It appears it can also interact with Tcl-based workflows like those used by most FPGA vendor IDEs.

There’s quite a bit still on the to-do list, so we are excited to see where this is going. QtCreator isn’t hard to learn and it doesn’t’ feel as bloated as some of the big IDEs like Eclipse. If you want a quick introduction to QtCreator, we did that already. If you want to draw boxes instead of writing Verilog directly, try IceStudio.