How to program Nexys3 FPGA board on Linux using Digilent Adept software: A guide for beginners

Instead of having to buy expensive JTAG adapters like the Xilinx Platform Cable USB, Digilent FPGA boards like the Nexys3 support programming by using the Adept protocol being translation into JTAG internally. The Adept software is pretty easy to use if you know the basics of how to use the executables.

This is a beginner’s tutorial, so if you already have some experience with FPGAs, you might want to skip some parts. Still you need to have some knowledge about how to use the shell.

Prerequisites:

Installation

The output should look like this:

 Found 1 device(s)

Device: Nexys3
 Product Name: Nexys3
 User Name: Nexys3
 Serial Number: 210182392922

What you need to rembember here is the string after Device: If you use the Nexys3 board and you only got a single one connected to your computer at one time, it should usually just be Nexys3. We call this string the device identifier.

Identifying the correct device:

djtgcfg init -d Nexys3

You should get an output similar to this:

Initializing scan chain...
Found Device ID: 34002093

Found 1 device(s):
   Device 0: XC6SLX16

The djtgcfg tool tells you that it has found only one JTAG device with identifier 0: The XC6CSLX16 FPGA. On the Nexys3 board, there is only one device in the JTAG chain because the other programmable ICs like the PICs need to be programmed in other ways but on other boards you might need to check the names of the individual devices to see which identifier you want to use.

If you know the device identifier (e.g. Nexys3) and the JTAG identifier (e.g. 0) you can easily run the programmer:

djtgcfg prog -d -i -f

Usually this boils down to something like this*:*

djtgcfg prog -d Nexys3 -i 0 -f my_awesom_program.bit

In case of success, you should get an output similar to the following:

Programming device. Do not touch your board. This may take a few minutes...
Programming succeeded.

That means you’ve successfully programmed your FPGA!

Note that the Nexys3 board doesn’t save the program on any nonvolatile memory, so you need to reprogram your FPGA after you turned the power off and back on.

Alternative method of getting the program on the FPGA:

On the Nexys3, there is a USB host interface where you can plugin an any standard FAT-formatted USB drive. The software on the PIC microcontroller will then read the filesystem on the USB drive and if there is a single .bit file in the top level directory of the filesystem, it will program it into the FPGA. If this doesn’t work, try another USB drive or renaming your file.