Programming the DE2 from Quartus

Please contact me if you find any errors or other problems (e.g., something is unclearly stated) in this web page

Programming and Configuring the FPGA Device

Altera's DE2 board allows the configuration to be done in two different ways, known as JTAG and AS modes. The configuration data is transferred from the host computer (which runs the Quartus II software) to the board by means of a cable that connects a USB port on the host computer to the leftmost USB connector on the board.

In the JTAG mode, the configuration data is loaded directly into the FPGA device. The acronym JTAG stands for Joint Test Action Group. This group defined a simple way for testing digital circuits and loading data into them, which became an IEEE standard. If the FPGA is configured in this manner, it will retain its configuration as long as the power remains turned on. The configuration information is lost when the power is turned off. The second possibility is to use the Active Serial (AS) mode. In this case, a configuration device that includes some flash memory is used to store the configuration data. Quartus II software places the configuration data into the configuration device on the DE2 board. Then, this data is loaded into the FPGA upon power-up or reconfiguration.

JTAG Programming:

  1. Flip the RUN/PROG switch to the left of the LCD to the RUN position.
  2. Select "Tools→Programmer" (or the programmer icon) to reach the window in the Figure bellow.
  3. Specify the programming hardware and the mode that should be used. If not already chosen by default, select JTAG in the Mode box. Also, if the USB-Blaster is not chosen by default, press the "Hardware Setup..." button and select "USBBlaster" in the window that pops up.
  4. Observe that the configuration file "<project name>.sof" is listed in the window. If the file is not already listed then click "Add File..." and select it. This is a binary file produced by the Compiler's Assembler module, which contains the data needed to configure the FPGA device. The extension .sof stands for SRAM Object File. Note also that the device selected is "EP2C35F672," which is the FPGA device used on the DE2 board. Click on the "Program/Configure" check box, as shown in the Figure above.
  5. Press "Start" in the window above. The Progress box will indicate when the configuration and programming process is completed.

Active Serial Mode Programming:

(Useful to keep the program when FPGA is disconnected from the power supply)

  1. In this case, the configuration data has to be loaded into the configuration device on the DE2 board, which is identified by the name EPCS16. To specify the required configuration device select "Assignments→Device," click on the "Device & Pin Options" button, and click on the "Configuration" tab. In the Configuration device box (which may be set to Auto) choose "EPCS16" and click "OK." Click "OK."
  2.  Recompile your design.
  3.  Flip the RUN/PROG switch into the PROG position.
  4. Select "Tools→Programmer." In the Mode box select "Active Serial Programming." If you are changing the mode from the previously used JTAG mode, a pop-up box will appear, asking if you want to clear all devices. Click "Yes". Make sure that the "Hardware Setup" indicates the "USB-Blaster.
     If the configuration file is not already listed in the window, press "Add File." Select the file "<project name>.pof" in your project directory and click "Open." This is a binary file produced by the Compiler's Assembler module, which contains the data to be loaded into the EPCS16 configuration device. The extension .pof stands for Programmer Object File. Upon returning to the Programmer window, click on the "Program/Configure" check box.
  5. Press "Start."  The Progress box will indicate when the configuration and programming process is completed.
  6.  You may now disconnect the board, move it, then reconnect it to the power supply.
  7.  Flip the RUN/PROG switch back into the RUN position and reset the board by pressing the red button.

Please contact me if you find any errors or other problems (e.g., something is unclearly stated) in this web page