User guide

Spartan-6 FPGA Configuration User Guide www.xilinx.com 121
UG380 (v2.7) October 29, 2014
Readback Command Sequences
Configuration Register Read Procedure (JTAG)
The simplest read operation targets a configuration register such as the COR0 or STAT
register. Any configuration register with read access can be read through the JTAG
interface, although not all registers offer read access. The procedure for reading the STAT
register through the JTAG interface follows:
1. Reset the TAP controller.
2. Shift the CFG_IN instruction into the JTAG Instruction Register through the Shift-IR
state. The LSB of the CFG_IN instruction is shifted first; the MSB is shifted while
moving the TAP controller out of the SHIFT-IR state.
3. Shift packet write commands into the CFG_IN register through the Shift-DR state:
a. Write the synchronization word to the device.
b. Write the read STAT register packet header to the device.
c. Write two dummy words to the device to flush the packet buffer.
The MSB of all configuration packets sent through the CFG_IN register must be sent
first. The LSB is shifted while moving the TAP controller out of the SHIFT-DR state.
4. Shift the CFG_OUT instruction into the JTAG Instruction Register through the Shift-IR
state. The LSB of the CFG_OUT instruction is shifted first; the MSB is shifted while
moving the TAP controller out of the SHIFT-IR state.
5. Shift 32 bits out of the Status register through the Shift-DR state.
6. Reset the TAP controller.
Table 6-4: Shifting in the JTAG CFG_IN and CFG_OUT Instructions
Step Description
Set and Hold
# of Clocks
(TCK)
TDI TMS
1Clock five 1s on TMS to bring the device to the TLR state X 1 5
2 Move into the RTI state X 0 1
3 Move into the Select-IR state X 1 2
4 Move into the Shift-IR state X 0 2
5
Shift the first five bits of the CFG_IN or CFG_OUT instruction, LSB
first
000101
(CFG_IN)
05
000100
(CFG_OUT)
6
Shift the MSB of the CFG_IN or CFG_OUT instruction while
exiting SHIFT-IR
011
7 Move into the SELECT-DR state X 1 2
8 Move into the SHIFT-DR state X 0 2
9
Shift data into the CFG_IN register or out of the CFG_OUT register
while in SHIFT_DR, MSB first
X0X
10 Shift the LSB while exiting SHIFT-DR X 1 1
11 Reset the TAP by clocking five 1s on TMS X 1 5