2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
ISO
9001:2008
Registered
MAX 10 FPGA Configuration Schemes and
CRAM
MAX 10 Device
JTAG In-System Programming
CFM
Configuration Data
Internal
Configuration
JTAG Configuration
.sof
.pof
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Features
2015.05.04
UG-M10CONFIG
Subscribe
Configuration Schemes
Figure 2-1: High-Level Overview of JTAG Configuration and Internal Configuration for MAX 10 Devices
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
In MAX 10 devices, JTAG instructions take precedence over the internal configuration scheme.
Using the JTAG configuration scheme, you can directly configure the device CRAM through the JTAG
interface—TDI, TDO, TMS, and TCK pins. The Quartus® II software automatically generates an SRAM
Object File (.sof). You can program the .sof using a download cable with the Quartus II software
programmer.
Related Information
Configuring MAX 10 Devices using JTAG Configuration on page 3-2
Provides more information about JTAG configuration using download cable with Quartus II software
programmer.
ISO
9001:2008
Registered
2-2
JTAG Pins
JTAG Pins
Table 2-1: JTAG Pin
PinFunctionDescription
UG-M10CONFIG
2015.05.04
TDISerial input pin for:
• instructions
• TDI is sampled on the rising edge of TCK
• TDI pins have internal weak pull-up resistors.
• test data
• programming data
TDOSerial output pin for:
• instructions
• test data
• TDO is sampled on the falling edge of TCK
• The pin is tri-stated if data is not shifted out
of the device.
• programming data
TMSInput pin that provides the control
signal to determine the transitions of
the TAP controller state machine.
TCKClock input to the BST circuitry.—
All the JTAG pins are powered by the V
1B. In JTAG mode, the I/O pins support the LVTTL/
CCIO
• TMS is sampled on the rising edge of TCK
• TMS pins have internal weak pull-up resistors.
LVCMOS 3.3-1.5V standards.
Related Information
• MAX 10 Device Datasheet
Provides more information about supported I/O standard in MAX 10 devices.
• Guidelines: Dual-Purpose Configuration Pin on page 3-1
• Enabling Dual-purpose Pin on page 3-2
Internal Configuration
You need to program the configuration data into the configuration flash memory (CFM) before internal
configuration can take place. The configuration data to be written to CFM will be part of the programmer
object file (.pof). Using JTAG In-System Programming (ISP), you can program the .pof into the internal
flash.
During internal configuration, MAX 10 devices load the CRAM with configuration data from the CFM.
Internal Configuration Modes
The internal configuration scheme for all MAX 10 devices except for 10M02 device consists of the
following modes:
• Dual Compressed Images—configuration image is stored as image 0 and image 1 in the CFM
• Single Compressed Image
• Single Compressed Image with Memory Initialization
• Single Uncompressed Image
• Single Uncompressed Image with Memory Initialization
In dual compressed images mode, you can use the CONFIG_SEL pin to select the configuration image.
Altera Corporation
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
UG-M10CONFIG
2015.05.04
Configuration Flash Memory
The internal configuration scheme for 10M02 device supports the following mode:
• Single Compressed Image
• Single Uncompressed Image
Related Information
• Configuring MAX 10 Devices using Internal Configuration on page 3-4
• Remote System Upgrade in Dual Compressed Images on page 2-8
Configuration Flash Memory
The CFM is a non-volatile internal flash that is used to store configuration images. The CFM may store up
to two compressed configuration images, depending on the compression and the MAX 10 devices. The
compression ratio for the configuration image should be at least 30% for the device to be able store two
configuration images.
Table 2-2: Maximum Number of Compressed Configuration Image for MAX 10 Devices
DeviceMaximum Number of Compressed Configuration Image
10M021
2-3
10M04, 10M08, 10M16, 10M25, 10M40, and 10M502
Related Information
Configuration Flash Memory Permissions on page 2-18
Configuration Flash Memory Sectors
All CFM in MAX 10 devices consist of three sectors, CFM0, CFM1, and CFM2 except for the 10M02. The
sectors are programmed differently depending on the internal configuration mode you select.
The 10M02 device consists of only CFM0. The CFM0 sector in 10M02 devices is programmed similarly
when you select single compressed image or single uncompressed image.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
Altera Corporation
Configuration Flash Memory Sectors
CFM0CFM1CFM2
Dual Compressed Image
Single Uncompressed Image
Single Uncompressed Image
with Memory Initialization
Single Compressed Image
with Memory Initialization
Single Compressed Image
Compressed Image 0
Uncompressed Image 0 with Memory Initialization
Compressed Image 0 with Memory Initialization
Compressed Image 0
Uncompressed Image 0
Compressed Image 1
User Flash Memory
User Flash Memory
Internal Configuration
Mode
2-4
Configuration Flash Memory Total Programming Time
Figure 2-2: Configuration Flash Memory Sectors Utilization for all MAX 10 Devices Except for the
10M02 Device
Unutilized CFM1 and CFM2 sectors can be used for additional user flash memory (UFM).
UG-M10CONFIG
2015.05.04
Configuration Flash Memory Total Programming Time
Table 2-3: Configuration Flash Memory Total Programming Time for Sectors in MAX 10 Devices
10M02——5.4
10M046.54.611.1
10M0812.08.920.8
10M16 and 10M2516.412.629.0
10M40 and 10M5030.222.752.9
In-System Programming
Related Information
CFM and UFM Array Size
Device
CFM2CFM1CFM0
You can program the internal flash including the CFM of MAX 10 devices with ISP through industry
standard JTAG interface. ISP offers the capability to program, erase, and verify the CFM. The JTAG
circuitry and ISP instructions for MAX 10 devices are compliant to the IEEE-1532-2002 programming
specification.
Programming Time (s)
During ISP, the MAX 10 receives the IEEE Std. 1532 instructions, addresses, and data through the TDI
input pin. Data is shifted out through the TDO output pin and compared with the expected data.
Altera Corporation
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
UG-M10CONFIG
2015.05.04
Real-Time ISP
Real-Time ISP
2-5
The following are the generic flow of an ISP operation:
1. Check ID—the JTAG ID is checked before any program or verify process. The time required to read
this JTAG ID is relatively small compared to the overall programming time.
2. Enter ISP—ensures the I/O pins transition smoothly from user mode to the ISP mode.
3. Sector Erase—shifting in the address and instruction to erase the device and applying erase pulses.
4. Program—shifting in the address, data, and program instructions and generating the program pulse to
program the flash cells. This process is repeated for each address in the internal flash sector.
5. Verify—shifting in addresses, applying the verify instruction to generate the read pulse, and shifting
out the data for comparison. This process is repeated for each internal flash address.
6. Exit ISP—ensures that the I/O pins transition smoothly from the ISP mode to the user mode.
You can also use the Quartus II Programmer to program the CFM.
Related Information
Programming .pof into Internal Flash on page 3-7
Provides the steps to program the .pof using Quartus II Programmer.
In a normal ISP operation, to update the internal flash with a new design image, the device exits from user
mode and all I/O pins remain tri-stated. After the device completes programing the new design image, it
resets and enters user mode.
The real-time ISP feature updates the internal flash with a new design image while operating in user
mode. During the internal flash programming, the device continues to operate using the existing design.
After the new design image programming process completes, the device will not reset. The new design
image update only takes effect in the next reconfiguration cycle.
ISP and Real-Time ISP Instructions
Table 2-4: ISP and Real-Time ISP Instructions for MAX 10 Devices
InstructionInstruction CodeDescription
CONFIG_IO00 0000 1101
• Allows I/O reconfiguration through JTAG ports using
the IOCSR for JTAG testing. This is executed after or
during configurations.
• nSTATUS pin must go high before you can issue the
CONFIG_IO instruction.
PULSE_NCONFIG00 0000 0001Emulates pulsing the nCONFIG pin low to trigger reconfi‐
guration even though the physical pin is unaffected.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
Altera Corporation
2-6
ISP and Real-Time ISP Instructions
InstructionInstruction CodeDescription
ISC_ENABLE_HIZ
(1)
10 1100 1100
UG-M10CONFIG
2015.05.04
• Puts the device in ISP mode, tri-states all I/O pins,
and drives all core drivers, logic, and registers.
• Device remains in the ISP mode until the ISC_
DISABLE instruction is loaded and updated.
• The ISC_ENABLE instruction is a mandatory instruc‐
tion. This requirement is met by the ISC_ENABLE_
CLAMP or ISC_ENABLE_HIZ instruction.
ISC_ENABLE_CLAMP
ISC_DISABLE10 0000 0001
ISC_PROGRAM
ISC_NOOP
(2)
(2)
(1)
10 0011 0011
10 1111 0100Sets the device up for in-system programming. Program‐
10 0001 0000
• Puts the device in ISP mode and forces all I/O pins to
follow the contents of the JTAG boundary-scan
register.
• When this instruction is activated, all core drivers,
logics, and registers are frozen. The I/O pins remain
clamped until the device exits ISP mode successfully.
• Brings the device out of ISP mode.
• Successful completion of the ISC_DISABLE instruction
happens immediately after waiting 200 µs in the RunTest/Idle state.
ming occurs in the run-test or idle state.
• Sets the device to a no-operation mode without
leaving the ISP mode and targets the ISC_Default
register.
• Use when:
• two or more ISP-compliant devices are being
accessed in ISP mode and;
• a subset of the devices perform some instructions
while other more complex devices are completing
extra steps in a given process.
ISC_ADDRESS_SHIFT
ISC_ERASE
ISC_READ
(1)
Do not issue the ISC_ENABLE_HIZ and ISC_ENABLE_CLAMP instructions from the core logic.
(2)
All ISP and real-time ISP instructions are disabled when the device is not in the ISP or real-time ISP mode,
except for the enabling and disabling instructions.
Altera Corporation
(2)
(2)
(2)
10 0000 0011Sets the device up to load the flash address. It targets the
ISC_Address register, which is the flash address register.
10 1111 0010
• Sets the device up to erase the internal flash.
• Issue after ISC_ADDRESS_SHIFT instruction.
10 0000 0101
• Sets the device up for verifying the internal flash
under normal user bias conditions.
• The ISC_READ instruction supports explicit
addressing and auto-increment, also known as the
Burst mode.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
UG-M10CONFIG
2015.05.04
Initialization Configuration Bits
InstructionInstruction CodeDescription
2-7
BGP_ENABLE01 1001 1001
• Sets the device to the real-time ISP mode.
• Allows access to the internal flash configuration
sector while the device is still in user mode.
BGP_DISABLE01 0110 0110
• Brings the device out of the real-time ISP mode.
• The device has to exit the real-time ISP mode using
the BGP_DISABLE instruction after it is interrupted by
reconfiguration.
Caution: Do not use unsupported JTAG instructions. It will put the device into an unknown state and
requires a power cycle to recover the operation.
Initialization Configuration Bits
Initialization Configuration Bits (ICB) stores the configuration feature settings of the MAX 10 device. You
can set the ICB settings during Convert Programming File.
Table 2-5: Initialization Configuration Bits for MAX 10 Devices
Auto-reconfigure from
secondary image when initial
image fails.
Use secondary image ISP data
as default setting when
available.
• Enable: I/O will set to week pull-up prior to
usermode.
• Disable: I/O will be input tri-stated.
Enable:
• Device will automatically load secondary image
if initial image fails.
Disable:
• device will automatically load image 0.
• device will not load image 1 if image 0 fails.
• CONFIG_SEL pin setting is ignored.
• Disable: Use ISP data from image 0
• Enable: Use ISP data from image 1
ISP data contains the information about state of
the pin during ISP. This can be either tri-state with
weak pull-up or clamp the I/O state. You can set
the ISP clamp through Device and Pin Option, or
Pin Assignment tool.
Enable
Enable
Disable
Verify ProtectTo disable or enable the Verify Protect feature.Disable
Allow encrypted POF onlyIf enabled, configuration error will occur if
unencrypted .pof is used.
JTAG Secure
(3)
To disable or enable the JTAG Secure feature.Disable
Enable WatchdogTo disable or enable the watchdog timer for
remote system upgrade.
Watchdog valueTo set the watchdog timer value for remote system
upgrade.
Related Information
• .pof and ICB Settings on page 3-5
• .pof Generation through Convert Programming Files on page 3-6
Provides more information about setting the ICB during .pof generation using Convert Programming
File.
• Instant-on on page 2-24
Provides more information about Instant ON and other power on reset scheme.
• Verify Protect on page 2-17
• JTAG Secure Mode on page 2-16
• ISP and Real-Time ISP Instructions on page 2-5
• User Watchdog Timer on page 2-14
Disable
Enable
0x1FFF
(4)
Configuration Features
Remote System Upgrade in Dual Compressed Images
MAX 10 devices support the remote system upgrade feature. By default, the remote system upgrade
feature is enabled in all MAX 10 devices when you select the dual compressed image internal
configuration mode.
The remote system upgrade feature in MAX 10 devices offers the following capabilities:
• Manages remote configuration
• Provides error detection, recovery, and information
• Supports compressed and encrypted .pof
You can use the Altera Dual Configuration IP core or the remote system upgrade circuitry to access the
remote system upgrade block in MAX 10 devices.
(3)
The JTAG Secure feature will be disabled by default in Quartus II. If you are interested in using the JTAG
Secure feature, contact Altera for support.
(4)
The watchdog timer value depends on the MAX 10 you are using. Refer to the Watchdog Timer section for
more information.
Altera Corporation
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
Sample CONFIG_SEL pin
Image 0Image 1
CONFIG_SEL=0
CONFIG_SEL=1
Wait for Reconfiguration
Power-up
Reconfiguration
Reconfiguration
Reconfiguration
First Error Occurs
First Error Occurs
Second Error Occurs
Flow when Auto-reconfigure
from secondary image when
initial image fails is disabled.
Second Error Occurs
Power-up
Error Occurs
Reconfiguration
UG-M10CONFIG
2015.05.04
Remote System Upgrade Flow
Both the application configuration images, image 0 and image 1, are stored in the CFM. The MAX 10
device loads either one of the application configuration image from the CFM.
Figure 2-3: Remote System Upgrade Flow for MAX 10 Devices
Remote System Upgrade Flow
2-9
MAX 10 FPGA Configuration Schemes and Features
The remote system upgrade feature detects errors in the following sequence:
1. After power-up, the device samples the CONFIG_SEL pin to determine which application configuration
image to load. The CONFIG_SEL pin setting can be overwritten by the input register of the remote
system upgrade circuitry for the subsequent reconfiguration.
2. If an error occurs, the remote system upgrade feature reverts by loading the other application configu‐
ration image. These errors cause the remote system upgrade feature to load another application
configuration image:
• Internal CRC error
• User watchdog timer time-out
3. Once the revert configuration completes and the device is in user mode, you can use the remote system
upgrade circuitry to query the cause of error and which application image failed.
4. If a second error occurs, the device waits for a reconfiguration source. If the Auto-restart configura‐
tion after error is enabled, the device will reconfigure without waiting for any reconfiguration source.
5. Reconfiguration is triggered by the following actions:
• Driving the nSTATUS low externally.
• Driving the nCONFIG low externally.
• Driving RU_nCONFIG low.
Altera Corporation
Send Feedback
Status Register (SR)
Previous
State
Register 2
Bit[31..0]
State
Register 1
Bit[31..0]
Current
State
Logic
Bit[33..0]
Internal Oscillator
Control Register
Bit [38..0]
Logic
Input Register
Bit [38..0]
update
Logic
Bit [40..39]
doutdin
Bit [38..0]
dout
din
capture
Shift Register
clkout
capture
update
Logic
clkin
RU_DIN
RU_SHIFTnLD
RU_CAPTnUPDT
RU_CLK
RU_nRSTIMER
Logic Array
RU
Reconfiguration
State
Machine
User
Watchdog
Timer
RU
Master
State
Machine
timeout
RU_nCONFIGRU_DOUT
Previous
2-10
Remote System Upgrade Circuitry
Remote System Upgrade Circuitry
Figure 2-4: Remote System Upgrade Circuitry
UG-M10CONFIG
2015.05.04
Table 2-6: Remote System Upgrade Circuitry Signals for MAX 10 Devices
Altera Corporation
The remote system upgrade circuitry does the following functions:
• Tracks the current state of configuration
• Monitors all reconfiguration sources
• Provides access to set up the application configuration image
• Returns the device to fallback configuration if an error occurs
• Provides access to the information on the failed application configuration image
Remote System Upgrade Circuitry Signals
Core Signal NameLogical
Signal
Name
RU_DINreginInput
Input/
Output
Description
Use this signal to write data to the shift register on the rising
edge of RU_CLK. To load data to the shift register, assert RU_
SHIFTnLD.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
UG-M10CONFIG
2015.05.04
Remote System Upgrade Circuitry Input Control
2-11
Core Signal NameLogical
Signal
Name
Input/
Output
Description
Use this signal to get output data from the shift register. Data
RU_DOUTregoutOutput
is clocked out on each rising edge of RU_CLK if RU_SHIFTnLD is
asserted.
RU_nRSTIMERrsttimerInput
Use this signal to reset the user watchdog timer. A falling edge
of this signal triggers a reset of the user watchdog timer.
Use this signal to reconfigure the device. Driving this signal
RU_nCONFIGrconfigInput
low triggers the device to reconfigure if you enable the remote
system upgrade feature.
The clock to the remote system upgrade circuitry. All registers
RU_CLKclkInput
in this clock domain are enabled in user mode if you enable
the remote system upgrade. Shift register and input register
are positive edge flip-flops.
RU_SHIFTnLDshiftnldInputControl signals that determine the mode of remote system
upgrade circuitry.
• When RU_SHIFTnLD is driven low and RU_CAPTnUPDT is
driven low, the input register is loaded with the contents of
the shift register on the rising edge of RU_CLK.
• When RU_SHIFTnLD is driven low and RU_CAPTnUPDT is
RU_CAPTnUPDTcaptnupdtInput
driven high, the shift register captures values from the
input_cs_ps module on the rising edge of RU_CLK.
• When RU_SHIFTnLD is driven high, the RU_CAPTnUPDT will
be ignored and the shift register shifts data on each rising
edge of RU_CLK.
Related Information
• Accessing the Remote System Upgrade Block Through User Interface on page 3-8
Provides more information about accessing the remote system upgrade through user interface atom.
• MAX 10 Device Datasheet
Provides more information about Remote System Upgrade timing specifications.
Remote System Upgrade Circuitry Input Control
The remote system upgrade circuitry has three modes of operation.
• Update—loads the values in the shift register into the input register.
• Capture—loads the shift register with data to be shifted out.
• Shift—shifts out data to the user logic.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
Altera Corporation
2-12
Remote System Upgrade Input Register
Table 2-7: Control Inputs to the Remote System Upgrade Circuitry
UG-M10CONFIG
2015.05.04
Remote System Upgrade Circuitry Control Inputs
RU_SHIFTnLD RU_CAPTnUPDTShift register
[40]
Shift register
[39]
Operation
Mode
00Don't CareDon't CareUpdate
0100CaptureCurrent State
0101Capture
Previous State
Application1}
0110Capture
Previous State
Application2}
0111Capture
Register[38:0]
1Don't CareDon't CareDon't CareShift
Input Settings for Registers
Shift
Register[38:0]
Shift Register
[38:0]
Input
Register[38:0]
Shift Register
[38:0]
Input
Register[38:0]
{8’b0,
Input
Register[38:0]
{8’b0,
Input
Register[38:0]
Input
Input
Register[38:0]
{ru_din, Shift
Register
[38:1]}
Input
Register[38:0]
The following shows examples of driving the control inputs in the remote system upgrade circuitry:
• When you drive RU_SHIFTnLD high to 1’b1, the shift register shifts data on each rising edge of RU_CLK
and RU_CAPTnUPDT has no function.
• When you drive both RU_SHIFTnLD and RU_CAPTnUPDT low to 1’b0, the input register is loaded with
the contents of the shift register on the rising edge of RU_CLK.
• When you drive RU_SHIFTnLD low to 1’b0 and RU_CAPTnUPDT high to 1’b1, the shift register
captures values on the rising edge of RU_DCLK.
Remote System Upgrade Input Register
Table 2-8: Remote System Upgrade Input Register for MAX 10 Devices
BitsNameDescription
38:14ReservedReserved—set to 0.
• 0: Load configuration image 0
13ru_config_sel
• 1: Load configuration image 1
This bit will only work if the ru_config_sel_overwrite bit is set
to 1.
12
ru_config_sel_
overwrite
• 0: Disable overwrite CONFIG_SEL pin
• 1: Enable overwrite CONFIG_SEL pin
Altera Corporation
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
UG-M10CONFIG
2015.05.04
BitsNameDescription
Remote System Upgrade Status Registers
11:0ReservedReserved—set to 0.
Remote System Upgrade Status Registers
Table 2-9: Remote System Upgrade Status Register—Current State Logic Bit for MAX 10 Devices
BitsNameDescription
33:30msm_csThe current state of the master state machine (MSM).
2-13
29ru_wd_en
The current state of the enabled user watchdog timer. The default
state is active high.
Table 2-10: Remote System Upgrade Status Register—Previous State Bit for MAX 10 Devices
BitsNameDescription
31nconfigAn active high field that describes the reconfiguration sources
30crcerror
29nstatus
which caused the MAX 10 device to leave the previous application
configuration. In the event of a tie, the higher bit order takes
precedence. For example, if the nconfig and the ru_nconfig
triggered at the same time, the nconfig takes precedence over the
28wdtimer
ru_nconfig.
27:26ReservedReserved—set to 0.
The state of the MSM when a reconfiguration event occurred. The
25:22msm_cs
reconfiguration will cause the device to leave the previous applica‐
tion configuration.
21:0ReservedReserved—set to 0.
Master State Machine
The master state machine (MSM) tracks current configuration mode and enables the user watchdog
timer.
Table 2-11: Remote System Upgrade Master State Machine Current State Descriptions for MAX 10 Devices
msm_cs ValuesState Description
0010Image 0 is being loaded.
0011Image 1 is being loaded after a revert in application image happens.
0100Image 1 is being loaded.
0101Image 0 is being loaded after a revert in application image happens.
MAX 10 FPGA Configuration Schemes and Features
Send Feedback
Altera Corporation
Loading...
+ 39 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.