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 this first episode, we examine why you might use an FPGA over other solutions, such as a microcontroller. Additionally, we present several example FPGA applications and cover the basic design flow for creating a digital design in an FPGA.
A written version of this video can be found here: https://www.digikey.com/en/maker/projects/introduction-to-fpga-part-1-what-is-an-fpga/3ee5f6c8fa594161a655a9f960060893
All code examples and solutions for this series can be found here: https://github.com/ShawnHymel/introduction-to-fpga
You will need an iCE40 development board for this series. Any of the boards supported by apio (https://github.com/FPGAwars/apio#supported-boards) should work. That being said, I recommend the iCEstick (https://www.digikey.com/en/products/detail/lattice-semiconductor-corporation/ICE40HX1K-STICK-EVN/4289604), which is what I will use in the videos. You will also need a breadboard, jumper wires, and some pushbuttons.
An FPGA is made up of many programmable logic blocks (PLBs) that can be configured and connected together to create a large number of digital circuits. You create your desired digital circuit using an HDL (we will use Verilog). The synthesis tool converts your HDL into a gate-level representation of the circuit. The place-and-route tool converts that representation into actual configuration information for your particular FPGA.
Throughout the series, we will use the apio tool (https://github.com/FPGAwars/apio) to manage the build and upload process. Apio relies on underlying tools to complete these steps:
– Synthesis: http://yosyshq.net/yosys/
– Simulation: http://gtkwave.sourceforge.net/
– Place and route: https://github.com/YosysHQ/nextpnr
– Package: icepack (as part of Project IceStorm: https://github.com/YosysHQ/icestorm)
– Upload: iceprog (as part of Project IceStorm: https://github.com/YosysHQ/icestorm)
Many times, a microcontroller, microprocessor, or graphics processing unit (GPU) is capable of accomplishing the job. However, you sometimes need custom digital logic for your particular application, which is where an FPGA can be helpful. Here are some potential applications:
– Parallel I/O operations
– Data acquisition (DAQ)
– Specialized computations
– Custom processor
Note: while yosys officially supports Verilog-2005, you can find other open source tools capable of synthesizing other HDLs. For example the GHDL project (https://github.com/ghdl/ghdl) supports VHDL.
In the next episode, we will install the apio toolset and upload our first FPGA design.
Related Project Links:
Maker.io – https://www.digikey.com/en/maker
Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog
Connect with Digi-Key on Facebook https://www.facebook.com/digikey.electronics/
And follow us on Twitter https://twitter.com/digikey