Setup time, hold time and clock-to-Q delay of a flip-flop, the setup (maximum delay) and hold (minimum delay) constraints of a register-to-register path, maximum clock frequency, the effect of clock skew, and metastability.
An edge-triggered flip-flop samples at the active clock edge. To sample correctly, must not change inside a small window around the edge.
Setup time : the minimum time must be stable before the active edge.
Hold time : the minimum time must stay stable after the active edge.
Clock-to-Q (propagation) delay (also ): the maximum time after the edge for to show the new value.
Contamination clock-to-Q : the minimum time after the edge before can start to change.
The window from before the edge to after it is the aperture. Hold time can be zero or even negative for some flip-flops.
For combinational logic the matching pair is the propagation delay (longest path, slowest case) and the contamination delay (shortest path, fastest case).
What happens on a violation? The flip-flop may store the wrong value, or enter a metastable state: the output hovers between 0 and 1 for an unpredictable time before settling to either value.
D must be stable for t_su before and t_h after the active clock edge; Q changes t_cq after the edge.
2. The setup constraint and maximum clock frequency
Take a path: flip-flop FF1 launches data at a clock edge, it passes through combinational logic, and FF2 captures it at the next edge. The data must reach FF2 at least before that edge. With no clock skew:
Use the slowest values: maximum clock-to-Q and the critical (longest) path delay.
Setup slack . Negative slack is a setup violation.
How to fix a setup violation:
lower the clock frequency (longer );
shorten the critical path (faster gates, better logic, fewer levels);
add pipeline registers to split the path.
Circuits with several paths: compute the delay of every register-to-register path (including a flip-flop's feedback path to itself) and take the largest for the clock period. In a pipeline, the slowest stage sets the clock.
Inputs from outside the circuit count too: if the input arrives at time after the edge, the path is .
A register-to-register path: FF1 launches, the logic delays the data, FF2 captures; δ is the clock skew at FF2.
3. The hold constraint
At the same clock edge at which FF2 captures its data, FF1 launches new data. If the new data races through a very short path, it can reach FF2 while FF2 is still in its hold window and corrupt the value being captured. With no skew:
Use the fastest values: minimum clock-to-Q and the shortest path (contamination delay).
Hold slack .
Key fact: the hold constraint does not contain . Lowering the clock frequency cannot fix a hold violation. A chip with a hold violation fails at every frequency.
How to fix a hold violation: add delay (buffers) in the short path, without making the long path too slow.
Direct connections: when of one flip-flop drives of the next with no logic (), as in a shift register, the condition is . Flip-flops are designed so that this holds when the clock is not skewed.
Setup check
Hold check
Path used
longest
shortest
Delays used
maximum
minimum
Depends on
yes
no
Fix
slow clock, shorten path
add delay to the path
4. Clock skew
Clock skew is the difference in clock arrival times: . Positive skew means the capturing flip-flop gets the edge later.
With skew the two constraints become
Reading the signs:
Positive skew gives the data more time to arrive, so it helps setup but hurts hold (the capture edge comes later, so fast new data has more chance to race in).
Negative skew does the opposite: it hurts setup and helps hold.
When the sign of skew is not known (it can vary with temperature or design), designers take the worst case for each check: subtract from the setup budget and add it to the hold requirement:
Maximum skew a path can tolerate for hold: .
Read each question carefully for how it defines skew; some define it as launch minus capture, which flips the signs.
5. Metastability and synchronisers
An asynchronous input (a push button, data from another clock domain) can change at any time, so it will sometimes violate setup or hold. The flip-flop can then become metastable.
Resolution: a metastable flip-flop eventually settles, and the chance that it is still unresolved after a waiting time falls exponentially, as , where is a time constant of the flip-flop.
Mean time between failures (one common model):
with the time allowed for resolution, a device constant (related to the aperture), the clock frequency and the rate of input changes. A small increase in raises MTBF enormously.
Two-flip-flop synchroniser: pass the asynchronous signal through two flip-flops in series on the destination clock. The first may go metastable, but it has almost a full clock period to resolve before the second samples it. This trades one cycle of latency for a very large MTBF.
A synchroniser does not prevent metastability; it only makes failures extremely rare.
Formulas to remember
Setup constraint
Maximum clock frequency
Hold constraintIndependent of the clock period
Setup with skew = capture clock arrival minus launch clock arrival
Hold with skew
Setup slack
Hold slack
Synchroniser MTBF
Common mistakes
Lowering the clock frequency to fix a hold violation; the hold condition does not contain the clock period.
Using the shortest path for setup or the longest for hold; setup uses the slowest path and maximum delays, hold uses the fastest path and minimum delays.
Getting the skew sign backwards; positive skew (capture clock later) helps setup and hurts hold.
Forgetting t_cq or t_su when finding the clock period; the period must cover clock-to-Q, logic delay and setup time.
Adding all pipeline stage delays for the clock period; the slowest single stage sets it.
Ignoring the feedback path from a flip-flop's own output to its input when finding the maximum frequency.
Worked examples
Try each step yourself, then reveal the working.
Example 1: Maximum clock frequency
numerical
A flip-flop has and . The longest combinational path between two such flip-flops is . Find the minimum clock period and the maximum frequency (no skew).
Step 1: Add the delays along the path.
Try it on paper first.
Example 2: A hold violation and its fix
numerical
A path has and shortest logic delay . The capturing flip-flop needs . Is there a hold violation? Will halving the clock frequency help? How much delay must be added?
Step 1: Compute the hold slack.
Try it on paper first.
Example 3: Effect of clock skew
numerical
For the path of the first example (, , , all in ns), the clock reaches the capturing flip-flop later than the launching one. The same path has , , and . Find the new maximum frequency and check hold.
Step 1: Identify the sign of the skew.
Try it on paper first.
Example 4: Several paths: pick the right one for each check
numerical
Between FF A and FF B there are two paths: an AND gate () followed by an XOR gate (), and a single inverter (). Take each gate delay as both its maximum and minimum. The flip-flops have , , , . Find and the hold slack.
Step 1: Choose the path for setup.
Try it on paper first.
Previous year questions
1 official GATE EC question on this topic, newest first.
9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.
Mark as mastered
Loading your progress…
My revision notes
Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.