TITLE
41156 - Spartan-6 - How to generate SPIx4 mode flash file for MultiBoot Safe update with Fallback enable?
DESCRIPTION
How do I generate SPIx4 mode flash files (MCS) for MultiBoot Safe update with Fallback Enable?
SOLUTION
To generate MultiBoot Spartan-6 FPGA SPI flash in SPI by 4 mode (SPIx4), please use the following steps:
1. Specs for MultiBoot application:
A. Hardware - Spartan-6 FPGA (SP605) with SPI by 4 mode (SPIx4)
B. Golden- 0x000044
C. MultiBoot- 0x0200000
D. SPI by 4 options enabled with Header in Golden.
E. Fallback Enable with other supporting options:
i. Watchdog Enable
ii. CRC error Enable
iii. Fallback enable
2. Generate embedded ICAP in HDL for IPROG generation for Spartan-6 FPGA device with following BitGen options:
A. For Golden Bitstream:
i. In Configuration Option,
a) Select SPI Bus width to 4
b) Set Watch Dog timer to 0x1FFF
c) Set MultiBoot address to 0x0200000
d) Select Next_Config_new_mode
e) Select -g reset_on_err check box
f) For MultiBoot Next configuration mode, set the value to 001 (SPI mode)and the Golden address to 0x000044
ii. All other options are default, especially the Configuration clock source which should be CCLK and not JTAG CCLK with Drive Done as a HIGH
B. For MultiBoot bitstream:
i. Add BitGen option "-g next_config_register_write:Disable" in Other BitGen Command line options in Project navigator BitGen process properties in General options.
ii. For Configuration option:
a) Deselect the option - "place MultiBoot settings into Bitstream"
b) Select SPIO bus width to by 1
c) Also watchdog settings to 0x1FFF
d) Select -g reset_on_err check box
iii. All other options are default, especially Configuration clock source should be CCLK and not JTAG CCLK with Drive Done pin as HIGH
iv. If you desire a header to be generated with the Multiboot image then you can select SPIO bus width to by 4. Typically no Header is desired for the Multiboot bitstream, since all Register values (Mode_Reg, Gen1-5) are defined by the Golden Header file.
C. Generate the SPI flash final file with the following settings:
i. promgen -w -p mcs -c FF -o spix4_MultiBoot -s 8192 -u 0000 Golden.bit -u 200000 MultiBoot.bit -spi
ii. When promgen detects the Bitstream equipped with SPIx4 configuration, it generates following files for programming SPI device:
a) spix4_MultiBoot.cfi- This file is very important for programming SPIx4 SPI PROM in by 4 modes. If this file is not present, then target SPI flash device will be programmed in x1 mode.
b) spix4_MultiBoot.prm- Promgen programming information file
c) spix4_MultiBoot.mcs- Final PROM MCS file.
D. Program the MCS file using the iMPACT GUI or iMPACT batch mode with following command:
i. For example, for the SP605 board:
a) Here is the IMPACT TEXT Batch file (i.e. prog_spix4.cmd):
setMode -bs
setCable -port auto
Identify
identifyMPM
attachflash -position 2 -spi "W25Q64BV"
assignfiletoattachedflash -position 2 -file "spix4_MultiBoot.mcs"
Program -p 2 -dataWidth 4 -spionly -e -v -loadfpga
Quit
b) Run batch command on DOS window as:
Impact -batch prog_spix4.cmd