Getting Started with FPGA Programming for Free

Getting started in FPGA programming can be an intimidating endeavor. There are quite a few decisions to be made when starting out. These decisions may be difficult to answer for example which FPGA to buy. This guide will walk though all the initial questions one would encounter when starting FPGA development.

When getting started you may not know where to actually start. Which FPGA should you buy? If you buy one will it have all the resources and features you need to do the project you have in mind? Or maybe you don’t have a first project in mind. If you make the wrong decision then maybe you’ll need to buy another FPGA. What project should you start off with that isn’t too difficult? Which FPGA programming language should you use Verilog or VHDL? All of these questions will be answered below. These common pitfalls can be avoided by following the FPGA design flow outlined below as well.

Which FPGA to Purchase

The reason to start programming an FPGA is to see your project work in real-time. FPGAs are good at handling a lot of data. FPGAs can handle a higher data rate that a processor making an FPGA suitable for image and signal processing (and many more applications). When determining which FPGA to buy there are many features offered by the FPGA vendors that must be considered. Unless you have a lot of experience it is difficult to know what FPGA is suitable for a specific purpose.

So before purchasing an FPGA it is recommended that we determine how many FPGA resources are needed. To determine the amount resources required for a given application we need to write, simulate, and place and route the design. This process can be difficult for someone who wants to see the design work on hardware and are not too excited when it works in simulation, but this step is necessary for complex designs. It is difficult if not impossible to know what FPGA or FPGA evaluation board to choose before fully designing and simulating your project.

Which Software to Use

The software used for FPGA development can be broken down to two categories. First, programming hardware, and second functional simulation. The easiest software decision to make is that if you determine you should buy a Xilinx FPGA you get Vivado with it, if you buy a Microsemi FPGA you get Libero with it, and Altera; Quartus.

The software needed for functional simulation is a little harder to determine. If you want to be a professional FPGA developer then QuestaSim or Rivera Pro are worth learning. In short there is a reason why QuestaSim and Rivera Pro are industry standards for functional simulation.

However, if you are a hobbyist getting started in FPGA design then there are other tools out there that are free and offer enough features to keep you developing for a while. Here we recommend GHDL with Gtkwave for waveform viewing. If you are interested in Verilog there is a tool called Icarus that is equivalent to GHDL.

VHDL or Verilog

If you develop FPGA designs for a living you probably know VHDL if you work in a defense related field or Verilog is you work at a private firm. If you don’t have that paradigm to fit into which language should you learn? As a hobbyist you probably want to learn the language that gives you the ability to be the most productive with the limited amount of time you have.

Verilog is popular with people who have programmed before. It has similar syntax to C which isn’t verbose, like VHDL is. However, Verilog isn’t strongly typed. A language that isn’t strongly typed can get you into trouble for example in Verilog you can assign a bus to a wire. The Verilog synthesizer will make an interpretation of what is meant by this odd assignment, and it may or may not be what you intend.

VHDL on the other hand is strongly typed. In the above example the VHDL synthesizer would have provided an error. Some people find that the VHDL synthesizer provides error messages that can be difficult to decipher. However, it can be more frustrating if the Verilog synthesizer generates unexpected behavior without a warning or error.

VHDL is a verbose language some people find this to be distracting from writing productive code. However, especially for people that are transitioning from C/C++, Java, or Python, the added characters typed are a constant reminder that VHDL fundamentally is different than executing operation codes on an ALU.

So, as a beginner coming from a software background I recommend learning VHDL and starting here.

Leave a Reply