JTAG Boundary Scan: Forcing Pins Through the TAP Controller

A circuit board with a chain of chips, a debug probe on the header and 16 state lights: watch an open JTAG port drive the pins of one chip, then blow the fuse. Drag to orbit.

Switch to 2D
Controls

Presets

Parameters

Quality

Camera

Model checks

The science

The TAP controller. IEEE 1149.1 (JTAG) puts a 16-state finite-state machine on every compliant chip. It is driven by only two signals sampled on each rising edge of the test clock TCK: TMS picks the next state (the table is fixed by the standard) and TDI feeds the selected shift register, whose far end appears on TDO. Holding TMS = 1 for five clocks always lands in Test-Logic-Reset, from any state, so a probe never needs to know where the chip was.

Registers and EXTEST. The instruction register (4 bits here) selects what the data register is: BYPASS (1 bit), IDCODE (32 bits, least-significant bit always 1) or the boundary-scan register, one cell per pin. The EXTEST instruction connects those cells to the pins themselves, so after Update-DR the pin voltages equal the shifted-in bits, whatever the firmware thinks. That is why an open JTAG port is a complete hardware back door: it can hold a reset or enable pin, drive a flash chip select, or bypass a secure-boot strap.

Cost model. In a daisy chain of D devices the probe must send an instruction for every device (4 bits each) and a data bit for every register in the chain: the target contributes N cells and every bypassed neighbour 1 bit. Counting clocks: reset 6, Run-Test/Idle to Shift-IR 4, shift 4D, exit 2, Run-Test/Idle to Shift-DR 3, shift N + D - 1, exit 2 gives 16 + 5D + N TCK clocks and a time of that count divided by the clock frequency. Even a cheap 100 kHz probe needs only milliseconds; the barrier is access, not time.

Defence. Blow the debug fuse or require an authenticated unlock, so the instruction decoder refuses EXTEST (and the debug-access instructions); remove or disable the header on production boards; do not route the TAP to an accessible connector; treat the chain as a trust boundary. The model implements the refusal as the IR decode substituting BYPASS.

Simplifications. Only EXTEST, IDCODE, SAMPLE and BYPASS exist; the boundary cells are a single shift register per device with no separate capture mux or system-logic path; electrical details (pin drive strength, TCK setup time) are ignored; the neighbours have 8 cells. This is a defensive demonstration of why debug ports must be locked. Checks: reset from all 16 states, breadth-first shortest paths against the textbook TMS sequences, shift latency in 60 random chains, 120 complete random attacks against the closed-form clock count and pin values (with and without the fuse), and the IDCODE readout.

Loading model...
Loading Blender model...
-
-
Made with 🟠 Blender · Three.js