Master Spi Configuration Mode (Mspi) - Lattice Semiconductor MachXO2 Programming And Configuration Usage Manual

Hide thumbs Also See for MachXO2:
Table of Contents

Advertisement

MachXO2 Programming and Configuration Usage Guide
The MachXO2 retrieves the configuration data from the internal Flash memory when it is using Self Download
Mode. SDM is triggered when power is applied, a REFRESH command is received, or by asserting the PRO-
GRAMN pin. As shown in Figure 6, the internal Flash memory has three sectors. The first sector, in most cases, is
large enough to store the MachXO2 device's configuration data. The size of the configuration data changes based
on how well it can be compressed and how many pre-initialized EBR components are in the design. As the size of
the configuration data increases, the Configuration Flash sector can overflow. The overflow can be handled by
allowing the configuration data to overflow into the User Flash Memory sector. It is, in rare cases, possible for the
configuration data to overflow the Configuration Flash (CFM), and the User Flash Memory (UFM). Self Download
Mode cannot be used when the Configuration Flash and User Flash Memory overflow occurs. Master SPI Configu-
ration Mode must be used in the event of the CF/UFM overflow.
The normal situation for the configuration data is to fit completely within the Configuration Flash sector. Designs
that do not use very much pre-initialized EBR will almost always meet this condition. The UFM is available for use
as an internal Flash memory array. It is recommended that the CONFIGURATION option be set to CFG. This set-
ting prevents the configuration data from overflowing into the UFM, assuring that data provisioned for the UFM is
not overwritten during a device update.
The User Flash Memory, which is the second Flash sector, provides three different use models:
• Configuration data overflow from Configuration Memory
• Initialization of EBR and user-defined storage
• User-defined storage
Diamond, by default, builds the pre-initialized EBR data into the configuration data image. This may cause the con-
figuration data to overflow into the UFM sector. In order to change the default state you need to use the Diamond
Spreadsheet tool to modify the sysCONFIG's CONFIGURATION entry. The default state for the CONFIGURATION
entry is to be set to CFG.
The configuration data can be logically split to place the pre-initialization data for the EBR into the UFM. Setting the
CONFIGURATION option to CFG_EBRUFM causes the Diamond software to place the configuration data into the
Configuration Flash, and the EBR initialization data into the UFM. This locates the EBR initialization data into the
first pages of the UFM. The current Diamond development tools do not provide a way to map the EBR initialization
data stored in the UFM to the associated EBR in the FPGA fabric.
In addition to the automatic assignment of the initialized EBR data, you have the ability to add a data block for your
own purposes. Using IPexpress, you can associate a memory initialization file to the UFM. This data is stored in the
last memory locations of the UFM in order to prevent collisions with the EBR initialization data.
The user-defined storage mode of operation permits the sector to behave like a general purpose Flash memory.
You can choose to use IPexpress to pre-initialize data, or you can use it as if it were a discrete Flash memory
device with a single erasable sector.
In all three cases, the UFM can only be erased by erasing the whole sector. It is your responsibility to restore con-
figuration data, EBR initialization data, and your implementation specific data. In other words, you need to read all
data in the UFM, merge your changes, erase the UFM, and write the new data back into the UFM.

Master SPI Configuration Mode (MSPI)

Master SPI Configuration Mode is the only other self-controlled configuration mode available to the MachXO2.
When the MachXO2 has the Master SPI Configuration mode (MSPI) enabled it is able to automatically retrieve the
configuration data from an externally attached SPI Flash. The MSPI configuration port is not available when the
MachXO2 is in the Feature Row HW Default Mode state. When configuring using the MSPI mode be sure to enable
the MSPI port in the Feature Row. Lattice recommends having a secondary configuration port available, one that is
active when the MachXO2 is in Feature Row HW Default Mode state (that is, blank/erased), that allows you to
recover the MachXO2 in the event of a programming error.
20

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents