Introduction To JTAG Boundary Scan - Structured Techniques in DFT (VLSI)
Introduction To JTAG Boundary Scan - Structured Techniques in DFT (VLSI)
Contents
In the real world, we have more complex circuits. The television has a
whole system of circuits, including microprocessors and peripherals
lying interconnected on a PCB. Our smartphones have an entire
system integrated inside a single chip (SoC, System on Chip). There
are no more straightforward circuits in the real-world, actually. That
makes it hard to apply all the above tests in the real world.
1. Allows test instructions and test data to be serially fed into View Course Path
JTAG Port
Let’s see how Boundary Scan facilitates our Design Testing process.
No free lunch here, Boundary Scan will require some circuit overhead
and some extra I/O pins. These pins will be available by a separate
port, popularly known as JTAG Port. If you have done hands-on
projects on FPGAs in the VHDL course or Verilog course, you might
have already come across the JTAG port. Here’s an image of a JTAG
connector.
The pins in the ports are referred to as Test Access Port (TAP). Let’s
see what those TAPs are.
On the left side is your TV PCB (System) with its standard I/O pins like
HDMI, Audio Jack, Power, etc. On your right is the modified PCB
block featuring Boundary Scan support using JTAG Port. The pins in
red are the mandatory pins, while the pin in blue is optional.
Used to serially
Test
send the test
TDI Data Input Mandatory
data or test
Input
pattern
Test Selection of
TMS Mode Input Mandatory different test
Select modes
Reset of
Test Resetting the
As we discussed, our PCB has six different ICs. We can observe that
TDI TAP (Test Data Input – Test Access Port, remember this acronym
from now) is serially interconnected (or stitched) to each IC using one
JTAG Scan Chain. This wire is highlighted in Dark Green. On tracing,
this wire emerges out through the TDO (Test Data Output) TAP.
TMS (Test Mode Select) signal is applied to every chip. Boundary Scan
Standard is a synchronous design, so every chip also gets the TCK
(Test Clock) TAP, i.e., test clock.
JTAG Components
Let’s unpack one of the ICs to get a clear picture of what’s happening.
The Frontend Wrapper
View Course Path
Notice the red wires; these are stitched all way from Data In (TDI) into
each Boundary Scan Cells towards Data Out (TDO). These
connections make all the Boundary Scan Cells replicate the behavior
of a standard Shift Register. Therefore, we can call a series of
Boundary Scan Cells as a single Boundary Scan Register. In this way,
I/O data captured through these cells can be serially transferred out
of the system through JTAG port. This provides seamless access to
I/O ports of each system component.
Please note that this testing doesn’t interfere with the original Core
Logic or interconnection between the ICs, so both on-line testing and
View Course Path
off-line debug facilities are available .
Tap Controller
The TAP controller is a 16 state Finite State Machine, which controls
the operation of the JTAG Boundary Scan. The input of the FSM is the
Test Mode Select signal (TMS). The FSM is clocked by TCK.
The yellow blocks on the left represent the state related to the Data
Register (DR), while the green blocks on the right represent the state
of the Instruction Register (IR). On the upper left corner, we have the
test logic reset state. This is the initial state from where we should
start. There are two methods to return to the test logic reset state:
The Tap Controller FSM is an ingenious design. Observe the red arrow
lines, no matter where we are, we will eventually return to Reset State
on applying a sequence of 1’s. Here’s a question. What do you think,
how many maximum sequences of 1 are required to reset the FSM?
The state machine is controlled by TMS TAP input. We can shift into
any state by altering the sequence of the input (i.e., TMS TAP). We
can also hold into a specific state by continuously holding TMS TAP at
Back to course page
zero. We can reset the FSM, as we discussed. Hence, the whole state
Design For Testability Course
machine can be controlled with just one input pin. Very smart!
Course Path
the vendors can easily upgrade this with their own testing Introduction to JTAG Boundary
Scan – Structured techniques in
functionality.
DFT (VLSI)
The TDI TAP is broadcasted to all the registers. The state machine
decides whether the register captures the data or blocks it. The state
machine can be controlled by the user using the TMS TAP. We can
shift to any desired state to capture data , or we can also block the
entry of data in IR as well as DR. Don’t worry, later we will have a
thorough exercise of data movements and testing. This is just an
introduction to have a glimpse of the functionality provided by JTAG.
Bypass Register
The purpose of the Bypass register is to provide a shortcut from TDI Share and Support
to TDO . The structure of a bypass register is straightforward. It is just
one-bit flip-flop. When the control signal ShiftDR is equal to logic-1,
we can shift our test data from TDI to TDO. In this way, we provide a
shortcut through this chip, so this chip is not tested by JTAG if it is
already verified or you trust the chip.
View Course Path
But this can be solved using a Bypass Register! Say you trust the chip
1, so only one clock cycle would be required if you use the Bypass
Register path (shown in red arrow).
Clock cycles required to test one pattern in two chips (using BR)
= 1+8+8 = 17
Control Signal
Operation Clock
Mode ShiftDR
Normal 0 x System
Update 1 x UpdateDR
Capture x 0 ClockDR
In Scan operation, the data shifts from one Scan flip-flop to next
Scan flip-flop. This operation doesn’t interfere with the System
Logic, hence it can be deployed on-line. ClockDR is used to shift
the Boundary Scan Chain.
The Update operation loads the data from the Scan flip-flop to
the Output flip-flop. This operation is used to apply the test
pattern to the System Logic inputs.
Instruction Register
The purpose of the Instruction Register is to shift in instructions from
TDI TAP. It stores the JTAG instructions for the Instruction Decoder. It
is very similar to Boundary Scan Register as it also has two layers of
FFs. The first layer comprises the Scan flip-flop, and the second layer
consists of the Output flip-flop.
After the above three steps, the instruction is sent to the Instruction
Decoder to generate control signals. This two-layer flip-flop design
isolates instruction decoder from the scan operation. Hence, the scan
operation does not interfere with the instruction decoder.
Load Instruction: Load the instruction serially through TDI TAP. In this
step, we need to continuously apply TMS = 0 until the complete
instruction is loaded. This will control the state machine to stay in the
Shift-IR state.
All the data registers like Boundary Scan Register, Bypass Register,
and Optional Register (like Device ID) are enclosed in a red dotted
square.
Instruction Decoder generates control signals like Mode and also the
Select signal, which controls the scan output for the Data Registers.
On the lower left, there is the TAP controller, which is a 16-state finite
state machine. This state machine is configured by the TMS TAP to
generate control signals like ClockDR, ShiftDR, and UpdateDR for the
data registers and ClockIR, ShiftIR, and UpdateIR for the instruction
register.
ClockDR and ClockIR are active at the positive edge of TCK, while
UpdateDR and UpdateIR are active at the negative edge of TCK. The
TAP controller always makes the state transition at the rising edge of
TCK. Also, the TDO output is available after the falling edge of TCK.
This is specified in the JTAG standard (IEEE 1149.1).
Summary
In this section, we learned how Boundary Scan facilitates testing of
full system design. This is done by enclosing the design in a wrapper
that stitches the I/O ports of the chip with the Boundary Scan
Register. The wrapper also contains various Boundary Scan
components like Instruction Register, Instruction Decoder, Data
Registers, TAP Controller, and several other interconnecting
components. The Boundary Scan wrapper is very popular and
supported by many EDA and CAD tools in the form of free IPs and
HDL to be included in the design. ATPG and DFT techniques like Scan
View Course Path
Chain, BIST, etc. are also supported by the Boundary Scan Standard.
In the next article of Boundary Scan, we will discuss the entire testing
process using JTAG instructions and programming.
Leave a Reply
Write a Comment...
Reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Join our mailing list to get notified about new courses and features
Content Navigation
Engineering Courses Articles Interesting Facts Contribute
Helpful Links
Contact About Us Advertise Blog
TECHNOBYTE
© 2016 - 2022
All rights reserved. Read our privacy policy and terms of use .
View Course Path
We and our partners share information on your use of this website to help improve your experience. ×
Do not sell my info:
Okay