Home › Practice › RTL Design › Scan chain: shift and capture

Scan chain: shift and capture

EasyDFTRTLsequential

A 4-bit scan chain links four flip-flops into a shift path so chip testers can load and read internal state through two pins. The starter code compiles, but two bugs break shifting and scan readout.

Concept first. Inside a real chip, thousands of flip-flops sit behind logic with no direct path to the pins. Adding a 2-to-1 mux in front of every flip-flop lets test mode turn them into one long shift register. When scan enable (se) is 1, each flip-flop takes the previous flip-flop's output and the chain shifts a test pattern in from si and out through so. When se is 0, each flip-flop captures its normal data input d_in.

What the circuit must do.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← Timing: ports and the flop in the middleMemory BIST stuck-at detector →