Skip to content
0:00 / 0:00

#yosys#icestorm#apio

Introduction to FPGA Part 2 - Getting Started with Yosys, IceStorm, and Apio | Digi-Key Electronics

DigiKey

226K subscribers • 7 videos on Hallway

YouTube

Beginner. No background in the topic needed.

177K views4 years ago1 recommendation

HardwareFPGAs and digital designOpen source

Shawn Hymel demonstrates how to install and use the open-source iCE40 FPGA toolchain including Yosys, nextpnr, and Apio.

In this tutorial, we install the open-source iCE40 FPGA toolchain, which consists of apio, yosys, nextpnr, and Project IceStorm. A field-programmable gate array (FPGA) is an integrated circuit (IC) that lets you implement custom digital circuits. You can use an FPGA to create optimized digital logic for things like digital signal processing (DSP), machine learning, and cryptocurrency mining. Because of the FPGA’s flexibility, you can often implement entire processors using its digital logic. You can find FPGAs in consumer electronics, satellites, and in servers used to perform specialized calculations. In this series, we will see how an FPGA works and demonstrate how to create custom digital logic using the Verilog hardware description language (HDL). In the previous episode (youtu.be/lLg1AgA2Xoo), we examined how an FPGA works and why you might want to use it in your projects or products. In this episode, we demonstrate how to install apio and the various open-source tools required to build and upload designs to a Lattice iCE40 development board. The solution to the challenge at the end of the episode can be found here: digikey.com/en/maker/projects/introduction-to-fpga-part-2-to… All code examples and solutions for this series can be found here: github.com/ShawnHymel/introduction-to-fpga Lattice iCE40 product page (with pinout spreadsheet and datasheet): latticesemi.com/en/Products/FPGAandCPLD/iCE40 We install the apio tool (github.com/FPGAwars/apio), which will help us install and control other lower-level tools required to synthesize, simulate, and upload our FPGA designs: - Synthesis: yosyshq.net/yosys/ - Simulation: gtkwave.sourceforge.net/ - Place and route: github.com/YosysHQ/nextpnr - Package: icepack (as part of Project IceStorm: github.com/YosysHQ/icestorm) - Upload: iceprog (as part of Project IceStorm: github.com/YosysHQ/icestorm) The apio documentation can be found here: apiodoc.readthedocs.io/en/stable/source/installation.html Note that there might be some differences between the various operating systems (e.g. Windows, macOS, Linux) during installation. I demonstrate installation on Windows and try to point out the differences from other operating systems. Important! At this time, the latest version of apio (0.7.6) has several issues. Until those issues are resolved, I recommend sticking to v0.6.7 (as shown in the video). You can read about some of those issues here: github.com/FPGAwars/apio/issues. Apio includes several examples to get you started. We demonstrate one such example that illuminates all of the onboard LEDs. We finish by issuing a challenge to modify the leds.v example to turn off one of the LEDs. Product Links: digikey.com/en/products/detail/lattice-semiconductor-corpora… Related Videos: youtube

Why it's here

1 person recommends this

What people say. Recommended as an excellent beginner tutorial series for programming iCE40 FPGAs using open-source tools.

u/WavySignalsin r/FPGA • Recommends

On “Complete hobbyist beginner: any way to program these FPGA dev boards without downloading 100gb IDEs or purchasing expensive licenses?”

Theoretically you might be able to get the Arty going using nextpnr-xilinx. If you're brave, go for it. I've never tried it myself. Otherwise your best bet is probably to pick up a Nandland Go Board, or an iCEstick board, or some other ICE40 based FPGA (not free, but not too expensive). Then you can dive into yosys/icestorm/apio, which is pretty decent combination. Shawn Hymel has a good series, including this video which walks through getting it all going. I've had great success with this. [video

u/thequirkynerdy1in r/FPGA • Mentions

Beginner unable to upload to board with APIO I'm a complete beginner to FPGAs starting out with Shawn Hymel's tutorial series. I'm using this Ice board which is slightly different than his, but I believe the tutorial should work for any ice board. For his LED example, I can build with `apio build`, but when I try to run `apio upload`, it gives the following error: Using env default (icestick) Setting shell vars. Scanning for a USB device: - FILTER VID=0403, PID=6010, REGEX="^(Dual RS232-HS)|(Lattice FTUSB Interface  Cable)" Error: No matching USB device. Type 'apio devices usb' for available usb devices. So I then try running `apio devices usb` to view devices and see this:…