Scan Chain
A scan chain is a test structure in which a chip’s flip-flops are linked into a long shift register, so that test equipment can set and read the chip’s internal state directly.
In more detail
In normal operation, each flip-flop captures the value produced by the logic in front of it. For scan, each flip-flop is replaced with a version that has a second input and a control signal. When the chip is put into scan mode, every flip-flop takes its input from the previous flip-flop in the chain.
Testing then follows a repeating cycle:
- Shift a pattern of values into the chain, setting every flip-flop to a chosen state
- Switch to normal mode for a clock cycle, so the logic computes and the flip-flops capture the results
- Shift the captured values out and compare them with what a good chip would produce
Scan insertion is done automatically after logic synthesis. A large chip has many chains, and compression logic lets a few test pins drive them all.
Why it matters
Scan turns a very hard testing problem into a manageable one. Without it, the logic deep inside a chip could only be reached through long sequences of functional operations. With it, every flip-flop becomes a point of control and observation, and patterns can be generated automatically by ATPG.
Scan is the foundation of DFT for digital logic. It also helps with debugging first silicon. Because it exposes internal state, access to scan must be protected in secure chips.