Programming an FPGA

Any Project in Mind?

Before you learn how to program FPGA, you should know its advantages in general. High throughput and low latency via parallel processing, high memory bandwidth, accuracy in timing, connectivity to various external hardware using digital IOs, and balancing the system’s speed performance and flexibility with hardware-software co-design are the main advantages of using FPGA. All these sound good, but you must spend much more time than programming a CPU or a microprocessor for FPGA design projects. FPGA design codes are usually longer, and debugging these codes is usually much more challenging than the software for CPU. Due to the design challenges, you should consider FPGA programming when you see a clear limitation of a CPU for your application. In theory, you can realize any algorithm that you can implement with CPU also using FPGA. How much you benefit from the advantages of FPGA depends on your system design knowledge and skills, which you can improve gradually. Do you have any project in mind, or do you want to make your knowledge and skills ready for an advanced project? 

Selecting an FPGA

Selecting an FPGA for a project depends on the application. There are various FPGA types and boards in the market. I like using Xilinx FPGAs. A huge community uses Xilinx FPGAs, and finding resources or example projects for them is easy. There are many criteria to select the correct FPGA and board: Do you need an embedded processor, how much on-chip memory would you need, how many IOs do you need, what speed performance do you expect from the IOs, which connectivity type (Ethernet, USB, PCI-Express, …) do you need, do you need an embedded AI core or RF converter, how large is the circuit that you want to implement, what would be the maximum clock speed that you need, how many clock domain would you have, which external memory type (DDR3, DDR4, SRAM) and size you want to use… The criteria may continue. I assume that you are here to learn how to program the FPGA, and you don’t have much idea about these concepts, but budget appears to be a more important criterion than others. My suggestion is to use Zybo or Redpitaya to learn programming a Xilinx FPGA:
https://digilent.com/shop/zybo-z7-zynq-7000-arm-fpga-soc-development-board/ 

https://redpitaya.com/stemlab-125-14/ 

Coding Verilog and Programming FPGA

VHDL, Verilog, and System Verilog are the most utilized hardware description languages for programming FPGA. Recently, it is also common to program FPGA using High-Level Synthesis and C like a language. However, you should learn coding VHDL or Verilog to use the FPGA resources most effectively. I like coding Verilog. If you want to learn the details of Verilog syntax, I would suggest you read the link below:
https://www.chipverify.com/verilog/verilog-syntax

Then, you can search the YouTube videos or tutorials explaining how to blink an LED or use switches with a Zync SoC, Zybo or Redpitaya FPGA. For example, you can look the youtube videos in the links below (from other instructors). You need to install Vivado and Vitis for programming Xilinx FPGAs including embedded processors. 
https://www.youtube.com/watch?v=_odNhKOZjEo
https://www.youtube.com/watch?v=AOy5l36DroY

 

 

Are you searching for a more exciting learning method?

Using FPGA for Quantum

I believe that any of the resources above are useful, but the best way to learn programming FPGA is via an application and real-world challange. You should see a direct connection between the application and FPGA programming to better understand why you need this device or why you need a language specific to circuit design. This would also motivate your learning. If you want to learn programming FPGA via RedPitaya board and meanwhile get experience in designing systems for the control and measurement of quantum experiments, you can follow the lab assignments in my course. Please send an email to me at aakin@phys.ethz.ch to get access to my tutorials. You learn more about the content of the course in this link.