Chapter4
User Primitives
The following configuration primitives are provided for users to access FPGA configuration resources during or after FPGA configuration.
BSCAN_VIRTEX5
JTAG is a standard four-pin interface: TCK, TMS, TDI, and TDO. Many applications are built around this interface. The JTAG TAP controller is a dedicated state machine inside the configuration logic. BSCAN_VIRTEX5 provides access between the JTAG TAP controller and user logic in fabric. There are up to four instances of BSCAN_VIRTEX5 for each device, each instance is controlled with the JTAG_CHAIN parameter. Table4-1 lists the BSCAN_VIRTEX5 fabric pins.
Table 4-1:BSCAN_VIRTEX5 Pin TablePin Name SEL
TypeOutput
Description
Active-High interface selection output. SEL=1 when the JTAG instruction register holds the corresponding USER1-4
instruction. Change in Update_IR state. SEL changes on the falling edge of TCK in the UPDATE_IR state of the TAP controller.
Active-High reset output. RESET=1 during the TEST-LOGIC-RESET state, PROGRAM_B, or during power up. This signal is deasserted on the falling edge of TCK.Fed through directly from the FPGA TDI pin.
DRCK is the same as TCK in the Capture_DR and Shift_DR states. If the interface is not selected by the instruction register, DRCK remains High.
Active-High pulse indicating the Capture_DR state. This signal is asserted on the falling edge of TCK.
Active-High pulse indicating the Update_DR state. This signal is asserted on the falling edge of TCK.
Active-High pulse indicating the Shift_DR state. This signal is asserted on the falling edge of TCK.
TDO input driven from the user fabric logic. This signal is internally sampled on the falling edge before being driven out to the FPGA TDO pin.
RESETOutput
TDIDRCK
OutputOutput
CAPTUREUPDATESHIFTTDO
OutputOutputOutputInput
Virtex-5 FPGA Configuration GuideUG191 (v3.13) July 28, 2024
Boundary-Scan for Virtex-5 Devices Using IEEE Standard 1149.1
TAP Controller
Figure3-2 diagrams a 16-state finite state machine. The four TAP pins control how data is scanned into the various registers. The state of the TMS pin at the rising edge of TCK determines the sequence of state transitions. There are two main sequences, one for shifting data into the data register and the other for shifting an instruction into the instruction register.
A transition between the states only occurs on the rising edge of TCK, and each state has a different name. The two vertical columns with seven states each represent the Instruction Path and the Datapath. The data registers operate in the states whose names end with \are otherwise identical.
The operation of each state is described below.
Test-Logic-Reset:
All test logic is disabled in this controller state, enabling the normal operation of the IC. The TAP controller state machine is designed so that regardless of the initial state of the controller, the Test-Logic-Reset state can be entered by holding TMS High and pulsing TCK five times. Consequently, the Test Reset (TRST) pin is optional.
Run-Test-Idle:
In this controller state, the test logic in the IC is active only if certain instructions are present. For example, if an instruction activates the self test, then it is executed when the controller enters this state. The test logic in the IC is idle otherwise.
Select-DR-Scan:
This controller state controls whether to enter the Datapath or the Select-IR-Scan state. Select-IR-Scan:
This controller state controls whether or not to enter the Instruction Path. The controller can return to the Test-Logic-Reset state otherwise.
Capture-IR:
In this controller state, the shift register bank in the Instruction Register parallel loads a pattern of fixed values on the rising edge of TCK. The last two significant bits must always be 01.
Shift-IR:
In this controller state, the instruction register gets connected between TDI and TDO, and the captured pattern gets shifted on each rising edge of TCK. The instruction available on the TDI pin is also shifted in to the instruction register.
Exit1-IR:
This controller state controls whether to enter the Pause-IR state or Update-IR state. Pause-IR:
This state allows the shifting of the instruction register to be temporarily halted. Exit2-DR:
This controller state controls whether to enter either the Shift-IR state or Update-IR state. Update-IR:
In this controller state, the instruction in the instruction register is latched to the latch bank of the Instruction Register on every falling edge of TCK. This instruction becomes the current instruction after it is latched.
Virtex-5 FPGA Configuration GuideUG191 (v3.13) July 28, 2024
Chapter 3:Boundary-Scan and JTAG Configuration
Virtex-5 FPGA Configuration Guide
UG191 (v3.13) July 28, 2024
Chapter 3:Boundary-Scan and JTAG Configuration
Virtex-5 FPGA Configuration Guide
UG191 (v3.13) July 28, 2024
Chapter 4:User Primitives
CAPTURE_VIRTEX5
The CAPTURE_VIRTEX5 primitive is used to capture I/O, CLB, and block RAM output flip-flop status, and then read back through the configuration interface. The CAP input is sampled by CLK to generate an internal gcap signal. The I/O and CLB flip-flop status are captured into an FPGA configuration memory cell when the gcap signal is High. There are operation modes, a one-shot mode, or a continuous mode.
In one-shot mode, after the first CAP falling edge, gcap is held to 0 to avoid further capturing. An explicit RCAP command is required to re-arm the capture circuit.In continuous mode, the CAP input is simply sampled by CLK, and becomes the gcap signal, allowing the user to control when to capture.
CAPTURE_VIRTEX5 should not operate simultaneously with the FRAME_ECC_VIRTEX5 primitive or the Readback CRC function (see Chapter9, “Readback CRC”) because capturing a value into configuration memory might cause a false error.Table 4-2:CAPTURE_VIRTEX5 Pin TablePin Name CLKCAP
TypeInputInput
Description
Clock for sampling the CAP input.
Active-High capture enable. The CAP input is sampled by the rising edge of CLK.
ICAP_VIRTEX5
The ICAP_VIRTEX5 primitive works the same way as the SelectMAP configuration
interface except it is on the fabric side, and ICAP has a separate read/write bus, as opposed to the bidirectional bus in SelectMAP. The general SelectMAP timing diagrams and the SelectMAP bitstream ordering information as described in the “SelectMAP Configuration Interface” section of this user guide are also applicable to ICAP. It allows the user to access configuration registers, readback configuration data, or partially reconfigure the FPGA after configuration is done.
ICAP has three data width selections through the ICAP WIDTH parameter: x8, x16, and x32.
The two ICAP ports cannot be operated simultaneously. The design must start from the top ICAP, then switch back and forth between the two. Table 4-3:ICAP_VIRTEX5 Pin TablePin Name CLKCEWRITEI[31:0]
TypeInputInputInputInput
ICAP interface clock
Active-Low ICAP interface select. Equivalent to CS_B in the SelectMAP interface.
0=WRITE, 1=READ. Equivalent to the RDWR_B signal in the SelectMAP interface.
ICAP write data bus. The bus width depends on
ICAP_WIDTH parameter. The bit ordering is identical to the SelectMAP interface. See SelectMap Data Ordering in Figure2-19.
Description
Virtex-5 FPGA Configuration Guide
UG191 (v3.13) July 28, 2024