RISC-V CPU Gets A Peripheral

One of the ways people use FPGAs is to have part of the FPGA fabric hold a CPU. That makes sense because CPUs are good at some jobs that are hard to do with an FPGA, and vice versa. Now that the RISC-V architecture is available it makes sense that it can be used as an FPGA-based CPU. [Clifford Wolf] created PicoSOC — a RISC-V CPU made to work as a SOC or System on Chip with a Lattice 8K evaluation board. [Mattvenn] ported that over to a TinyFPGA board that also contains a Lattice FPGA and shows an example of interfacing it with a WS2812 intelligent LED peripheral. You can see a video about the project, below.

True to the open source nature of the RISC-V, the project uses the open source Icestorm toolchain which we’ve talked about many times before. [Matt] thoughtfully provided the firmware precompiled so you don’t have to install gcc for the RISC-V unless you want to write you own software. Which, of course, you will.

Continue reading “RISC-V CPU Gets A Peripheral”

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”

Learn FPGA Fast with Hackaday’s FPGA Boot Camp

FPGAs have gone from being a niche product for people with big budgets to something that every electronics experimenter ought to have in their toolbox. I am always surprised at how many people I meet who tell me they are interested in using FPGAs but they haven’t started. If you’ve been looking for an easy way to get started with FPGAs, Hackaday’s FPGA boot camp is for you. There’s even a Hackaday.io chat in the group specifically for FPGA talk for questions and general discussion!

While it is true FPGAs aren’t for everything, when you need them you really need them. Using FPGAs you can build logic circuits — not software simulations, but real circuits — and reap major performance benefits compared to a CPU. For digital signal processing, neural networks, or computer vision applications, being able to do everything essentially in parallel is a great benefit. Sometimes you just need the raw speed of a few logic gates compared to a CPU plodding methodically through code. We expect to see a lot more FPGA activity now that Arduino is in the game.

These boot camps gather together some of the material you seen spread over many articles here before, plus new material to flesh it out. It’s designed for you to work through more like a training class than just some text to read. There’s plenty of screenshots and even animations to help you see what you are supposed to be doing. You’ll be able to work with simulations to see how the circuits we talk about work, make changes, and see the results. We’ll focus on Verilog — at least for now — as it is close to C and easier for people who know C to pick up. Still not convinced? Let’s run though the gist of the boot camp series.

Continue reading “Learn FPGA Fast with Hackaday’s FPGA Boot Camp”

Icoboard Software Defined Radio Platform

The Icoboard is a plug-in for the Raspberry Pi with a Lattice iCE FPGA onboard. Combined with a cheap A/D converter, [OpenTechLab] build a software-defined radio using all open source tools. He found some inexpensive converters that cost about $25 and were fast enough (32 MHz) for the purpose at hand. The boards also had a digital to analog converter and he was able to find the data sheets. You can see a video with the whole project covered, below.

The video, by the way, is pretty extensive (about an hour’s worth) and covers the creation of a PC board to connect from the Icoboard to the converters. There’s also a 3D printed frame, and that’s explained in detail as well.

Continue reading “Icoboard Software Defined Radio Platform”

Caped Beagle is FPGA Superhero

We miss the days when everything had daughterboards. Now, Arduinos have shields and Raspberry Pis have hats. The BeagleBone has capes. Whatever. However, regardless of the name, the open source BeagleWire cape/shield/hat/daughterboard connects to a BeagleBone and provides a Lattice iCE40HX FPGA, some support hardware, and common I/O connectors like Pmod and Grove. You can see a video about the board below.

In addition to the FPGA, the board contains a EEPROM, RAM, flash memory, an oscillator, and a few buttons, switches and LEDs. The buttons even feature hardware debouncing. The parts list and design files are all available and — depending on a successful crowdfunding campaign — you might be able to buy one for $75 in the future.

The board is configured to communicate over the 100 MHz 16-bit GPMC port. Linux software and example drivers are available so it should be fairly simple to get the FPGA and CPU talking to each other for your own purposes.

If you decide to build your own, there’s a one-click button that will populate a DigiKey cart for you with most of the components. Although the DigiKey site complained about an error, it did seem to order 24 of the 26 components and the total came to just over $50. Of course, you’d still need to source the missing parts and the board.

We’ve talked about the Lattice iCE FPGAs quite a bit in the past. Not only do you have our tutorial videos, but there are plenty of others, too.

Continue reading “Caped Beagle is FPGA Superhero”

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”