Random Document
Random Document
Introduction
One of the fundamental benefits of using an FPGA is the ability to reconfigure its functionality without removing the
device from the system. A number of elaborate mechanisms to provide field updates have been implemented.
Accessibility to the system FPGAs can be as simple as a direct cable connection or something as complex as
remote access using wireless links or high-level communication protocols.
Current update methods generally require a significant disruption to the system during the configuration update. It
is desirable to reduce or eliminate the downtime resulting from reconfiguration due to an update, especially for non-
redundant and mission-critical equipment.
Lattice provides TransFR™ (Transparent Field Reconfiguration) Technology to help minimize system interruption.
TransFR Technology support is provided in Lattice Diamond® Programmer software. Devices supporting TransFR
are listed in Table 1.
Background Programming
Lattice non-volatile Flash FPGAs feature two sets of configuration storage. The SRAM contains the working config-
uration, and non-volatile Flash memory or NVCM retains the configuration for use as necessary. The contents of
the Flash memory or NVCM can be loaded into SRAM automatically at power-up or at any desired time, replacing
the need for external boot memory.
Devices without internal non-volatile storage configure their SRAM contents directly from an external device. Such
a device might be an SPI serial Flash, a microprocessor, or an EEPROM.
Whether the non-volatile storage is on-chip or external, it can be programmed independently of the SRAM memory
space and one can be modified while the other remains intact. One powerful use of this arrangement is program-
ming of the non-volatile configuration memory, while the SRAM continues to operate uninterrupted. This is referred
to as background programming.
© 2015 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 1 TN1087_3.7
Minimizing System Interruption During
Configuration Using TransFR Technology
TransFR Technology
Minimizing system interruption using TransFR Technology utilizes a sequence that combines background program-
ming capabilities with TransFR. The result is a process in which systems can be upgraded with very little disruption.
Careful system design allows TransFR to be completely transparent to the application.
Lattice supports JTAG and non-JTAG mode TransFR operation, depending on device family. Refer to appendices at
the end of the document for device specific implementation details. The JTAG port uses BSCAN cells to either cap-
ture the current state on the I/O, or to force the I/O to a known state. JTAG port controlled TransFR operations are
the only TransFR sequences able to control the boundary scan cells. Non-JTAG mode TransFR operations are bit-
stream driven. Here are some advantages and disadvantages for each TransFR operation mode:
• JTAG port on board is required because the operation is JTAG command based
• Operation is relatively complicated because it is command based
The following is a detailed description of JTAG mode TransFR.
Phase 1: Background Programming. The non-volatile memory (internal or external) is reprogrammed while the
SRAM is running undisturbed, allowing the system to continue operating without any disruption.
Phase 2: I/O states are captured and held or driven to a user-defined level using JTAG commands. Outputs will
retain these levels throughout the reconfiguration process. As far as the system is concerned, this effectively
pauses the FPGA, keeping any critical control and status outputs in their desired states during the system update.
Phase 3: While the I/O states remain under the control of boundary scan, JTAG commands are used to initiate the
transfer of the new functionality from non-volatile memory to the SRAM configuration space. For device-specific
implementation details, refer to the appendices at the end of this document.
After the SRAM is configured, the I/O settings will return to those specified by the user. The GSR signal is asserted
internally to place the device into a predictable state.
After reconfiguration is completed and prior to the exit of boundary scan mode in Phase4, the internal device logic
is actively interpreting input signals. This time period can be used for a number of purposes to allow for a custom
reactivation. Common uses include:
Phase 4: I/Os are released from boundary scan control and back to the new desired function. The internal logic
seamlessly reassumes control of the I/Os.
2
Minimizing System Interruption During
Configuration Using TransFR Technology
The clock source controlling the JTAG state machine and boundary scan circuitry is often asynchronous to the sys-
tem clocks. To maintain desired output levels, it is recommended that an “indicator” input be included in the design
to force the internal logic to the desired state. This input can be asserted during the TransFR process to ensure that
sequential design elements are initialized to their desired values.
An example of this, as shown in Figure 1, is a synchronous load function for a counter. Determining the number of
clocks required to reach the target value and the synchronization with the JTAG clock is often not practical. Inclu-
sion of a load function for the counter allows it to be placed in a desired state during the TransFR process for return
to normal post-configuration device operation, as illustrated in Figure 2.
loadn
outputs Set outputs to known states before output values are latched
3
Minimizing System Interruption During
Configuration Using TransFR Technology
Phase 1: Background Programming. The non-volatile memory (internal or external) is reprogrammed while the
SRAM is running undisturbed, allowing the system to continue operating without any disruption.
Phase 2: Device starts to refresh. I/O states are captured into I/O latches and held. Outputs retain these levels
throughout the reconfiguration process. As far as the system is concerned, this effectively pauses the FPGA, keep-
ing any critical control and status outputs in their desired states during the system update.
Phase 3: I/Os remain under the control of I/O latches while the new functionality transfers from non-volatile mem-
ory to SRAM configuration space.
Phase 4: I/Os are released from I/O latch to user function only when GOE is released during wakeup stage.
Design Consideration for Non-JTAG Mode TransFR
In Non-JTAG Mode TransFR, I/Os get released at the same time as Global Output Enable (GOE) signal get
released during device wake up. To maintain all output states after device wake up, resetting on the output registers
needs to be avoided after wake up. In MachXO2 as an example, GOE signal get released before Global Set/Reset
(GSR) signal. If design involves GSR, then asserting GSR could reset all the output registers.
outputs Set outputs to known states before output values are latched
Outputs will be
released at this
time when GOE
is released
during device
wakeup1.
1. For details on device wakeup, please refer to the Wake-up section in TN1104, MachXO2 Programming and Configuration
Usage Guide.
4
Minimizing System Interruption During
Configuration Using TransFR Technology
Note: External configuration memory programming can also be accomplished through other means such as an on-
board microprocessor. Provided that this does not disrupt the operation of the FPGA, the TransFR operation can
be utilized.
For applicable devices, background programming is specified in Programmer from the “Operation” drop-down list in
the Device Properties dialog box. This is shown in Figure 4.
Programmer also provides the capability to transparently program SPI serial Flash devices through the connected
SRAM-based FPGA, as shown in Figure 5.
5
Minimizing System Interruption During
Configuration Using TransFR Technology
6
Minimizing System Interruption During
Configuration Using TransFR Technology
The remaining portion of the TransFR procedure is selected by choosing a dedicated device operation, as shown in
Figure 6. For device-specific details, refer to the appendices near the end of this document.
In addition to embedded routines, support is provided for the creation of standard SVF and ATE file formats for use
outside of the Programmer environment from Deployment Tool.
7
Minimizing System Interruption During
Configuration Using TransFR Technology
Revision History
Date Version Change Summary
October 2015 3.7 Updated Introduction section. Revised Table 1, Device Support for
TransFR. Added ECP5-5G.
Updated Appendix G. ECP5 and ECP5-5G section. Added ECP5-5G.
Updated Technical Support Assistance section.
March 2015 3.6 Product name/trademark adjustment.
Updated Introduction section. Revised Table 1, Device Support for
TransFR. Added MachXO3LF.
Added NVCM information.
March 2014 3.5 Updated Table 1, Device Support for TransFR. Changed
LatticeECP4UM to ECP5.
Updated Appendix G. ECP5, Device Support for TransFR. Changed
LatticeECP4UM to ECP5.
February 2014 3.4 Added support for LatticeECP4UM.
Updated Table 1, Device Support for TransFR
Added Appendix G. LatticeECP4UM.
September 2013 3.3 Introduced the Non-JTAG mode TransFR.
Separated device families based on TransFR mode
Updated example figures using Diamond Programmer and Deployment
Tools screen shots.
Updated Technical Support Assistance information.
June 2013 3.2 Added toggling PROGRAMN pins as an option for initiating the reconfig-
uration process for TransFR.
Updated the Selecting TransFR for LatticeECP3 screen shot.
Deleted the descriptions of I/O State options.
May 2013 3.1 Updated the Enabling TransFR in the Design Planner screen shot for
the LatticeECP2/M.
April 2013 3.0 Updated document with new corporate logo.
Created separate appendices for MachXO and MachXO2 and updated
figures for selecting TransFR for MachXO2.
Updated the Enabling TransFR in the Design Planner screen shot.
August 2011 02.9 Added User SPI during background programming caution.
May 2011 02.8 Documented ispVM “TransFR Options...” for MachXO/XO2, LatticeXP2,
LatticeECP2, and LatticeECP3 devices listed.
November 2010 02.7 Updated for LatticeECP3 and MachXO2 device support.
October 2008 02.6 Updated LatticeXP2 appendix.
May 2008 02.5 Updated screen shots.
Enhanced description of I/O state options.
Corrected MachXO behavior description.
May 2007 02.4 Added LatticeXP2 appendix.
January 2007 02.3 LatticeECP2/M appendix: added note about using dual-purpose pins
and added ispLEVER software setting.
September 2006 02.2 Added LatticeECP2M information.
02.1 Added LatticeECP2 information.
Updated screen shots
Added Table 1 to list device family support.
— — Previous Lattice releases.
8
Minimizing System Interruption During
Configuration Using TransFR Technology
Appendix A. LatticeXP
In the LatticeXP device family, the Flash to SRAM transfer occurs on the low-to-high transition of the PROGRAMN
pin. To allow control of the PROGRAMN pin from the ispJTAG port, an external connection is required to a General
Purpose I/O (GPIO) pin, as shown in Figure 7. The operation is supported by the ispVM System Software and is
not supported by Programmer. LatticeXP devices are featured with JTAG mode TransFR.
Note: This GPIO pin should not be used for any other purpose than updating via TransFR. During operational
mode, a low on this pin will result in undesired reconfiguration cycles.
LatticeXP
10K
PROGRAMN
GPIO*
The location of this GPIO pin is user-selectable using ispVM System. Without specification, this pin is assigned to a
default location, shown in Table 2. Alternatively, ispVM System may also be configured to directly drive the PRO-
GRAMN pin from the ispEN signal of the ispDOWNLOAD® cable. The PROGRAMN pin can also be asserted at the
appropriate time by an external source, such as a microprocessor.
To select the control source of the LatticeXP PROGRAMN pin, the device package must be specified when select-
ing the device. The ‘TransFR Options...’ button in the ‘Device Information’ dialog, then becomes available, as shown
in Figure 8.
9
Minimizing System Interruption During
Configuration Using TransFR Technology
BSDL File Name: A BSDL file must be supplied when specifying the state of I/Os during the TransFR operation.
BSDL files can be downloaded at www.latticesemi.com.
I/O State: Provides control of the I/O behavior during the TransFR operation.
10
Minimizing System Interruption During
Configuration Using TransFR Technology
Dynamic I/O: Specifies outputs are to be sampled and held to their last values (Leave-Alone), unless overrid-
den using the Custom I/O Editor.
Custom I/O: Outputs are tri-stated, unless overridden using the Custom I/O Editor.
Delay Option: Specifies the delay (in milliseconds) from the start of reconfiguration of the SRAM from Flash to the
release of the I/Os.
To enable the ispEN output of the ispDOWNLOAD cable for control of PROGRAMN, choose the ‘Use the ispEN pin
as PROGRAMN’ option. The ‘PROG Pin Connected’ option must also be enabled. This can be found from the
menu as Options->Cable and I/O Port Setup.
The following device limitations apply from the time the boundary scan cells are locked in Phase2 until their release
in Phase4:
• Outputs are single-ended, totem-pole drivers with a maximum VOH of VCCIO and 8mA drive strength.
• Internal weak pullup resistors are enabled.
11
Minimizing System Interruption During
Configuration Using TransFR Technology
Appendix B. MachXO
In the MachXO device family, Flash to SRAM configuration can be initiated by an instruction from the ispJTAG port.
No additional external connections are required to facilitate TransFR capabilities. MachXO devices are featured
with JTAG mode TransFR.
To specify TransFR in Programmer, choose the corresponding operation, as shown in Figure 10.
Edit the I/O state by right-clicking the device and selecting Edit I/O State as shown in Figure 11 and Figure 12.
12
Minimizing System Interruption During
Configuration Using TransFR Technology
I/O State: Provides control of the I/O behavior during the TransFR operation.
• Differential outputs are driven as independent single-ended drivers during boundary scan operations. When a
differential output is captured and held, the positive (true) pin is driven to that logical value using an LVCMOS
output driver. The negative (complement) pin of the differential pair is tri-stated.
13
Minimizing System Interruption During
Configuration Using TransFR Technology
To enable TransFR, set ENABLE_TRANSFR to ENABLE through Global Preference, as shown in Figure 13, in
both patterns (the current one in the flash and the new one to be programmed into the flash).
To specify TransFR in Programmer, choose the corresponding operation in Figure 14. In MachXO3, choose NVCM
background Mode as Access Mode and XNVCM Program and TransFR as Operation.
14
Minimizing System Interruption During
Configuration Using TransFR Technology
To specify TransFR in Deployment Tool, choose the corresponding operation in Figure 15.
15
Minimizing System Interruption During
Configuration Using TransFR Technology
Key Features:
• I/O's are automatically sampled and held at their last state at the falling edge of INITN.
• All I/O's remain at their spec level.
• I/O refresh is automatic.
• If implemented, the hardened user SPI port outputs are disabled (tri-stated). (The configuration SPI port is not
impacted.)
Limitation:
• Whereas the MachXO allows the user to release the TransFR IOs at a specific time via a BSCAN operation, the
MachXO2 and MachXO3 do not support this ability.
• Whereas the MachXO allows the user to preload specific values into I/O through BSCAN operation during
TransFR, the MachXO2 and MachXO3 do not support this ability.
16
Minimizing System Interruption During
Configuration Using TransFR Technology
Appendix D. LatticeECP2/M
The LatticeECP2/M device family of SRAM-only FPGAs relies on non-volatile external memory to store configura-
tion data. TransFR allows configuration via the sysCONFIG port while the I/O pins remain in a locked state for min-
imizing system disruption.
Note: The dual-purpose I/O pins in bank 8 should not be used for signals critical to the system during TransFR.
These pins are not controlled by boundary scan in phases 2 through 4 to allow full operation of the sysCONFIG
port. If background programming of the SPI Flash from the LatticeECP2/M is desired, these pins cannot be used as
I/O pins since the PERSISTENT preference must be set to ON.
The LatticeECP2/M supports a number of configuration sources, such as SPI serial Flash and parallel modes. All
sysCONFIG modes are supported with TransFR. Refer to TN1108, LatticeECP2/M sysCONFIG Usage Guide for
the details and connection requirements for each mode.
To enable TransFR for the LatticeECP2/M, a preference in Diamond must be set. This can be done using the
Global tab in the Spreadsheet View, as shown in Figure 16. To enable TransFR, the ENABLE_NDR option must be
set to ON.
17
Minimizing System Interruption During
Configuration Using TransFR Technology
The reconfiguration process for TransFR is initiated via commands through the ispJTAG port. To specify TransFR in
Programmer, choose the corresponding option, as shown in Figure 17.
Edit the I/O state by right-clicking the device and selecting Edit I/O State as shown in Figure 18 and Figure 19.
18
Minimizing System Interruption During
Configuration Using TransFR Technology
I/O State: Provides control of the I/O behavior during the TransFR operation.
19
Minimizing System Interruption During
Configuration Using TransFR Technology
Appendix E. LatticeXP2
The LatticeXP2 device family supports JTAG mode TransFR from the on-chip Flash memory.
The reconfiguration process for TransFR is initiated via commands through the ispJTAG port. To specify TransFR in
Programmer, choose the corresponding option, as shown in Figure 20.
Edit the I/O state by right-clicking the device and selecting Edit I/O State as shown in Figure 21 and Figure 22.
20
Minimizing System Interruption During
Configuration Using TransFR Technology
I/O State: Provides control of the I/O behavior during the TransFR operation.
21
Minimizing System Interruption During
Configuration Using TransFR Technology
Appendix F. LatticeECP3
The LatticeECP3 device family of SRAM-only FPGAs relies on non-volatile external memory to store configuration
data. TransFR allows configuration via the sysCONFIG port while the I/O pins remain in a locked state for minimiz-
ing system disruption.
Note: The dual-purpose I/O pins in bank 8 should not be used for signals critical to the system during TransFR.
These pins are not controlled by boundary scan in phases 2 through 4 to allow full operation of the sysCONFIG
port. If background programming of the SPI Flash from the LatticeECP3 is desired, these pins cannot be used as
I/O pins since the PERSISTENT preference must be set to ON.
The LatticeECP3 supports a number of configuration sources, such as SPI serial Flash and parallel modes. All sys-
CONFIG modes are supported with TransFR. Refer to TN1169, LatticeECP3 sysCONFIG Usage Guide for the
details and connection requirements for each mode.
To enable TransFR for the LatticeECP3, a preference in Diamond must be set. This can be done using the Global
tab in the Spreadsheet View, as shown in Figure 23. To enable TransFR, the ENABLE_NDR option must be set to
ON.
22
Minimizing System Interruption During
Configuration Using TransFR Technology
The reconfiguration process for TransFR is initiated via refresh command or by toggling PROGRAMN pins. To
specify TransFR in Programmer, choose the corresponding option, as shown in Figure 24.
23
Minimizing System Interruption During
Configuration Using TransFR Technology
Note: The dual-purpose I/O pins in bank 8 should not be used for signals critical to the system during TransFR.
These pins are not controlled by boundary scan in phases 2 through 4 to allow full operation of the sysCONFIG
port. If background programming of the SPI Flash from the ECP5 and ECP5-5G devices is desired, these pins can-
not be used as I/O pins since the PERSISTENT preference must be set to ON.
The ECP5 and ECP5-5G devices support both JTAG mode and non-JTAG TransFR modes.
Below is an example of a non-JTAG mode TransFR procedure. To enable TransFR for the ECP5 and ECP5-5G
devices, a preference in Diamond must be set. This can be done using the Global tab in the Spreadsheet View, as
shown in Figure 25. To enable TransFR, the TRANSFR option must be set to ON.
24
Minimizing System Interruption During
Configuration Using TransFR Technology
The reconfiguration process for TransFR is initiated via refresh command or by toggling PROGRAMN pins. To
specify TransFR in Programmer, choose the corresponding option, as shown in Figure 26.
Figure 26. Selecting TransFR for the ECP5 and ECP5-5G Devices
25
Minimizing System Interruption During
Configuration Using TransFR Technology
Glossary
Configuration: The act of writing to volatile configuration memory (such as SRAM) to set the device behavior.
Configuration can occur from external sources or via internal transfer from non-volatile memory.
JTAG: Joint Test Action Group. IEEE 1149.1 boundary scan access port for board-level continuity and testing. Also
used as an access method to program programmable logic.
FPGA: Field Programmable Gate Array. A high density programmable logic device containing small logic cells
interconnected through a distributed array of programmable switches.
PLL: Phase-Locked Loop. Used in programmable logic for clock management. Common uses include clock multi-
plication/division and time/phase adjustment.
Programming: The act of writing to non-volatile memory, such as Flash. Configuration can occur directly after pro-
gramming, or at a later time.
SRAM: Static Random Access Memory. A volatile storage array, generally used in FPGAs for configuration mem-
ory.
SVF File: Serial Vector Format file. A standard file format to describe IEEE1149.1 operations.
TransFR: Transparent Field Reconfiguration. A configuration method to allow minimization of system downtime.
VME: Diamond Embedded. Also refers to the data file used by the embedded source code.
26