Loading Designs from Compact Flash

On October 12, 2009, in General FPGA, by Jeff

Overview

Your FPGA designs can be copied onto a compact flash card and loaded automatically when your ML50x/XUPV5 board is turned ON. The configuration DIP switch (SW3), located in the top left hand corner of the board, determines which design the FPGA is loaded with when the board is turned ON.

Before understanding how to use these switches, we must first take a look at how the flash disk contents are structured.

Flash Disk Contents

The folder structure of the flash disk contents is shown in the screenshots below. The root folder can contain different files that are not necessarily used for configuration. We are interested in the folder for placing our FPGA designs which is called “ML50x”.

 

 

   

 

 

As can be seen in the screenshots, the “ML50x” folder contains eight configuration folders (cfg0 to cfg7). These configuration folders are used to store eight separate FPGA designs. There must only be ONE design per folder, and it must be in SystemACE (.ACE) format. To learn how to convert your bit files into SystemACE files, refer to this tutorial: Convert Bit Files to System ACE Files.

How to load a design from Compact Flash

To load a design from compact flash, follow these instructions:

  1. Copy a design in SystemACE format (.ace) into one of the “cfg0-7″ folders on the flash disk. Ensure that the .ace file that was previously in that folder has been either deleted or renamed to another extension (ie. “previous.bak”).
  2. Set the configuration DIP (SW3) switches 4 to 8 to “10101″. This sets the hardware to load the FPGA using the compact flash.
  3. Set the configuration DIP (SW3) switches 1 to 3 to the design you want to use. For example, if you want to load the design in folder “cfg0″, you would set “000″, alternatively if you want to load “cfg4″ you would set “100″.
  4. Ensure that the flash disk is properly inserted into your board and then turn the board ON.

 

As a final example, if I had copied my “project.ace” file into the “cfg3″ folder, I would have set my SW3 settings to “01110101″ (from 1 to 8).

Tagged with:  

Convert Bit Files to System ACE Files

On October 10, 2009, in General FPGA, by Jeff

Instructions
To run your designs from the flash disk, you need to first convert your bit files to System ACE files (.ace). One simple system for doing this is to copy all your bit files to one folder and use a batch file in that folder to perform the conversions from the command line.

  1. To start, you should create a folder and copy your bit file(s) there (eg. “C:SysACE”).
  2. If you are copying your bit files from the “implementation” folder of the EDK project, they will be named “download.bit”. You should rename them to something that is appropriate for the designs. For example, if my design is an Ethernet design, I might call it “ethernet.bit”.
  3. You should create a batch file in this folder called “makeace.bat”. The batch file is just a text file that you can create with Wordpad and it must contain the following text:
    @echo off
    if "%1" == "" goto error
    xmd -tcl ./genace.tcl -jprog -hw %1.bit -board ml505 -ace my_%1.ace
    goto end
    :error
    echo Makeace - by FPGA Developer http://www.fpgadeveloper.com
    echo.
    echo Usage:   makeace bitfile (without .bit extension)
    echo Example: makeace project
    :end
    echo.

     

  4. To use the batch file, you must open up a command prompt. From Windows, select “Start->Run” and type “cmd”. Press “Enter” and you should have a command prompt.
  5. Use the “cd” command to reach the folder where you have the bit files and makeace batch file (eg. “cd SysACE”). In this example, you should now have the prompt: “C:SysACE>”.
  6. From the command line, type “makeace” followed by the name of the bit file you wish to convert (without the .bit extension). For example, to convert the “ethernet.bit” file, we type “makeace ethernet”. This will produce a few files, but the important one is the System ACE file that will be called “my_ethernet.ace”.

You can now copy the System ACE file into your Flash disk and run the design from there. To convert other designs, you need only copy the bit file into the “SysACE” folder, rename it appropriately and run the “makeace” batch file as shown.

Tagged with:  

Use iMPACT to Download a Bit File

On October 10, 2009, in Impact, by Jeff

Instructions
If you want to download a bit file (.bit) to your FPGA without using ISE or EDK, you can use iMPACT directly from the command line.

  1. To start, you should copy your bit file to a known folder (eg. “C:MyFolder”) and rename it to “download.bit” if it isn’t already called that.
  2. Then you should create an iMPACT script file called “download.cmd”. The script file is just a text file that you can create with Wordpad and it must contain the following text:
    setmode -bscan
    setCable -p auto
    identify
    assignfile -p 5 -file download.bit
    program -p 5
    quit
    

  3. From Windows, select “Start->Run” and type “cmd”. Press “Enter” and you should have a command prompt.
  4. Use the “cd” command to reach the folder where you have the bit file and iMPACT script (eg. “cd MyFolder”). In this example, you should now have the prompt: “C:MyFolder>”.
  5. Turn on your ML505 board and ensure that the JTAG programmer is connected.
  6. From the command line, type “impact -batch download.cmd”.

iMPACT will then program the FPGA with your bit file.

Tagged with: