Download Print this page

Advertisement

Quick Links

June 2013
Introduction
The configuration memory in the LatticeECP2™ and LatticeECP2M™ FPGAs is built using volatile SRAM; there-
fore, an external non-volatile configuration memory is required to maintain the configuration data when the power is
removed. This non-volatile memory supplies the configuration data to the LatticeECP2/M when it powers-up, or any
other time the device needs to be updated.
To support multiple configuration options the LatticeECP2/M supports the Lattice sysCONFIG™ interface, as well
as the dedicated ispJTAG™ port. The available configuration options, or ports, are listed in Table 15-1.
Table 15-1. Supported Configuration Ports
This technical note covers all of the configuration options available for LatticeECP2/M.
General Configuration Flow
The LatticeECP2/M will enter configuration mode when one of three things happens, power is applied to the chip,
the PROGRAMN pin is driven low, or when a JTAG Refresh instruction is issued. Upon entering configuration mode
the INITN pin and the DONE pin are driven low to indicate that the device is initializing, i.e. getting ready to receive
configuration data.
Once the LatticeECP2/M has finished initializing, the INITN pin will be driven high. The low to high transition of the
INITN pin causes the CFG pins to be sampled, telling the LatticeECP2/M which port it is going to configure from.
The LatticeECP2/M then begins reading data from the selected port and starts looking for the preamble, BDB3
(hex). All data after the preamble is valid configuration data.
When the LatticeECP2/M has finished reading all of the configuration data, assuming there have been no errors,
the DONE pin goes high and the LatticeECP2/M enters user mode, in other words the device begins to function
according to the user's design.
Note that the LatticeECP2/M may also be programmed via JTAG. When programming via JTAG, the INITN and
DONE signals have no meaning, because JTAG, per the IEEE standard, takes complete control of the chip and it's
I/Os.
The Lattice ECP2/M devices are also available in an "S" version which supports the use of an encrypted bitstream
configuration file. These versions have the same configuration options as the standard versions, except where
noted in this document. When using these devices, the user should refer to the
and TN1109,
LatticeECP2/M Configuration Encryption Usage
the configuration requirements.
The following sections define each configuration pin, each configuration mode, and all of the configuration options
for the LatticeECP2/M.
© 2013 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal. All other brand
or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
www.latticesemi.com
Interface
SPI
SPIm
sysCONFIG
Slave Serial
Slave Parallel
ispJTAG
JTAG (IEEE 1149.1 and IEEE 1532 compliant)
LatticeECP2/M sysCONFIG
Port
Guide, in addition to this document, to understand
15-1
Usage Guide
Technical Note TN1108
LatticeECP2/M Family Data Sheet
tn1108_02.5

Advertisement

loading
Need help?

Need help?

