Lattice Semiconductor MachXO2 Programming And Configuration Usage Manual page 22

Hide thumbs Also See for MachXO2:
Table of Contents

Advertisement

The MCLK frequency always starts downloading the configuration data at the nominal 2.08 MHz frequency. The
MCCLK_FREQ parameter, accessed using Spreadsheet View, can be used to increase the configuration fre-
quency. The configuration data in the PROM has some padding bits, and then the data altering the MCLK base fre-
quency is read. The MachXO2 reads the remaining configuration data bytes using the new MCLK frequency.
After the MachXO2 enters user mode the Master SPI configuration port pins tri-state. This allows data transfers
across the SPI. There are two primary methods available for transferring data across the SPI bus. The first method
available to you is to enable the EFB in the MachXO2. Using IPexpress™ you instantiate the EFB, and you choose
the features you want active. One of the features available in the EFB is a SPI Master Controller. The SPI Master
Controller in the EFB attaches directly Master SPI configuration port pins. The controller provides a set of status,
control, and data registers for initiating SPI bus transactions. The registers are accessed using the internal WISH-
BONE data bus. Logic residing in the programmable section of the MachXO2 can be created to perform transac-
tions across the WISHBONE bridge to the EFB, which in turn generate SPI bus transactions.
The second way to perform Master SPI configuration port transactions is to master them from the JTAG port. The
MachXO2 includes a JTAG to MSPI passthru circuit that allows the slave SPI Flash to be erased, programmed, and
read. The primary method for programming the attached SPI Flash is to use Diamond Programmer to transfer a
configuration data file from your personal computer. This is useful during board development and debug. Note: To
support JTAG to MSPI passthru programming mode a 1Kohm pull-up resister is required on MCLK.
Another way to program a SPI Flash using the JTAG port is to use the Lattice ispVME solution. ispVME is C code
written for an embedded microprocessor. The microprocessor reads a data file crafted by the Diamond Deployment
Tool, and runs the ispVME code. The firmware uses port I/O to drive the JTAG port of the MachXO2, which in turn
passes the data to the Master SPI port. Refer to the ispVME tool suite for information about updating an attached
SPI Flash using a microprocessor.
The advantage of using the JTAG port for programming the SPI Flash attached to the MachXO2 is that the
MachXO2 is permitted to be in the Feature Row HW Default Mode state. JTAG is able to program a device in Flash
Mode Feature Row or User Mode Feature Row state. In order to do so, the Master SPI port pins must be enabled.
The passthru is an integral part of the JTAG TAP system. Obviously, the JTAG port must be available in order for
this method to succeed.
To set the MachXO2 for operation using the MSPI configuration mode you must:
• Store the entire configuration data in an external SPI Flash
• The data must start at offset 0x000000 within the PROM
• Set the preferences as shown in Table 14
• Enable JEDEC and Bitstream File creation in the Diamond Process Pane
• Run the Export Files process to build your design
Table 14. Master SPI Configuration Software Settings
The Export Files process generates both a JEDEC file and BIT file. It is important that both files be used. The
JEDEC file must be programmed into the MachXO2 in order to write the Feature Row. The JEDEC file enables the
MSPI configuration port.
MachXO2 Programming and Configuration Usage Guide
Preference
MASTER_SPI_PORT
CONFIGURATION
Setting
ENABLE
EXTERNAL
22

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents