Boundary Scan: Joint Test Action Group (Jtag)
Boundary Scan: Joint Test Action Group (Jtag)
BOUNDARY SCAN
JOINT TEST ACTION GROUP (JTAG):
JTAG is an industry standard for verifying designs and testing PCB after manufacture. The term
JTAG refers to the interface or test access port used for communication. It includes TCK, TDI,
TDO, TMS, TRST connections. For some applications this interface may be used to interrogate or
communicate with internal instruments within the core of the chip.
BOUNDARY SCAN:
It is an integrated method for testing interconnections (wire lines) on PCB or sub blocks
inside an integrated circuit that are implemented at IC level.
It is also widely used as a debugging method to watch integrated circuit pin states, measure
voltage or analyze sub blocks inside an integrated circuit.
Boundary Scan Methods:
For testing interconnects –PCBs used as a debugging method to watch integrated circuit pin
states, measure voltage, or analyze sub-blocks inside an integrated circuit. Boundary scan is a
family of test methodologies aiming at resolving many test problems.
From chip level to system level,
Logic cores to interconnects between cores
Digital circuits to analog or mixed-mode circuits.
The test access ports (TAP), which define the bus protocol of boundary scan, are the additional
I/O pins needed for each chip employing Std.1149.1a. The TAP controller is a 16-state final state
machine that controls each step of the operations of boundary scan. Each instruction to be carried
out by the boundary scan architecture is stored in the Instruction Register. The various control
signals associated with the instruction are then provided by a decoder. Several Test Data Registers
are used to stored test data or some system related information such as the chip ID, company name,
etc.
TAP Controller Signals:
Test Clock Input (TCK) -- Clock for test logic
Can run at different rate from system clock
Test Mode Select (TMS) -- Switches system from functional to test mode
Test Data Input (TDI) -- Accepts serial test data and instructions -- used to shift in vectors or one of
many test instructions
Test Data Output (TDO) -- Serially shifts out test results captured in boundary scan chain (or
device ID or other internal registers)
Test Reset (TRST) -- Optional asynchronous TAP controller reset
Boundary Scan Instructions:
The IEEE 1149.1 standard defines a set of instructions that must be available for a device to be
considered compliant. These instructions are:
BYPASS – this instruction causes the TDI and TDO lines to be connected via a single-bit
pass-through register (the BYPASS register). This instruction allows the testing of other devices
in the JTAG chain without any unnecessary overhead.
EXTEST – this instruction causes the TDI and TDO to be connected to the Boundary
Scan Register (BSR). The device’s pin states are sampled with the ‘capture dr’ JTAG state and
new values are shifted into the BSR with the ‘shift dr’ state; these values are then applied to the
pins of the device using the ‘update dr’ state.
SAMPLE/PRELOAD – this instruction causes the TDI and TDO to be connected to the
BSR. However, the device is left in its normal functional mode. During this instruction, the BSR
can be accessed by a data scan operation to take a sample of the functional data entering and
leaving the device. The instruction is also used to preload test data into the BSR prior to loading
an EXTEST instruction.
Other commonly available instructions include:
IDCODE – this instruction causes the TDI and TDO to be connected to the IDCODE
register.
INTEST – this instruction causes the TDI and TDO lines to be connected to the
Boundary Scan Register (BSR). While the EXTEST instruction allows the user to set and read
pin states, the INTEST instruction relates to the core-logic signals of a device.
1 Normal Mode=0
IN=OUT
4 Update Mode=1,update DR
QAàout.
EXTEST:
It tests the interconnection between the chips.
Test the internal logic of the chip
TAP Controller:
The operation of the test interface is controlled by the Test Access Port (TAP) controller. This is a
16-state finite state-machine whose state transitions are controller by the TMS signal.
TAP Controller State Diagram:
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 Data Path.
The data registers operate in the states whose names end with "DR" and the instruction register
operates in the states whose names end in "IR". The states are otherwise identical.
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, no matter what the initial state of the controller is, the
Test-Logic-Reset state can be entered by holding TMS at high and pulsing TCK five times. This is
why 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 Data Path 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
once it is latched.
Capture-DR
In this controller state, the data is parallel-loaded into the data registers selected by the current
instruction on the rising edge of TCK.
These controller states are similar to the Shift-IR, Exit1-IR, Pause-IR, Exit2-IR and Update-IR
states in the Instruction path.
Each instruction to be carried out by the boundary scan architecture is stored in the Instruction
Register. An Instruction register has a shift scan section that can be connected between TDI and
TDO, and a hold section that holds the current instruction. There may be some decoding logic
beyond the hold section depending on the width of the register and the number of different
instructions. The control signals to the Instruction register originate from the TAP controller and
either causes a shift-in/shift-out through the Instruction register shift section, or cause the contents
of the shift section to be passed across to the hold section (parallel Update operation). It is also
possible to load (Capture) internal hard-wired values into the shift section of the Instruction register.
The Instruction register must be at least two-bits long to allow coding of the four mandatory
instructions — Extest, Bypass, Sample, Preload — but the maximum length of the Instruction
register is not defined. In capture mode, the two least significant bits must capture a 01 pattern.
(Note: by convention, the least-significant bit of any register connected between the device TDI
and TDO pins, is always the bit closest to TDO.) The values captured into higher-order bits of the
Instruction register are not defined in the Standard. One possible use of these higher-order bits is to
capture an informal identification code if the optional 32-bit Identification register is not
implemented. In practice, the only mandated bits for the Instruction register capture are the 01
pattern in the two least-significant bits.
Instruction Set:
The IEEE 1149.1 Standard describes four mandatory instructions: Extest, Bypass, Sample, and
Preload, and six optional instructions: Intest, Idcode, Usercode, Runbist, Clamp and HighZ.
Whenever a register is selected to become active between TDI and TDO, it is always possible to
perform three operations on the register: parallel Capture followed by serial Shift followed by
parallel Update. The order of these operations is fixed by the state-sequencing design of the TAP
controller. For some target Data registers, some of these operations will be effectively null
operations, no ops.
EXTEST:
This instruction is used to test interconnect between two chips. The code for Extest used to be
defined to be the all-0s code. The EXTEST instruction places an IEEE 1149.1 compliant device into
an external boundary test mode and selects the boundary scan register to be connected between TDI
and TDO. During this instruction, the boundary scan cells associated with outputs are preloaded
with test patterns to test downstream devices. The input boundary cells are set up to capture the
input data for later analysis.
BYPASS:
A device's boundary scan chain can be skipped using the BYPASS instruction, allowing the data
to pass through the bypass register. The Bypass instruction must be assigned an all-1s code and
when executed, causes the Bypass register to be placed between the TDI and TDO pins. This allows
efficient testing of a selected device without incurring the overhead of traversing through other
devices. The BYPASS instruction allows an IEEE 1149.1 compliant device to remain in a functional
mode and selects the bypass register to be connected between the TDI and TDO pins. The BYPASS
instruction allows serial data to be transferred through a device from the TDI pin to the TDO pin
without affecting the operation of the device.
SAMPLE/PRELOAD:
The Sample and Preload instructions, and their predecessor the Sample/Preload instruction,
selects the Boundary-Scan register when executed. The instruction sets up the boundary-scan cells
either to sample (capture) values or to preload known values into the boundary-scan cells prior to
some follow-on operation. During this instruction, the boundary scan register can be accessed via a
data scan operation, to take a sample of the functional data entering and leaving the device. This
instruction is also used to preload test data into the boundary-scan register prior to loading an
EXTEST instruction.
INTEST:
With this command the boundary scan register (BSR) is connected between the TDI and the
TDO signals. The chip's internal core-logic signals are sampled and captured by the BSR cells at the
entry to the "Capture DR" state as shown in TAP state transition diagram. The contents of the BSR
register are shifted out via the TDO line at exits from the "Shift DR" state. As the contents of the
BSR (the captured data) are shifted out, new data are sifted in at the entries to the "Shift DR" state.
The new contents of the BSR are applied to the chip's core-logic signals during the "Update DR"
state.