Do you have a question about the ECP2 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Lattice ECP2 Series

  • Page 1 LatticeECP2/M. © 2013 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal. All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
  • Page 2: Configuration Pins

    GPIO after configuration. In ispLEVER these preferences can be set in the Design Planner. If you are using Lattice Diamond™ design software, select Tools > Spreadsheet View and then select the Global Preferences tab in the Spreadsheet View.
  • Page 3 LatticeECP2/M sysCONFIG Usage Guide Dedicated Control Pins The following sub-sections describe the LatticeECP2/M dedicated sysCONFIG pins. These pins are powered by CCIO8 While the device is under IEEE 1149.1 or 1532 JTAG control the dedicated programming pins have no meaning. This is because a boundary scan cell will control each pin, per JTAG 1149.1, rather than normal internal logic.
  • Page 4 LatticeECP2/M sysCONFIG Usage Guide DONE The DONE pin is a dedicated bi-directional open drain with a weak pull-up (default), or it is an actively driven pin. DONE goes low when INITN goes low, when INITN and PROGRAMN go high, and the internal Done bit is pro- grammed at the end of configuration, the DONE pin will be released (or driven high, if it is an actively driven pin).
  • Page 5 LatticeECP2/M sysCONFIG Usage Guide For serial and parallel configuration modes, when BYPASS mode is selected, this pin becomes DOUT (see Figure 15-9). When the device is fully configured a Bypass instruction in the bitstream is executed and the data on DI, or D[0:7] in the case of a parallel configuration mode, will then be routed to the DOUT pin.
  • Page 6 LatticeECP2/M sysCONFIG Usage Guide using the SPI port while the part is in user mode (the DONE pin is high) then the PERSISTENT preference must be set to ON to preserve this pin as SISPI. 15-6...
  • Page 7 LatticeECP2/M sysCONFIG Usage Guide D[0]/SPIFASTN The D[0]/SPIFASTN pin has two functions. In parallel mode this pin is D[0] and operates in the same way as D[1:6] below. Taken together D[0:7] form the par- allel data bus, D[0] is the most significant bit in the byte. As with D[1:6], if SRAM (configuration memory) needs to be accessed using the parallel pins while the part is in user mode (the DONE pin is high) then the PERSISTENT preference must be set to ON to preserve this pin as D[0].
  • Page 8: Configuration Modes

    LatticeECP2/M sysCONFIG Usage Guide JTAG control the dedicated programming pins INITN, DONE, and CCLK have no meaning. This is because a boundary scan cell will control each pin, per the IEEE standard, rather than normal internal logic. While the LatticeECP2/M is under JTAG control the PROGRAMN pin will be ignored. These pins are powered by V The Test Data Output pin is used to shift out serial test instructions and data.
  • Page 9 LatticeECP2/M sysCONFIG Usage Guide The following sub-sections break down each configuration mode. For more information on the options for each mode, see the section below entitled Configuration Options. SPI Mode The LatticeECP2/M offers a direct connection to memories that support the SPI Serial Flash standard (see Table 15-6).
  • Page 10 The simplest SPI configuration consists of one SPI Serial Flash connected to one LatticeECP2/M, as shown in Figure 15-1. This is also the recommended method for use when downloading an encrypted bitstream file to the LatticeECP2/M S-Series devices. Figure 15-1. One FPGA, One SPI Serial Flash Lattice FPGA SPI Serial SPI Mode Flash...
  • Page 11 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. 15-11...
  • Page 12 LatticeECP2/M sysCONFIG Usage Guide Figure 15-3. ispVM Main Window First, create the desired files using ispLEVER or Diamond. Depending on the application, these files might be the same design or different designs. There is nothing special about these files, in other words they contain all of the information needed to fully configure the FPGA.
  • Page 13 LatticeECP2/M sysCONFIG Usage Guide Figure 15-5. SPI Serial Flash Device Window Second, click on Browse to select an output file name. Third, select an operation such as SPI Flash Erase, Program, Verify. Fourth, select the golden file and primary file. Note that these may not be encrypted for the LatticeECP2/M “S” ver- sion.
  • Page 14 LatticeECP2/M sysCONFIG Usage Guide Figure 15-6. SPIm, Dual Configuration Images SPI Serial Flash Lattice FPGA SPIm Mode Primary Boot CCLK D7/SPID0 BUSY/SISPI Golden Boot DI/CSSPI0N CFG2 CFG1 SPIFASTN D0/SPIFASTN CFG0 PROGRAMN DONE Note: The CSSPI1N pin should not be connected.
  • Page 15 LatticeECP2/M sysCONFIG Usage Guide Figure 15-7. Serial Mode Daisy Chain Lattice FPGA Lattice FPGA Slave Serial Slave Serial CCLK CCLK DI/CSSPI0N DATA DOUT DI/CSSPI0N DOUT DONE STATUS DONE STATUS INITN INITN CFG2 CFG2 CFG1 CFG1 PROGRAM PROGRAMN PROGRAMN CFG0 CFG0 Note: In the Slave Serial Mode, the Bypass option is not supported when using encrypted bitstream files with the LatticeECP2/M S-Series devices.
  • Page 16 LatticeECP2/M sysCONFIG Usage Guide The host sends the preamble, BDB3 (hex), and then sends the read command. The LatticeECP2/M sends read data on D[0:7], driving BUSY high as needed to pause data flow. For an example bitstream see Table 15-7. Table 15-8 lists the various read commands.
  • Page 17 LatticeECP2/M sysCONFIG Usage Guide Figure 15-9. Slave Parallel with Bypass Option INIT DONE DATA CLOCK Lattice FPGA Lattice FPGA Slave Serial Slave Parallel CCLK CCLK D[0:7] DOUT DI/CSSPI0N DOUT DONE DONE INITN INITN CFG2 CFG2 BUSY CFG1 CFG1 WRITEN PROGRAMN...
  • Page 18 LatticeECP2/M sysCONFIG Usage Guide Figure 15-10. Slave Parallel with Flowthrough INITN DONE D[0:7] CCLK Lattice FPGA Lattice FPGA Slave Parallel Slave Parallel CCLK CCLK D[0:7] D[0:7] DONE DONE INITN INITN BUSY BUSY CSON CSON WRITEN WRITEN CFG2 CFG2 SELECTN CS1N...
  • Page 19: Configuration Options

    Boundary Scan and BSDL Files The LatticeECP2/M BSDL files can be found on the Lattice Semiconductor web site. The boundary scan ring cov- ers all of the I/O pins, as well as the dedicated and dual-purpose sysCONFIG pins. Note that PROGRAMN, CCLK, and the CFG pins are observe only (BC4, JTAG read-only) boundary scan cells.
  • Page 20 • DONE pin options can be selected By setting the proper parameter in the Lattice design software the selected configuration options are set in the gen- erated bitstream. As the bitstream is loaded into the device the selected configuration options take effect. These options are described in the following sections.
  • Page 21 LatticeECP2/M sysCONFIG Usage Guide Configuration time is computed by dividing the maximum number of configuration bits, as given in Table 15-4 above, by the Master Clock frequency. Security Bit Setting the CONFIG_SECURE option to ON prevents readback of the SRAM from JTAG or the sysCONFIG pins. When CONFIG_SECURE is set to ON the only operations available are erase and write.
  • Page 22 LatticeECP2/M sysCONFIG Usage Guide DONE_OD defaults to ON. DONE_OD ON forces the DONE pin type to be open- drain. When connecting multiple DONE pins together all of the pins should be open- drain, however it may be advantageous to have an actively driven DONE pin on the last device.
  • Page 23 LatticeECP2/M sysCONFIG Usage Guide Figure 15-12. Wake-Up Timing Diagram BCLK DONE BIT GLOBAL OUTPUT ENABLE GLOBAL SET/RESET GLOBAL WRITE DISABLE DONE PIN Synchronizing Wake-Up The internal Wake-Up sequence clock source can be chosen as well as how the device wakes up relative to other devices.
  • Page 24 • Q. I have created my bitstream, now how do I load the bitstream into the LatticeECP2/M? ® A. Use the free Lattice ispVM tool (from www.latticesemi.com), and a Lattice ispDOWNLOAD cable. • Q. I can’t read the LatticeECP2/M device ID using JTAG. What could be wrong? A.
  • Page 25: Technical Support Assistance

    • Q. How do I program the SPI Serial Flash once it’s on the board? A. Connect the SPI Serial Flash to the LatticeECP2/M as shown in this document, then use ispVM, and a Lattice ispDOWNLOAD cable connected to the JTAG port, to program the bitstream into the Flash.
  • Page 26: Revision History

    September 2008 02.1 Updated CCLK text section. June 2010 02.2 Updated document for Lattice Diamond design software support. March 2011 02.3 Added information for 100-pin TQFP and 208-pin PQFP device configu- ration limitations. Added notes to the Dual-purpose sysCONFIG pins section for CSN and CS1N, and WRITEN.
  • Page 27: Appendix A. Lattice Diamond Usage Overview

    If you have been using ispLEVER software for your FPGA design projects, Lattice Diamond may look like a big change. But if you look closer, you will find many similarities because Lattice Diamond is based on the same toolset and work flow as ispLEVER. The changes are intended to provide a simpler, more integrated, and more enhanced user interface.
  • Page 28 Using IPexpress with Lattice Diamond Using IPexpress with Lattice Diamond is essentially same as with ispLEVER. The configuration GUI tabs are all the same except for the Generation Options tab. Figure 15-13 shows the Gener- ation Options tab window.
  • Page 29 LatticeECP2/M sysCONFIG Usage Guide Creating a New Simulation Project Using Simulation Wizard This section describes how to use the Simulation Wizard to create a simulation project (.spf) file so you can import it into a standalone simulator. 1. In Project Navigator, click Tools > Simulation Wizard. The Simulation Wizard opens. 2.
  • Page 30 LatticeECP2/M sysCONFIG Usage Guide Table 15-11. Global Preferences Preference Name Values PERSISTENT SLAVE_SERIAL JTAG NONE CONFIG_MODE SLAVE_PARALLEL SPIm DONE_OD DONE_EX MCCLK_FREQ CONFIG_SECURE WAKE_UP An integer between 1 and 25 COMPRESS_CONFIG INBUF ENABLE_NDR 15-30...
  • Page 31 LatticeECP2/M sysCONFIG Usage Guide Figure 15-14. Global Preferences Tab Setting Bitstream Generation Options in Diamond To set any of the Bitstream Generation options listed in Table 15-12, do the following: • In the File List pane, double-click the left mouse button on a Strategy to invoke the Strategy settings window. •...
  • Page 32 LatticeECP2/M sysCONFIG Usage Guide Table 15-12. Bitstream Generation Options Preference Name Values Disable (default) Chain Mode Bypass Flowthrough Create bit file True True No Header False Bit File (Binary) Mask and Readback File (ASCII) Output Format Mask and Radback File (Binary) Raw Bit file (ASCII) Intel Hex 32-bit PROM Data Output Format...
  • Page 33 LatticeECP2/M sysCONFIG Usage Guide Note: An explanation of the option is displayed at the bottom of the window. The Help button also invokes online help for the option • Select OK. You can then run the Bitstream File process. Setting Security Options in Diamond Prior to setting security options in Diamond, you must have installed the Encryption Control Pack.

This manual is also suitable for:

Ecp2m series