6.2Setup, hold and the maximum clock frequency
The idea
Between two flip-flops, the clock period must be long enough for data to leave the first flip-flop, cross the logic, and be stable before the next edge: T ≥ t_clk→Q + t_logic + t_setup.
Think of it like this: A baton pass in a relay: the runner must arrive and hold the baton still before the next whistle.
Why it exists
Maximum clock frequency is the usual numerical question, and hold violations are a frequent true/false item.
How it works
- Add clock-to-Q, the longest logic delay, the setup time and any skew to get the minimum period.
- Frequency f_max = 1 / T_min.
- Hold: t_clk→Q + t_logic(min) must be at least t_hold (+ skew); this does not depend on the clock period.
- A hold violation is fixed by adding delay to the short path, not by slowing the clock.
Worked example: t_clk→Q = 2 ns, logic = 9 ns, setup = 1 ns
T_min = 2 + 9 + 1 = 12 ns, so f_max = 1/12 ns ≈ 83.3 MHz.
Now play with it
- →Press the default numbers and then increase the skew.
- →Reduce the shortest logic delay to 0 and see the hold slack turn negative.
T ≥ t_clk→Q + t_logic(max) + t_setup + skew. The hold check does not involve the clock period at all.
Check yourself
With t_clk→Q = 2 ns, longest logic delay = 9 ns and setup time = 1 ns, the maximum clock frequency is about
Exam notes (the dense version)
Between two flip-flops the clock period must satisfy T ≥ t_clk→Q + t_logic(max) + t_setup + t_skew, so f_max = 1/T. The hold condition is t_clk→Q + t_logic(min) ≥ t_hold + t_skew; it does not depend on the clock period (only a faster path or an added delay fixes it). The clock pulse width must be at least the minimum pulse width. For a ripple counter the clock period must exceed n·t_pd plus setup. For a single flip-flop with feedback (like a counter) T ≥ t_clk→Q + t_logic + t_setup.