How to program your FPGA – There are four ways!

0

If you are beginning to get into the world of FPGAs, one of the first things you need to know is how to program your board. That includes how to get the bit file loaded, to configuring the hardware on the board. When I was first learning, I was only taught how to program the board via JTAG.

The JTAG section of the reference manual.

The JTAG section of the reference manual.

This configures the hardware, but does not load the bit file into memory, meaning that if the board is power-cycled for any reason the program is lost. Now it can be reprogrammed, but that can be time consuming. And if  you need to demonstrate to a class or if you want to send your board with the code loaded to something like a Tradeshow you need the code to stay even when the board is powered off!

Well in case you didn’t know, there are 4 ways to program your FPGA board. They include JTAG, Quad SPI Flash, USB and Micro SD. All four are described in handy programming guides on each FPGA’s respective resource center. Note that not all FPGAs can be programmed by all four methods. This blog post will address how to get started when programming some of Digilents most popular FPGAs!

The resource center for the Basys 3.

The resource center for the Basys 3.

The programming guide is under Tutorials.

The Basys 3 can be programmed via JTAG, Quad SPI Flash and USB. The Arty can be programmed via Quad SPI flash and JTAG, and the Nexys 4 DDR can be programmed all 4 ways!

The Basys 3 and all it's peripherals.

The Basys 3 and all its peripherals.

The first method involves programming the volatile memory on the board via JTAG. To program via JTAG:

  1. Make sure the programming jumper is in the JTAG position.
  2. Click program device, select the device, and select the correct bit file
  3. Click program

The second method is to load the bit file onto the non-volatile quad SPI flash memory on board.

  1. Make sure the programming jumper is in the QSPI position
  2. In the Hardware Manager click on the device, and add configuration memory device
  3. Select the memory device on your board
  4. Select the bit file and click Okay
  5. This file will now load during start up

The third is via USB memory stick or Micro SD Card.

  1. Make sure the programming jumper is in the USB/SD position and the media select jumper position is in either the USB or SD position depending on what you want to use
  2. Plug the USB drive or Micro SD Card into your computer
  3. Copy the bit file into the root of the USB device or Micro SD Card
  4. Plug the USB device or Micro SD Card into your board
  5. Power and turn onto the board

You can find the details of each process in the resource center for the FPGA board you have. The programming guide for the Basys 3 for example, can be found here.

Whats your favorite programming method for FPGA?

Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on RedditShare on TumblrShare on LinkedInShare on StumbleUponEmail this to someone
Share.

About Author

When I started school I wasn’t interested in any of things I’m passionate about now. In fact originally I started out wanting to study art. But then I decided I didn’t want to have people telling me what to create, so I changed to music. Then I decided I didn’t want to ruin a hobby by making it my career. At the same time my Physics class was teaching a unit on the physics of music, and I thought that was way interesting, so I changed to physics. Then by the time physics was over I decided that the coolest part of physics was electricity and magnetism, and I may as well get a degree that transfers directly into a career. So while all this was happening, I was attending Shoreline Community College, and during that time I found my passion, or rather presented itself repeatedly, until I realized, maybe I should take a hint from the universe. While at community college, I was asked to help at the high school by tutoring chemistry students. Then I was asked to help at the elementary school by being a math Olympiad coach. I continued both because I found I really enjoyed it. I also had an opportunity, and was hired to be a tutor in the Math Learning Center at the Community College, a job I really loved. At the same time I was working as a Nanny, which I had been doing for several years, the main reason because I could and would answer the hard questions the kids asked honestly (i.e. why is the sky blue). I then was recommended by the patrons of the MLC to the transfer tutoring center (private tutoring,) and developed a wait list of students. Through all these opportunities at some point I realized that I loved watching people go from totally lost, to masters of a subject. I was also forced to admit that having all these opportunities continually renewed, I must have been somewhat good at it. So I decided I wanted to teach, which fits with my mission oriented personality. I saw a serious lack of passionate ECE professors in the institutions I attended. At WSU I continued this trend by being ask to TA for computer science and electrical engineering, being a TA for a total of 4 semesters. This continued by getting an amazing opportunity in my first semester at Washington State University to work at Digilent, an educational company. So even if I didn’t want to teach, turns out I can’t avoid it. Luckily it is my main passion.

Leave A Reply