An electrical circuit includes a flip-flop, a first multiplexer, a second
flip-flop, a third flip-flop, and output storage element including a
second multiplexer and a fourth flip-flop. The first flip-flop, clocked
functional clock signal, receives a functional signal. The first
multiplexer receives the output of the first flip-flop and a test mode
shift-in signal, and outputs one of them based on the state of a select
input. The second flip-flop, clocked by a test clock signal, receives the
output of the first multiplexer. The third flip-flop, clocked by a second
test clock signal, receives the output of the second flip-flop. The second
multiplexer receives the functional signal and the output of the third
flip-flop, and outputs one of them based on a mode select input signal.
The fourth flip-flop, clocked by a pulse-controlled functional clock
signal, receives the output of the second multiplexer.