641 - Lattice ispVM: How to create a single bit file to program two FPGA's from one SPI Flash?
As shown in Figure 15-2 of TN1108 (LatticeECP2/M sysCONFIG Usage Guide), users can configure two Lattice FPGA's from one SPI flash. The first device is programmed in SPI mode, whereas the second device is programmed in Slave Serial mode.
To use this configuration though, you'll need to create a single merged bit file that will contain the programming for both devices. Here's how to create that file:
- Start Universal File Writer from the ispVM software GUI interface.
- From the pull down menu that says "Please Select Ouput File Format", choose "Bitstream (*.bit, *.rbt,....)"
- Double click on "Input Data File" on the left and choose the bitstream to go in the device that will be adjacent to the SPI flash. (SPI Mode device in Figure 15-2 of TN1108). Note that "Output Data File" and "Bitstream Settings" appears on the left.
- Under "Bitstream Settings" on the left, select "Output Format". Right click to get the format choices. Choose "Merge Bitstream" and choose one of the hex merge formats (Intel Hex Merge is the most commonly used).
- Now double click on "Input Data File" again and select the second bitstream that will be used to program the slave serial device.
- Now double click on "Output Data File" and name your output file.
- You are now ready to generate your output file. To do this, go to Project -> Generate.
You can now use this combined bit file to program your SPI flash via ispVM's SPI Flash programming option.