Icestorm Tools Roundup: Open Source FPGA Dev Guide

We like the ICE40 FPGA from Lattice for two reasons: there are cheap development boards like the Icestick available for it and there are open source tools. We’ve based several tutorials on the Icestorm toolchain and it works quite well. However, the open source tools don’t always expose everything that you see from commercial tools. You sometimes have to dig a little to find the right tool or option.

Sometimes that’s a good thing. I don’t need to learn yet another fancy IDE and we have plenty of good simulation tools, so why reinvent the wheel? However, if you are only using the basic workflow of Yosys, Arachne-pnr, icepack, and iceprog, you could be missing out on some of the most interesting features. Let’s take a deeper look.

Continue reading “Icestorm Tools Roundup: Open Source FPGA Dev Guide”

Three Part Deep Dive Explains Lattice ICE40 FPGA Details

It is no secret that we like the Lattice iCE40 FPGA. It has a cheap development board and an open source toolchain, so it is an easy way to get started developing low-cost, low-power FPGA designs. There are a few members of the family that have similar characteristics including the top-of-the-line UltraPlus. [Steve] from Lattice and [Michael Klopfer] from the University of California Irvine have a three-part video series that explain the architecture of the devices. Altogether, the videos are about an hour long and — of course — they use the official tools, not IceStorm. But it is still a great time investment if you have an iCE40 board and you want to understand what the chip has under the hood.

The first part is fairly short and talks a lot about applications. There’s also a nod to the hobbyist use of FPGAs. Keep in mind that the iCE40 FPGAs come in different sizes and variants, so don’t get excited when you see them mention a RISC-V — that isn’t going to fit in your iCEStick, that we know of. The iCEstick has a HX-1K onboard, which is the high-performance variant with 1,280 logic elements, as opposed to the low-power (LP) version.

Continue reading “Three Part Deep Dive Explains Lattice ICE40 FPGA Details”

An Ultrasound Driver With Open Source FPGAs

Ultrasound imaging has been around for decades, but Open Source ultrasound has not. While there are a ton of projects out there attempting to create open ultrasound devices, most of this is concentrated on the image-processing side of things, and not the exceptionally difficult problem of pinging a sensor at millions of times a second, listening for the echo, and running that through a very high speed ADC.

For his entry into the Hackaday Prize, [kelu124] is doing just that. He’s building an ultrasound board that’s built around Open Hardware, a fancy Open Source FPGA, and a lot of very difficult signal processing. It also uses some Rick and Morty references, so you know this is going to be popular with the Internet peanut gallery.

The design of the ultrasound system is based around an iCE40 FPGA, the only FPGA with an Open Source toolchain. Along with this, there are a ton of ADCs, a DAC, pulsers, and a high voltage section to drive the off-the-shelf ultrasound head. If you’re wondering how this ultrasound board interfaces with the outside world, there’s a header for a Raspberry Pi on there, too, so this project has the requisite amount of blog cred.

Already, [kelu] has a working ultrasound device capable of sending pulses out of its head and receiving the echo. Right now it’s just a few pulses, but this is a significant step towards a real, working ultrasound machine built around a reasonably Open Source toolchain that doesn’t cost several arms and legs.

FPGA Design From Top To Bottom

[Roland Lutz] gave a talk about FPGA design using the free tools for Lattice devices at the MetaRheinMainChaosDays conference this year. You can see the video below. It’s a great introduction to FPGAs that covers both the lowest-level detail and some higher level insight. If you’re getting started with these FPGAs, this video is a must-see.

[Roland] starts with the obligatory introductory material. He then jumps into an actual example before zooming back out to look at the internal details of the Lattice FPGA. For instance, this FPGA supports multiple bitstreams, so you can switch between different “programs” on the fly.

Continue reading “FPGA Design From Top To Bottom”

Learn FPGA Programming From The 1940s

We often think that not enough people are building things with FPGAs. We also love the retrotechtacular posts on old computer hardware. So it was hard to pass up [karlwoodward’s] post about the Chip Hack EDSAC Challenge — part of the 2017 Wuthering Bytes festival.

You might recognize EDSAC as what was arguably the first operational computer if you define a computer as what we think of today as a computer. [Maurice Wilkes] and his team invented a lot of things we take for granted today including subroutines (Wheeler jumps named after a graduate student).

The point to the EDSAC challenge was to expose people to creating designs with FPGAs, particularly using the Verilog hardware description language (HDL). If you want to follow along or run your own Chip Hack, the materials are available on the Web. You can see an FPGA driving a tape punch to create souvenir tapes in the video, below.

Some of the exercises are pretty simple and that’s perfect if you are starting out. The challenge uses a board with a Lattice ice40 FPGA and the open source toolchain for Lattice we’ve covered before. In fact, we’ve even done our own tutorials on the same basic device (but not the same board). Our final project generated PWM, not paper tape.

For the record, EDSAC was awesome. The execution unit was serial and processed bits that marched in one at a time over a mercury delay line. There is quite a bit of documentation and even some simulators, so if you ever wanted to get your hands into an old computer, this one isn’t a bad one to try.

Continue reading “Learn FPGA Programming From The 1940s”

Lattice ICE40 FPGA Configured By Linux Kernel

The Linux kernel recently added support for loading firmware into an FPGA via the FPGA Manager Framework. [OpenTechLab] has built a driver for the Lattice iCE40 FPGA (same chip used on the iCEStick and other development boards). One attraction to the iCE40 is there is an open source toolchain called iCEStorm.

Even if you aren’t specifically interested in FPGAs, the discussion about Linux device drivers is good background. The principles would apply to other drivers, and would definitely apply if you want to write another FPGA loader.

Continue reading “Lattice ICE40 FPGA Configured By Linux Kernel”

Adding IceZero To The Raspberry Pi

[Kevinhub] noticed there were quite a few FPGA hats for the Raspberry Pi. Instead going out and buying one of these boards like a filthy commoner, he decided to spin up his own FPGA Pi accessory. This IceZero FPGA board combines the best features from other FPiGA boards, and does it in a form factor that fits right on top of the minuscule Pi Zero.

If you think slapping a Lattice FPGA onto a Pi has been done before, you’re right. Here’s a hat for the Pi using an iCE5LP4K-SG48, an FPGA with 3520 LUTs. The CAT Board from Xess has a slightly bigger FPGA with 7680 logic cells, and the FleaOhm has a monster FPGA on board that costs about $70 USD.

[Kevin]’s IceZero is at the lower end of these Raspberry Pi FPGA hats, using a Lattice ICE40HX4K. That’s only 3520 logic cells, but it only costs about $7 USD in quantity one. The board design is a standard two layer board that shouldn’t be too terrible for hand soldering. The boards are shared on OSH Park, should you want to test this little guy out.

This Pi Hat is specifically designed to be used with Project IceStorm, the Open toolchain for Lattice’s iCE40 FPGAs. That means there’s already a few projects out in the wild that can be easily ported to this platform, and already [Kevin] has a logic SUMP example going on his board.