EPCS Loader

From Fpga4u

Revision as of 11:01, 24 September 2010 by Xjimenez (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page explain how to modify the default configuration of the FPGA stored in the EPCS.

Using Quartus

This method is very slow but does not require the installation of Nios II EDS. From Quartus, you can program the EPCS with the design of your Quartus project.

  • Open your Quartus project and compile it.
  • Select "File>Convert Programming Files...".
  • Select "JTAG Indirect Configuration File (.jic)" as type of programming file.
  • Select "EPCS16" in the "Configuration Device" list.
  • By default, it will generate a "output_file.jic" in your project folder. You can modify it in the "File name" field.
  • In the bottom list, select "Flash Loader" and press on the "Add Device..." button on the right.
    • Select Cyclone II and EP2C20, and press "OK".
  • Now select "Sof Data" and press on the "Add File..." button on the right.
    • Select the .sof file of your project and press "Open".
  • Press on the "Generate" button.
  • Now, open the Programmer (Tools>Programmer).
  • Select the generated .jic file instead of the .sof file.
  • Tick "Program/Configure" and press "Start".

Using NIOS II EDS 10.0

You need to have installed Quartus and Nios II EDS on your computer and download the file EPCS_Loader.zip. Extract the zip file, and make sure the path is free of space character.

From the GUI

  • Plug your FPGA4U
  • Run Nios II EDS
  • Start the Quartus II Programmer from Nios II IDE (Nios II/Quartus II Programmer...)
    • If no device is listed, try the auto detect button.
  • Select the extracted sof file (EPCS_Loader/EPCS_Loader.sof) and program the FPGA.
  • Go back to Nios II IDE and run the Flash Programmer (Nios II/Flash Programmer...).
  • Create a new flash configuration (File/New...).
  • Select the system details from the SOPC information File provided (EPCS_Loader/sopc_top.sopcinfo).
  • Click on Ok
  • Click on Connections...
  • Check the two ignore checkboxes (systemID and timestamp)
  • Click on Close
  • Click on Add...
  • Select the desired sof file.
    • If you need to set all the FPGA pins to input, you can use the EPCS_Loader.sof file
  • Click on Start

From the command line

  • First load the EPCS_Loader.sof using the Quartus Programmer
  • Then the following command converts your .sof into a .flash file
# Creating .flash file for the FPGA configuration
sof2flash --input="C:\<your_project_path>\<project.sof>" --output="FPGA4U.flash" --epcs --verbose
  • Then copy the .flash into the flash on the board:
# Programming flash with the FPGA configuration
nios2-flash-programmer --epcs --base=0x0 --accept-bad-sysid --device=1 --instance=0 --program --verbose "FPGA4U.flash"

sof2flash and nios2-flash-programmer are included with the NIOS2 tools, and should be in your $PATH (otherwise, have a look at : "$SOPC_KIT_NIOS2/bin/")

Personal tools