Introduction to FPGA Part 3 - Getting Started with Verilog | Digi-Key Electronics

Опубликовано: 30 Сентябрь 2024
на канале: DigiKey
67,904
1.2k

In this tutorial, we demonstrate how to use continuous assignment statements in Verilog to construct digital logic circuits on an FPGA.

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).

Previously, we showed how to install apio and the open-source toolchain required to work with Lattice iCE40 FPGAs (   • Introduction to FPGA Part 2 - Getting...  ). In this episode, we demonstrate how to write simple continuous assignment statements in Verilog to create digital logic circuits.

Wikipedia article on adders: https://en.wikipedia.org/wiki/Adder_(...)
The solution to the challenge at the end of the episode can be found here: https://www.digikey.com/en/maker/proj...

All code examples and solutions for this series can be found here: https://github.com/ShawnHymel/introdu...

We start by showing how to define pins using a physical constraints file (.pcf), which maps Verilog I/O signal names to physical pin numbers on the FPGA package. Refer to the following documents to see the pinout on the iCE40HX1K and how it’s connected on the iCEstick:

- iCE40 LP/HX Datasheet
- iCEstick Evaluation Kit User’s Guide

From there, we show how lookup tables are used to construct digital circuits inside the FPGA. We design a very simple digital circuit (a simple AND gate with pushbutton inputs) in Verilog, synthesize it, and upload it to the iCEstick.

Next, we demonstrate how vectors work in Verilog (as a bus of wires) and how to branch wires using the replication operation.

Verilog Quick Reference Card: http://www.ee.ic.ac.uk/pcheung/teachi...

Your challenge is to create a 1-bit full adder as shown in this Wikipedia article.

Product Links:
https://www.digikey.com/en/products/d...
Related Videos:
   • Cyclone® III FPGA  
   • Power Management: Powering FPGAs  
   • FPGA's: Low-Cost, High Performance Sp...  
Related Project Links:
https://www.digikey.com/en/maker/proj...
Related Articles:
https://www.digikey.com/en/pdf/r/rene...
https://www.digikey.com/en/videos/d/d...

Learn more:
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   / digikey.electronics  
And follow us on Twitter   / digikey