The Xilinx ISE tools take the FPGA bitstream (.bit) and generate a PROM file (.mcs) that is then used to program the SPI flash. PROMGen (the program that performs this task) is located within the iMPACT programming tool under the Create PROM File flow. Selecting this flow walks the user through the options for generating a file. The user can also generate the PROM file by using the command line and the underlying program PROMGen.
Option |
Description |
---|---|
-spi |
Used to maintain the correct bit ordering required to configure the FPGA from a SPI flash device. |
-p mcs|exo |
PROM output file format. Commonly accepted PROM file formats include Intel Hex (.mcs) and Motorola Hex (.exo). Only MCS is supported for Xilinx iMPACT indirect programming flows. |
-s <size> |
Specifies the SPI flash size in kilobytes. The SPI flash size must be a power of two for this option and the default setting is 64 KB. |
-u <address> |
Loads the bitstream starting at the specified address in an upward direction. If not entered, the default setting is at address 0. Most designs use address 0. |
-o <filename> |
Specifies the output file name. |
The following command line example demonstrates how the options are used:
promgen -spi -p mcs -o spi_flash.mcs -s 16384 -u 0 design.bit
The example command line instructs PROMGen to:
•Create a file with the bit ordering for a SPI flash, using the MCS file format, with the output file name spi_flash.mcs
•Select a 128 Mb flash target (16384 x 1024 bytes x 8 bits = 134,217,728, which is the actual size of a 128 Mb SPI flash).
Launch the ISE iMPACT tool by starting the Configure Target Device process. This Figure shows the GUI interface for PROMGen.
The GUI steps to generate the flash file are:
1.Open iMPACT and select Create PROM File (PROM File Formatter) in the upper left box. This Figure shows the GUI interface for PROMGen.
2.Use the wizard that appears to generate the PROM file:
a.Under Step 1 select Storage Target and under SPI Flash select Configure Single FPGA. Then select the green arrow that goes to Step 2.
b.Under Step 2 Add Storage Device, from the Storage Device (bits) pull-down menu, select the proper SPI flash density (128 Mb is the example shown in This Figure), and click Add Storage Device. Then select the green arrow that goes to Step 3.
c.Under Step 3 Enter Data, type the output file name, browse to the location to place the file, ensure the file format is MCS, then click OK.
Next, a dialog appears that provides instructions to begin adding configuration bitstream files.
3.Select OK and add the target BIT file.
4.For a single design image, click No at the next prompt, which is used for multiple designs.
5.Click OK to confirm completion of the design file entry.
6.Double-click Generate File to create the MCS flash programming file. The console log displays the files generated.