An FPGA development environment is the set of tools that synthesize, implement, simulate and upload our designs to a specific board.
There are two very different paths, and your choice depends entirely on the FPGA board you have on your desk.
- The path of the giants (Vendor Tools): Use the manufacturer’s official software (Vivado for Xilinx, Quartus for Intel).
- The path of freedom (Open Source): Use free, lightweight, community-driven tools.
In this course, following the maker philosophy, we strongly favor the Open Source environment whenever the hardware allows it.
The Open Source Ecosystem: IceStorm
A few years ago, a hero named Clifford Wolf succeeded through reverse engineering to decipher how FPGAs of the Lattice iCE40 family were configured. This led to the IceStorm project.
Thanks to this, we now have a free toolchain for the iCE40. Apio also integrates flows for ECP5 and Gowin, among other compatible boards:
- Yosys: For synthesis (the “compiler”).
- Nextpnr: For Place & Route (the “router”).
- IcePack: To generate the bitstream.
Apio as Environment Manager
Installing these tools one by one can be tedious. That’s why we will use Apio.
Apio is an open-source project manager (similar to PlatformIO) that downloads, installs, and manages the entire toolchain for us. Moreover, it integrates perfectly with Visual Studio Code.
Installing Apio
Apio 1.0 and later versions offer installers and self-contained packages for various systems. You can also install it using Python 3 and pip:
Open your terminal (or command console) and run:
pip install apioCurrent versions of Apio manage the necessary tools from their own packages. Check the installation by opening a new terminal and running apio; to see available boards, use apio boards.
Driver Configuration
If you are on Windows, you might need to configure the USB drivers so your computer recognizes your FPGA board. Apio also helps with this. With the board connected, run:
apio drivers install ftdiDepending on the board, you might need the ftdi or serial driver. First check apio devices and your board’s documentation, as many work without installing an additional driver.
The Development Environment
To write our Verilog code, my absolute recommendation is Visual Studio Code. It is lightweight, powerful, and has extensions for everything.
To work comfortably, I recommend installing these extensions from the VS Code Marketplace:
- Verilog-HDL/SystemVerilog: For syntax highlighting (colors) in the code.
- Apio IDE: Adds buttons in the VS Code bottom bar to “Verify”, “Build”, and “Upload” with a single click, without having to remember terminal commands.
If you use the Apio IDE extension, the flow is identical to Arduino’s: you write code, press the “Build” button, and then the “Upload” button.
What if I have an AMD or Intel Board?
If you have a board based on AMD (formerly Xilinx) chips, like the Arty S7 or Basys 3, or from Altera, like the DE10-Nano, the manufacturer’s tools still offer the most complete support. Free flows exist for some families, but their coverage depends on the device.
Xilinx Vivado
It is the standard for modern chips (Series 7 and UltraScale).
- Pros: Extremely powerful, includes integrated simulator and logic analyzer (ILA).
- Cons: The download takes about 50GB. The installation takes forever. It is very heavy to run on modest computers.
Intel Quartus Prime (Lite Edition)
It is the environment for Cyclone and MAX FPGAs.
- Pros: Interface somewhat friendlier than Vivado for some.
- Cons: Similar to Vivado, very heavy download (15-20GB) and requires registration on Intel’s website.
Gowin FPGAs (Sipeed Tang Nano)
These boards have become very popular due to their price. They have their own IDE (Gowin EDA) which is lighter than Vivado, but there is also an open-source project called Apicula that allows using Yosys/Nextpnr with them.
Course Recommendation
- If you can choose hardware, look for a board with a Lattice iCE40 (like the IceZUM Alhambra, iCEBreaker, or TinyFPGA).
- Install Apio and Visual Studio Code.
- Forget about licenses and giant downloads.