15-11
LatticeECP2/M sysCONFIG Usage Guide
Figure 15-2. Multiple FPGAs, One SPI Serial Flash
SPIm Mode
Externally, except for the CFG pins, SPIm mode looks like SPI mode, they use the same SPI Serial Flash devices,
and are wired to the FPGA in the same way (see Figure 15-6). The SPIm mode does not support multiple FPGAs
being configured from one SPI serial Flash as shown in Figure 15-2. Internally the two modes are treated differ-
ently.
SPI mode treats the SPI Serial Flash as a single block of storage starting at address zero. The SPIm mode treats
the SPI flash memory as discrete blocks of memory rather than a single block of memory. This allows the storage
of separate configuration images in separate blocks of memory. SPIm supports dual configuration (or boot) images,
here referred to as a “golden” image and a primary image.
A golden image is used when there is the possibility that corrupt data could be inadvertently loaded into the SPI
Serial Flash, such as during remote updates. For instance, if the Flash erase or program procedure is interrupted,
perhaps due to a power failure, then the Flash will contain corrupt data and the system could be rendered inopera-
ble. Ideally the FPGA should detect that the data is corrupt and boot from a known good, or golden, boot image.
This is exactly what SPIm does.
The golden image is stored at the beginning of the Flash address space; the updatable, or primary, image is above
the golden image. During configuration, if the FPGA detects data corruption in the primary image, it will automati-
cally reboot from the golden image. Each time the FPGA powers up, the PROGRAMN pin is toggled, or a JTAG
Refresh instruction is issued, it will try to configure from the primary image first. Note that if the LatticeECP2/M
detects that the data in the golden image is corrupt as well INITN will be driven low and the part will stop trying to
configure.
Dual Boot Image Setup
In order to use dual configuration files the files must first be properly stored within the SPI Serial Flash. Lattice
ispVM™ System software makes this easy.
Lattice FPGA
SPI Mode
CCLK
DI/CSSPI0N
BUSY/SISPI
D7/SPID0
DOUT
CFG1
CFG0
SPIFASTN
SPI Serial
Flash
Q
C
CFG2
D0/SPIFASTN
PROGRAMN
DONE
D
/CS
Lattice FPGA
Slave Serial
CCLK
DI/CSSPI0N
CFG1
CFG0
CFG2
DOUT
N
ote: This method is not a
v
aila
b
le
w
hen
u
sing encrypted
b
itstream files
w
ith the LatticeECP2/M S-Series de
v
ices.
Please refer to the
LatticeECP2/M S-Series Config
u
ration Encryption Usage G
u
ide
, T
N
1109, for more information
a
b
o
u
t
u
sing encrypted
b
itstream files.