Communicating with the JTAG TAP Controller
After the system manager undergoes a cold reset, access to the JTAG TAP controller in the FPGA control
block is through the dedicated FPGA JTAG I/O pins. If necessary, you can configure your system to use the
scan manager to provide the HPS processor access to the JTAG TAP controller, instead. This feature allows
the processor to send JTAG instructions to the FPGA portion of the device.
To connect scan chain 7 between the scan manager and the FPGA JTAG TAP controller, the following
features must be enabled:
• The scan chain for the FPGA JTAG TAP controller—To enable scan chain 7, set the
fpgajtag
field of
the
en
register in the scan manager. For more information, refer to Scan Manager Address Map and
Register Definitions.
• The FPGA JTAG logic source select—This source select determines whether the scan manager or the
dedicated FPGA JTAG pins are connected to the FPGA JTAG TAP controller in the FPGA portion of
the device. On system manager cold reset, the dedicated FPGA JTAG pins are selected. The source select
is configured through the
fpgajtagen
bit of the
ctrl
register in the
scanmgrgrp
group of the
system manager. The FPGA JTAG pins and scan manager connection to the TAP controller must both
be inactive when switching between them. The mechanism to ensure both are inactive is user-defined.
Before connecting or disconnecting the scan chain between the scan manager and the FPGA JTAG
TAP controller, ensure that both the FPGA JTAG
TCK
and scan manager
TCK
signals are de-asserted.
Note:
Altera recommends resetting the FPGA JTAG TAP controller using the scan manager's
nTRST
signal
after the scan manager is connected to the controller.
Related Information
•
Scan Manager Address Map and Register Definitions
on page 15-8
•
on page 14-1
JTAG-AP FIFO Buffer Access and Byte Command Protocol
The JTAG-AP contains FIFO buffers for byte commands and responses. The buffers are accessed through
the
fifosinglebyte
,
fifodoublebyte
,
fifotriplebyte
, and
fifoquadbyte
registers. The
JTAG-AP stalls processor access to the registers when the buffer does not contain enough data for read
access, or when the buffer does not contain enough free space to accept data for write access.
Software should read the
rfifocnt
and
wfifocnt
fields of the
stat
register to determine the
buffer status before performing the access to avoid being stalled by the JTAG-AP.
Note:
JTAG-AP scan chains 0, 1, 2 and 3 are write-only ports connected to the HPS IOCSRs and JTAG-AP scan
chain 7 is a read-write port connected to the FPGA JTAG TAP controller. The processor can send data to
scan chains 0-3, and send and receive data from scan chain 7 by accessing the command and response FIFO
buffers in the JTAG-AP.
Attempting to access data at invalid or non-aligned offsets can produce unpredictable results that
require a reset to recover.
Note:
The JTAG commands and
TDI
data must be sent to the JTAG-AP using an encoded byte protocol. Similarly,
the
TDO
data received from JTAG-AP is encoded. All commands are 8 bits wide in the byte command
protocol.
Scan Manager
Altera Corporation
cv_54015
Communicating with the JTAG TAP Controller
15-6
2013.12.30