Unit-V TVC
Unit-V TVC
UNIT-V
BOUNDARY SCAN STANDARD
Boundary Scan Methods and Standards
Boundary Scan is a family of test methodologies aiming at resolving many test problems: from
chip level to system level, from logic cores to interconnects between cores, and from digital
circuits to analog or mixed-mode circuits. It is now widely accepted in industry and has been
considered as an industry standard in most large IC system designs. Boundary-scan, as defined
by the IEEE Std. 1149.1 standard, is an integrated method for testing interconnects on
printed circuit board that is implemented at the IC level. Earlier, most Printed Circuit Board
(PCB) testing was done using bed-of-nail in-circuit test equipment.
Recent advances with VLSI technology now enable microprocessors and Application Specific
Integrated Circuits (ASICs) to be packaged into fine pitch, high count packages. The
miniaturization of device packaging, the development of surface-mounted packaging,
double-sided and multi-layer board to accommodate the extra interconnects between the
increased density of devices on the board reduces the physical accessibility of test points for
traditional bed-of-nails in-circuit tester and poses a great challenge to test manufacturing
defects in future. The long-term solution to this reduction in physical probe access was to
consider building the access inside the device i.e. a boundary scan register.
In 1985, a group of European companies formed Joint European Test Action Group (JETAG)
and by 1988 the Joint Test Action Group (JTAG) was formed by several companies to tackle
these challenges. The JTAG has developed a specification for boundary-scan testing that was
standardized in 1990 by IEEE as the IEEE Std. 1149.1-1990. In 1993 a new revision to the
IEEE Std. 1149.1 standard was introduced (1149.1a) and it contained many clarifications,
corrections, and enhancements. In 1994, a supplement that contains a description of the
boundary-scan Description Language (BSDL) was added to the standard. Since that time, this
standard has been adopted by major electronics companies all over the world. Applications are
found in high volume, high-end consumer products, telecommunication products, defense
systems, computers, peripherals, and avionics. Now, due to its economic advantages, smaller
companies that cannot afford expensive in-circuit testers are using boundary-scan. Figure 41.1
gives an overview of the boundary scan family, now known as the IEEE 1149.x standards.
The Std. 1149.1, usually referred to as the digital boundary scan, is the one that has been used
widely. It can be divided into two parts: 1149.1a, or the digital Boundary Scan Standard, and
1149.1b, or the Boundary Scan Description Language (BSDL) [1,6]. Std. 1149.1 defines the chip
level test architecture for digital circuits, and Std. 1149.1b is a hardware description language
used to describe boundary scan architecture. The 1149.2 defines the extended digital series
interface in the chip level. It has merged with 1149.1 group. The 1149.3 defines the direct access
interface in contrast to 1149.2. Unfortunately this work has been discontinued. 1149.4 IEEE
Standard deals with Mixed-Signal Test Bus . This standard extends the test structure defined in
IEEE Std. 1149.1 to allow testing and measurement of mixed-signal circuits. The standard
describes the architecture and the means of control and access to analog and digital test data.
The Std.1149.5 defines the bus protocol at the module level. By combining this level and
Std.1149.1a one can easily carry out the testing of a PC board.
1149.6 IEEE Standard for Boundary-Scan Testing of Advanced Digital Networks is released in
2002. This standard augments 1149.1 for the testing of conventional digital networks and 1149.4
for analog networks. The 1149.6 standard defines boundary-scan structures and methods
required to test advanced digital networks that are not fully covered by IEEE Std. 1149.1, such
as networks that are AC-coupled, differential, or both.
1532 IEEE Standard is developed for In-System Configuration of Programmable Devices. This
extension of 1149.1 standardizes programming access and methodology for programmable
integrated circuit devices. Devices such as CPLDs and FPGAs, regardless of vendor, that
implement this standard may be configured (written), read back, erased and verified, singly or
concurrently, with a standardized set of resources based upon the algorithm description
contained in the 1532 BSDL file.
JTAG Technologies programming tools contain support for 1532-compliant devices and
automatically generate the applications.
Clearly the testing of mixed-mode circuits at the various levels of integration will be a critical
test issue for the system-on-chip design. Therefore there is a demand to combine all the boundary
scan standards into an integrated one.
Internal Register
Identification Register
1 Instruction Register
TMS
TAP
TCK Controller
1
TRST* (optional)
Fig. 41.2 Main Elements of a IEEE 1149.1 Device Architecture
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.
test instructions and data are loaded from system input pins on the rising edge of TCK
and driven through system output pins on its falling edge. TCK is pulsed by the
equipment controlling the test and not by the tested device. It can be pulsed at any
frequency (up to a maximum of some MHz). It can be even pulsed at varying rates.
• Test Data Input (TDI): an input line to allow the test instruction and test data to be loaded
into the instruction register and the various test data registers, respectively.
• Test Data Output (TDO): an output line used to serially output the data from the JTAG
registers to the equipment controlling the test.
• Test Mode Selector (TMS): the test control input to the TAP controller. It controls the
transitions of the test interface state machine. The test operations are controlled by the
sequence of 1s and 0s applied to this input. Usually this is the most important input that
has to be controlled by external testers or the on-board test controller.
Test Reset Input (TRST*): The optional TRST* pin is used to initialize the TAP controller, that
is, if the TRST* pin is used, then the TAP controller can be asynchronously reset to a Test-
Logic-Reset state when a 0 is applied at TRST*. This pin can also be used to reset the circuit
under test, however it is not recommended for this application.
Data In
0 Data Out
(PI) Capture Update
Hold Cell 1 (PO)
Scan Cell
0
D Q D Q
1
Clk Clk
C
U
Scan in ShiftDR ClockDR UpdateDR
S
(SI)
Figure 41.3 shows a basic universal boundary-scan cell, known as a BC_1. The cell has four
modes of operation: normal, update, capture, and serial shift. The memory elements are two D-
type flip-flops with front-end and back-end multiplexing of data. It is important to note that the
circuit shown in Figure 41.3 is only an example of how the requirement defined in the Standard
could be realized. The IEEE 1149.1 Standard does not mandate the design of the circuit, only its
functional specification. The four modes of operation are as follows:
1) During normal mode also called serial mode, Data_In is passed straight through to
Data_Out.
2) During update mode, the content of the Update Hold cell is passed through to Data_Out.
Signal values already present in the output scan cells to be passed out through the device
output pins. Signal values already present in the input scan cells will be passed into the
internal logic.
3) During capture mode, the Data_In signal is routed to the input Capture Scan cell and the
value is captured by the next ClockDR. ClockDR is a derivative of TCK. Signal values
on device input pins to be loaded into input cells, and signal values passing from the
internal logic to device output pins to be loaded into output cells
4) During shift mode, the Scan_Out of one Capture Scan cell is passed to the Scan_In of the
next Capture Scan cell via a hard-wired path.
The Test ClocK, TCK, is fed in via yet another dedicated device input pin and the various modes
of operation are controlled by a dedicated Test Mode Select (TMS) serial control signal. Note
that both capture and shift operations do not interfere with the normal passing of data from the
parallel-in terminal to the parallel-out terminal. This allows on the fly capture of operational
values and the shifting out of these values for inspection without interference. This application of
the boundary-scan register has tremendous potential for real-time monitoring of the operational
status of a system a sort of electronic camera taking snapshots and is one reason why TCK is
kept separate from any system clocks.
The figure shows a board containing four boundary-scan devices. It is seen that there is an edge-
connector input called TDI connected to the TDI of the first device. TDO from the first device is
permanently connected to TDI of the second device, and so on, creating a global serial scan path
terminating at the edge connector output called TDO. TCK is connected in parallel to each
device TCK input. TMS is connected in parallel to each device TMS input. All cell boundary
data registers are serially loaded and read from this single chain.
Boundary-scan cell
Chip 1 Chip 2
TDI
TMS TMS
Serial
data in
TCK TCK
Chip 4
Chip 3
TMS TMS
TCK
TMS
Serial test interconnect System interconnect
The advantage of this configuration is that only two pins on the PCB/MCM are needed for
boundary scan data register support. The disadvantage is very long shifting sequences to deliver
test patterns to each component, and to shift out test responses. This leads to expensive time on
the external tester. As shown in Figure 41.5, the single scan chain is broken into two parallel
boundary scan chains, which share a common test clock (TCK).
The extra pin overhead is one more pin. As there are two boundary scan chains, so the test
patterns are half as long and test time is roughly halved. Here both chains share common TDI
and TDO pins, so when the top two chips are being shifted, the bottom two chips must be
disabled so that they do not drive their TDO lines. The opposite must hold true when the
bottom two chips are being tested.
TMS1
TMS2
TDO
TCK
TDI
TAP Controller
TMS ClockDR
TCK ShiftDR
TRST* UpdateDR
16-state FSM Reset*
TAP Controller Select
(Moore machine)
ClockIR
ShiftIR
UpdateIR
Enable
Figure 41.6 shows a top-level view of TAP Controller. TMS and TCK (and the optional TRST*)
go to a 16-state finite-state machine controller, which produces the various control signals. These
signals include dedicated signals to the Instruction register (ClockIR, ShiftIR, UpdateIR) and
generic signals to all data registers (ClockDR, ShiftDR, UpdateDR). The data register that
actually responds is the one enabled by the conditional control signals generated at the parallel
outputs of the Instruction register, according to the particular instruction.
The other signals, Reset, Select and Enable are distributed as follows:
• Reset is distributed to the Instruction register and to the target Data Register
• Select is distributed to the output multiplexer
• Enable is distributed to the output driver amplifier
It must be noted that the Standard uses the term Data Register to mean any target register except
the Instruction register
0 0
Shift_DR 0 Shift_IR 0
1 1
1 1
Exit_DR Exit1_IR
0 0
Pause_DR 0 Pause_IR 0
1 1
0 0
Exit2_DR Exit2_IR
1 1
Update_DR Update_IR
1 0 1 0
Figure 41.7 shows the 16-state state table for the TAP controller. The value on the state transition
arcs is the value of TMS. A state transition occurs on the positive edge of TCK and the controller
output values change on the negative edge of TCK. The 16 states can be divided into three parts.
The first part contains the reset and idle states, the second and third parts control the operations
of the data and instruction registers, respectively. Since the only difference between the second
and the third parts are on the registers they deal with, in the following only the states in the first
and second parts are described. Similar description on the second part can be applied to the third
part.
1. Test-Logic-Reset: In this state, the boundary scan circuitry is disabled and the system is in
its normal function. Whenever a Reset* signal is applied to the BS circuit, it also goes back
to this state. One should also notice that whatever state the TAP controller is at, it will goes
back to this state if 5 consecutive 1's are applied through TMS to the TAP controller.
2. Run-Test/Idle: This is a state at which the boundary scan circuitry is waiting for some test
operations such as BIST operations to complete. One typical example is that if a BIST
operation requires 216 cycles to complete, then after setting up the initial condition for the
BIST operation, the TAP controller will go back to this state and wait for 216 cycles before it
starts to shift out the test results.
3. Select-DR-Scan: This is a temporary state to allow the test data sequence for the selected
test-data register to be initiated.
4. Capture-DR: In this state, data can be loaded in parallel to the data registers selected by the
current instruction.
5. Shift-DR: In this state, test data are scanned in series through the data registers selected by
the current instruction. The TAP controller may stay at this state as long as TMS=0. For
each clock cycle, one data bit is shifted into (out of) the selected data register through TDI
(TDO).
6. Exit-DR: All parallel-loaded (from the Capture-DR state) or shifted (from the Shift-DR
state) data are held in the selected data register in this state.
7. Pause-DR: The BS pauses its function here to wait for some external operations. For
example, when a long test data is to be loaded to the chip(s) under test, the external tester
may need to reload the data from time to time. The Pause-DR is a state that allows the
boundary scan architecture to wait for more data to shift in.
8. Exit2-DR: This state represents the end of the Pause-DR operation, allows the TAP
controller to go back to ShiftDR state for more data to shift in.
9. Update-DR: The test data stored in the first stage of boundary scan cells is loaded to the
second stage in this state.
0
D Q To TDO
From TDI
ShiftDR Clk
ClockDR
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 is the 01 pattern in the two least-significant bits. We will return to the value of
capturing this pattern later in the tutorial.
Instruction Register
DR select and control signals routed to selected target register
Decode Logic
Hold register
(Holds current instruction)
TAP 0 1
Controller IR Control Higher order bits:
current instruction, status bits, informal ident,
results of a power-up self test, …
Fig. 41.9 Instruction register
Standard Instructions
Instruction Selected Data Register
Mandatory:
Extest Boundary scan (formerly all-0s code)
Bypass Bypass (initialized state, all-1s code)
Sample Boundary scan (device in functional mode)
Preload Boundary scan (device in function mode)
Optional:
Intest Boundary scan
Idcode identification (initialized state if present)
Usercode Identification (for PLDs)
Runbist Result register
Clamp Bypass (output pins in safe state)
HighZ Bypass (output pins in high-Z state)
NB. All unused instruction codes must default to Bypass
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.
IDCODE: This is used to select the Identification register between TDI and TDO, preparatory to
loading the internally-held 32-bit identification code and reading it out through TDO. The 32 bits
are used to identify the manufacturer of the device, its part number and its version number.
USERCODE: This instruction selects the same 32-bit register as IDCODE, but allows an
alternative 32 bits of identity data to be loaded and serially shifted out. This instruction is used
for dual-personality devices, such as Complex Programmable Logic Devices and Field
Programmable Gate Arrays.
RUNBIST: An important optional instruction is RunBist. Because of the growing importance of
internal self-test structures, the behavior of RunBist is defined in the Standard. The self-test
routine must be self-initializing (i.e., no external seed values are allowed), and the execution of
RunBist essentially targets a self-test result register between TDI and TDO. At the end of the
self-test cycle, the targeted data register holds the Pass/Fail result. With this instruction one can
control the execution of the memory BIST by the TAP controller, and hence reducing the
hardware overhead for the BIST controller.
CLAMP: Clamp is an instruction that uses boundary-scan cells to drive preset values established
initially with the Preload instruction onto the outputs of devices, and then selects the Bypass
register between TDI and TDO (unlike the Preload instruction which leaves the device with the
boundary-scan register still selected until a new instruction is executed or the device is returned
to the Test_Logic Reset state). Clamp would be used to set up safe guarding values on the
outputs of certain devices in order to avoid bus contention problems, for example.
HIGH-Z: It is similar to Clamp instruction, but it leaves the device output pins in a high-
impedance state rather than drive fixed logic-1 or logic-0 values. HighZ also selects the Bypass
register between TDI and TDO.
TDI TDI
TCK TCK #N
TMS #N TMS
TDO TDO
(a) (b)
Fig. 41.10 BUS master for chips with BS: (a) star structure, (b) ring structure
L L L
O O O
G G G
I I I
C C C
TDI TDO TDI TDO TDI TDO
BP BP BP
IR IR IR
DR DR DR
TCK TMS TCK TMS TCK TMS
TAP TAP TAP
Test Connector
language can greatly reduce the effort to incorporate boundary scan into a chip, and hence is
quite useful when a designer wishes to design boundary scan in his own style. Basically for those
parts that are mandatory to the Std. 1149.1a such as the TAP controller and the BYPASS
register, the designer does not need to describe them; they can be automatically generated. The
designer only has to describe the specifications related to his own design such as the length of
boundary scan register, the user-defined boundary scan instructions, the decoder for his own
instructions, the I/O pins assignment. In general these descriptions are quite easy to prepare. In
fact, currently many CAD tools already implement the boundary scan generation procedure and
thus it may even not needed for a designer to write the BSDL file: the tools can automatically
generate the needed boundary scan circuitry for any circuit design as long as the I/O of the
design is specified.
Any manufacturer of a JTAG compliant device must provide a BSDL file for that device. The
BSDL file contains information on the function of each of the pins on the device - which are
used as I/Os, power or ground. BSDL files describe the Boundary Scan architecture of a JTAG-
compliant device, and are written in VHDL. The BSDL file includes:
1. Entity Declaration: The entity declaration is a VHDL construct that is used to identify the
name of the device that is described by the BSDL file.
2. Generic Parameter: The Generic parameter specifies which package is described by the
BSDL file.
3. Logical Port Description: lists all of the pads on a device, and states whether that pin is an
input(in bit;), output(out bit;), bidirectional (inout bit;) or unavailable for boundary scan (linkage
bit;).
.4. Package Pin Mapping: The Package Pin Mapping shows how the pads on the device die are
wired to the pins on the device package.
5. Use statements: The use statement calls VHDL packages that contain attributes, types,
constants, etc. that are referenced in the BSDL File.
6. Scan Port Identification: The Scan Port Identification identifies the JTAG pins: TDI, TDO,
TMS, TCK and TRST (if used).
7. TAP description: provides additional information on the device's JTAG logic; the Instruction
Register length, Instruction Opcodes, device IDCODE, etc. These characteristics are device
specific.
8. Boundary Register description: provides the structure of the Boundary Scan cells on the
device. Each pin on a device may have up to three Boundary Scan cells, each cell consisting of a
register and a latch.
12 11
D6 Q6 D6 6 0 Q6
C 13 C 10
D5 O Q5 D5 7 O 1 Q5
R 14 R 9
D4 Q4 D4 8 2 Q4
E E
15 8
D3 Q3 D3 9 3 Q3
L L 7
16
D2 O Q2 D2 10 O 4 Q2
G 17 G 6
D1 I Q1 D1 11 I 5 Q1
C 1 C
CLK CLK 12
TAP
Controller
2 3 4 5
TDI TCK TMS TDO
(a)
(b)
Fig. 41.12 Example to illustrate BSDL (a) core logic (b) after BS insertion
By providing access to the scan chain I/Os, the need for physical test points on the board is
eliminated or greatly reduced, leading to significant savings as a result of simpler board layouts,
less costly test fixtures, reduced time on in-circuit test systems, increased use of standard
interfaces, and faster time-to-market. In addition to board testing, boundary-scan allows
programming almost all types of CPLDs and flash memories, regardless of size or package type,
on the board, after PCB assembly. In-system programming saves money and improves
throughput by reducing device handling, simplifying inventory management, and integrating the
programming steps into the board production line.
Penalties
The penalties incurred in using boundary-scan include the following:
• extra silicon due to boundary scan circuitry
• added pins
• additional design effort
• degradation in performance due to gate delays through the additional circuitry
• increased power consumption
Boundary Scan Example
Since boundary-scan design is new to many designers, an example of gate count for a circuit
with boundary scan is discussed here. This provides an estimate for the circuitry sizes required to
implement the IEEE 1149.1 standard, but without the extensions defined in the standard. The
example uses a library-based gate array design environment. The gate counts given are based on
commercial cells and relate to a 10000 gate design in a 40-pin package. Table 1 gives the gate
requirement.