DFT · Board Test

Boundary Scan (JTAG)

IEEE 1149.1 standard: TAP controller FSM, boundary scan register at every I/O pin, and serial scan chain for board-level interconnect testing — no bed-of-nails required.

JTAG Pins & Boundary Scan Register

VLSI Chip TAP Controller 16-state FSM Instruction Register (IR) Boundary Scan Register (BSR) — one BSC per I/O pin BYPASS Register (1-bit) TDI TMS TCK TRST TDO I/O pads: each has a BSC (capture input / drive output) in the BSR chain TDI → IR/BSR/BYPASS → TDO serial scan chain
JTAG architecture: 4–5 dedicated pins (TDI/TDO/TMS/TCK/TRST) drive the TAP controller FSM, which selects which register (IR, BSR, BYPASS) is in the scan path between TDI and TDO.
PinDirectionFunction
TDI (Test Data In)InputSerial data shifted into the selected register (IR or DR) on TCK rising edge
TDO (Test Data Out)OutputSerial data shifted out of the selected register; changes on TCK falling edge
TMS (Test Mode Select)InputControls TAP controller FSM state transitions; sampled on TCK rising edge
TCK (Test Clock)InputJTAG serial clock — all operations synchronous to TCK; independent of system clock
TRST (Test Reset)Input (optional)Asynchronous reset of TAP controller to Test-Logic-Reset state; optional in IEEE 1149.1

TAP Controller — 16-State FSM Key States

Test-Logic-Reset Run-Test/Idle Select-DR-Scan Capture-DR Shift-DR shift TDI→TDO Exit1,Pause,Exit2... Select-IR-Scan Capture-IR Shift-IR load opcode Update-DR latch BSR→pads Update-IR new instruction live TMS=0 TMS=1 (DR) TMS=1,1 (IR) TAP controller navigated by TMS — determines which register (DR or IR) is active in scan path
TAP FSM key paths: TLR → Run-Test/Idle → Select-DR (for BSR/BYPASS) or Select-IR (to load instruction). Shift-DR/IR shift data; Update-DR/IR applies the shifted data.

Standard JTAG Instructions

InstructionIR OpcodeSelected DRPurpose
BYPASSAll 1s (e.g. 11111)1-bit BYPASS registerShort-circuit chip in chain — TDI→TDO in 1 cycle; used when chip is not being tested
SAMPLE/PRELOADDevice-specificBSRNon-intrusive snapshot of I/O pin values during normal operation; preload BSR before EXTEST
EXTESTAll 0s (e.g. 00000)BSRDrive BSR values onto output pins and sample input pins — board interconnect test
INTESTDevice-specificBSRApply BSR test data to core logic inputs — internal logic test (optional)
IDCODEDevice-specific32-bit Device ID registerRead manufacturer ID, part number, version from JTAG device
USERCODEDevice-specificUser-programmable registerRead user-defined ID (FPGA configuration version, etc.)

JTAG & Boundary Scan Interview Questions

What is JTAG and what problem does boundary scan solve?
JTAG (IEEE 1149.1) is a 4-wire serial interface standard for testing PCB assemblies. The problem it solves: modern PCBs use BGA packages where I/O pins are hidden under the chip — no physical probe can reach them. Bed-of-nails fixtures are expensive and can't probe all signals. Boundary scan adds a BSC (boundary scan cell) at every I/O pin, forming a serial scan chain accessible via TDI/TDO. A tester can control/observe any I/O pin through the JTAG interface to test board interconnects (opens, shorts, wrong net connections) without physical probing.
What are the 5 JTAG pins and their roles?
TDI (Test Data In): serial data input, sampled on TCK rising edge. TDO (Test Data Out): serial data output, changes on TCK falling edge. TMS (Test Mode Select): drives TAP controller FSM state transitions; sampled on TCK rising edge. TCK (Test Clock): JTAG serial clock, independent of system clock — typically 10–100 MHz. TRST (Test Reset, optional): asynchronous reset of TAP controller to TLR state; if absent, TLR is reached by holding TMS=1 for 5+ TCK cycles. All test operations are synchronous to TCK, allowing low-frequency testing regardless of the chip's functional clock speed.
Describe the TAP controller FSM key states.
The TAP FSM has 16 states driven by TMS at each TCK edge. Key states: (1) Test-Logic-Reset (TLR): all registers reset to idle state; reached by TMS=1 for 5+ cycles; (2) Run-Test/Idle: waiting state between test operations; (3) Select-DR/IR-Scan: entry point to DR or IR path depending on TMS; (4) Capture-DR: parallel load current I/O pin values (or fixed pattern for IR) into shift register; (5) Shift-DR/IR: serial shift — TDI shifts in, TDO shifts out for N TCK cycles; (6) Update-DR/IR: parallel output latch updated with shifted data — new instruction goes active or BSR drives output pins.
What is the EXTEST instruction and how is it used for board testing?
EXTEST is the primary board interconnect test instruction. Sequence: (1) SAMPLE — load current I/O values into BSR (preload safe drive values); (2) Load EXTEST into IR via Shift-IR/Update-IR; (3) Shift-DR to load test values into BSR; (4) Update-DR — BSR output latches drive chip output pins; (5) A neighboring chip's BSCs capture the driven values on its input pins; (6) Shift-DR on the neighbor to unload its captured values via TDO. By systematically driving and observing each net, the tester detects shorts (driven 1 received as 0), opens (driven value not reaching neighbor), and wrong-net connections. All chips on the board must support JTAG for EXTEST to work.
What is the BYPASS register and why is it needed?
BYPASS is a mandatory single-bit register. When BYPASS is selected (IR = all-1s), TDI is routed through the 1-bit register to TDO in 1 clock cycle, bypassing all longer DR (data register) paths. In a board-level JTAG chain with 10 chips, each chip may have a 200-bit BSR. Without BYPASS, shifting data to chip #8 would require clocking through 1600 bits (7 chips × ~200 bits). With BYPASS on chips 1–7 and 9–10, only 7 bits are wasted on those chips, and the full 200-bit shift reaches chip #8 in 207 cycles instead of 1800. Mandatory in all IEEE 1149.1-compliant devices.