How a scan chain works

In scan design each flip-flop is replaced by a scan flip-flop with a multiplexer at its input. When a scan-enable signal is asserted, the flip-flops link into shift registers called scan chains, so a tester can shift any desired state into every flip-flop. One functional clock (capture) then lets the combinational logic compute, and the results are latched back into the flip-flops. Shifting the chain out reads these results while the next pattern shifts in. This turns the hard problem of testing deep sequential logic into testing combinational logic between controllable and observable registers.

Patterns, faults and ATPG

Scan patterns are produced by automatic test pattern generation (ATPG) tools, which target fault models such as stuck-at faults, where a node is assumed fixed at 0 or 1, and transition faults, which model nodes that switch too slowly and are tested with at-speed capture clocks. The quality of a pattern set is reported as fault coverage. The cost of scan is extra area for the multiplexers and routing, a small delay added to flip-flop inputs, and the design effort of design for testability (DFT) rules such as keeping clocks and resets controllable during test.

Compression and unknown values

For large chips, the number of flip-flops makes raw scan data and shift time enormous. Test compression splits the logic into many short chains fed by an on-chip decompressor and drained into an output compactor. Because most bits in a pattern are don't-cares, data volume and test time can fall by a factor of tens or more. Compaction has a weakness: an unknown value (X) from an uninitialized memory, an analog block or a clock-domain crossing corrupts the compacted signature, so X sources are avoided in design and X-masking blocks the affected scan cells.

Scan test vs. boundary scan

Internal scan targets the logic inside the chip by chaining its flip-flops. Boundary scan, standardized as IEEE 1149.1 (JTAG), places scan cells at the chip's I/O pins so that board-level interconnects and solder joints can be tested and pins can be driven or observed without physical probes. The two are complementary, and the JTAG port is often reused to control internal test features. Neither replaces functional testing entirely, since scan patterns exercise structure rather than the chip's real use cases.

Try it: questions about Scan test

What is the technology called that expands test patterns inside the chip and compresses the responses to reduce scan test data volume and test time?

  1. ATest compression (scan compression)
  2. BBurn-in
  3. CIDDQ test
Show answer and explanation

Answer: A. Test compression (scan compression)

For large ICs, scan pattern volume becomes enormous, straining tester memory and test time. Test compression feeds a small amount of input data through an on-chip decompressor into many short scan chains and compacts the outputs before comparison. Because most bits in a pattern are don't-cares, data volume and test time can be cut substantially, in some cases by a factor of tens or more.

When compressing scan test outputs, why must signals whose value (0 or 1) is undetermined in simulation (unknowns, X) be removed?

  1. AIf unknowns mix into the compressed result, it cannot be compared with expected values and faults cannot be detected
  2. BUnknowns make the chip heat up
  3. CUnknowns stop the clock
Show answer and explanation

Answer: A. If unknowns mix into the compressed result, it cannot be compared with expected values and faults cannot be detected

Unknown values (X) from uninitialized memories, analog blocks or clock-domain boundaries, once mixed with other bits in the compactor, make the compacted result unknown so it cannot be compared with the expected value. X-masking, which blocks outputs of scan cells that produce X, and design practices that avoid X sources are therefore used. X values do not cause heating or stop the clock.

FAQ

What is the purpose of a scan chain?

A scan chain links a chip's flip-flops into a shift register during test so every internal state can be set and read directly. This makes high fault coverage achievable with automatically generated patterns.

What is the difference between scan test and JTAG boundary scan?

Internal scan chains the core flip-flops to test the on-chip logic, while boundary scan (IEEE 1149.1) chains cells at the I/O pins to test connections between chips on a board. Both use serial shifting, but they cover different parts of the system.

Why are unknown (X) values a problem in scan compression?

An X entering the output compactor mixes with other bits and makes the compacted result unpredictable, so it cannot be compared with the expected value and faults may go undetected. X-masking and X-free design practices prevent this.

Books on Testing and inspection Ad

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary