| CPC G01R 31/2851 (2013.01) | 10 Claims |

|
1. A circuit, comprising:
a plurality of scan flip-flops including a sequence of scan flip-flops, wherein at least some scan flip-flops of the sequence of scan flip-flops are wrapper scan flip-flops, each scan flip-flop of the sequence of scan flip-flops having a D input, a test enable input, a test input and a data output,
wherein the circuit comprises, for each scan flip-flop of at least a subset of the scan flip-flops of the sequence of scan flip-flops, at the scan flip-flop's test input a respective test input circuit comprising a plurality of logic gates, wherein the plurality of logic gates of the test input circuit is configured to,
when supplied with a mode control signal having a first value indicating a shift mode, connect the test input to the output of the scan flip-flop preceding the scan flip-flop in the sequence such that the test input of the scan flip-flop is supplied with the content of the scan flip-flop preceding the scan flip-flop in the sequence and
when supplied with the mode control signal having a second value indicating a capture mode, connect the test input to an output of a subcircuit of the circuit, wherein the subcircuit is under test, such that the test input of the flip-flop is supplied with a value depending on a test result provided by the subcircuit.
|