Electrical – Delays of logical flip-flops

flipfloplogic-gates

I have two flips flops as so. The clocks are connected, even though it is not shown in the picture.
enter image description here
Given this image, I am trying to figure whether the contamination delay or the propagation delay of flip flop 1 would cause a hold time violation of flip flop 2. The correct answer is contamination delay but I am having trouble understanding why.

What I know is: the setup time and hold time are related to the input, contamination/propagation delays are related to the output.

Looking at it more in depth, setup time is the time before the clock edge that the input D must be stable and hold time is the time after the clock edge that the input must be stable.

Similarly, contamination delay is the time after the clock edge that the output might be unstable (i.e. starts to change). Propagation delay is the time after the clock edge that the output is guaranteed to be stable.

Given this knowledge, I am not sure why the contamination delay would cause a hold time violation. If the output changes instantaneously, let's say, before the clock edge (i.e. the contamination delay = 0), then why would that affect the hold time of flip flop2? A comprehensive explanation of this would be very helpful.

Best Answer

The hold time is the time the input must be stable after the clock edge for the data to be sampled correctly by the clock edge. In many cases it is zero, but let's say it is 2 nsec. If your contamination time is 1nsec, it means that after 1nsec the output of the previous FF (input of the next one) started to chage => hold time of the second FF was violated