Exercises — Setup and hold time constraints
This page is a self-testing ladder. Every symbol here was built in the parent note; if any term feels new, re-read that note first. We will lean on two boxed results the whole way:
Reading a timeline figure (do this once): below is the mental picture every problem uses. The launching edge (at FF1) sits at time . New data appears at FF2's input somewhere in the middle. The capturing edge (at FF2) sits at . The last sliver before (width ) and the first sliver after (width ) are the two forbidden "keep-still" windows.

Look at the red band: that is the setup keep-still window we must not let data spill into. The labels on the figure — the two clock edges, the data-arrival arrow, and the two window widths and — are the whole vocabulary. Everything below is just arithmetic about which arrow lands where.
Level 1 — Recognition
Recall Solution 1.1
WHAT: The setup constraint contains ; the hold constraint does not. WHY: Setup is a race across a whole period — data launched by this edge must land before the next edge at time . Hold is a race within one edge — new data vs. the same flip-flop's own keep-still window — so cancels out. Consequence:
- Setup failure → make bigger (slow the clock).
- Hold failure → is irrelevant; add delay (buffers) on the fast path.
Recall Solution 1.2
Setup: we fear data arriving too late, so we test the slowest (propagation) path → use , . Hold: we fear data arriving too early and corrupting the current capture, so we test the fastest (contamination) path → use , .
Level 2 — Application
Recall Solution 2.1
Step 1 — pick the constraint. Frequency is limited by setup (the one with ).
Step 2 — build the period from the timeline. Trace one edge: after the launching edge, Q at FF1 needs to appear, then the signal needs to cross the logic, and then FF2 needs the data to sit still for before the capture edge. Those three durations happen back-to-back inside one period and must all fit before the next edge — so their sum is the smallest period that still fits:
That is why we add exactly these three terms: they are the only things consuming time between one edge and the reserved setup window of the next.
Step 3 — invert (because ; a shorter period means more edges per second):
Recall Solution 2.2
Step 1 — earliest data change at FF2's input after the edge. We use the fastest (contamination) numbers because the earliest possible disturbance is the danger: Step 2 — compare to : FF2 needs its input frozen for after the edge, so we need . It is not → HOLD VIOLATION (margin ns). Step 3 — fix by lengthening the fast path so the earliest change lands after the hold window, :
Level 3 — Analysis
Recall Solution 3.1
Step 1 — start from the setup inequality: . Step 2 — rearrange, and read what it means. We want the smallest that still satisfies this, so we move to the right-hand side (subtract it from both sides) and treat the inequality at its tightest (equality): Physical meaning of the minus: a later capture edge (positive skew) is like being handed extra free time on top of the period. So the period itself no longer has to cover the full delay sum — skew donates of it. Numerically: Compare: zero-skew ns → MHz. Positive capture skew relaxes setup (the capture edge is later, giving data more time), so rises. Look at the figure: pushing the capture edge right widens the usable arrival region.

Recall Solution 3.2
Zero skew: earliest change (contamination path) is ; need . ✓ Safe, margin ns. Skew : hold becomes . A later capture edge stretches the keep-still window further into the future, so the fast data must arrive even later. Check: ? No → now VIOLATED, margin ns. Fix: add with ns. Insight: the same skew that gave us free speed in 3.1 broke hold here. Skew is a trade, never free.
Level 4 — Synthesis
Recall Solution 4.1
Step 1 — period from frequency: ns. Step 2 — rearrange setup for the logic budget. The setup rule says the three durations (, , ) must fit inside . Solving for the one unknown means subtracting the two fixed terms from the period — whatever is left over is all the time the logic is allowed to spend: (a) Budget ns. (b) Actual ns ns → fails setup. Slack ns (negative = violation). You must cut ns of logic delay (or slow the clock, or add skew).
Recall Solution 4.2
Hold side (lower bound on the fast/contamination path). Rearranging the hold rule for the unknown fast delay means subtracting the fixed from — the fast path must be at least long enough to cover the leftover: Setup side (upper bound on the slow/propagation path): ns (from 4.1). Window: logic must satisfy . Since , the window is non-empty → a valid design exists. (If the lower bound had exceeded the upper bound, no single logic block could satisfy both, and you'd need clock-tree or buffer surgery.)
Level 5 — Mastery
Recall Solution 5.1
(a) Hold with skew: requirement is : Hold now passes (margin ns). Negative capture skew shrinks the effective hold window — the mirror image of positive skew in Ex 3.2. (b) Setup with the same skew: : is false → setup now fails (margin ns). Verdict: negative skew traded a hold failure for a setup failure. The path does not pass both. Buffers on the fast path (which touch only hold) would have been the clean fix.
Recall Solution 5.2
Setup slack (available time) (required time), and jitter steals from the available period, so we subtract it too: (Without the jitter charge it would have been ns — jitter ate ns of margin.) Hold slack (earliest data change, contamination path) (required hold): Sign-off: setup margin shrank to ns once jitter was charged; hold margin is ns. Both pass, but both are razor-thin — any extra variation tips either into violation. Flag for a small buffer (hold) and margin review (setup). Look at the slack picture: setup slack is the gap before the red band; hold slack is the gap after the edge.

Recall Feynman recap
Every problem on this page is one of two questions. "Did the note arrive before the next clap?" → setup, involves the period , fix by clapping slower / trimming logic / positive capture skew. "Did we hold the note long enough after this clap?" → hold, no , fix by holding longer (buffers) — and beware skew, which quietly changes the shape of the keep-still window in opposite directions for the two checks.
Connections
- Setup and hold time constraints — parent note; all formulas are derived there.
- Static Timing Analysis (STA) — the tool that computes these slacks automatically across corners.
- Clock Skew and Jitter — the source of the term and the penalty we used above.
- Combinational Logic Delay — where (contamination) and (propagation) come from.
- Metastability — what a violated keep-still window produces.
- Pipelining — why two flip-flops with logic between them (FF1, FF2) is the canonical setup/hold picture.