3.5.9 · D4HDL & Digital Design Flow

Exercises — Timing analysis basics (static timing)

4,053 words18 min readBack to topic

Here is the flip-flop's clock-to-Q delay (how long after the clock edge the output changes), is the combinational logic delay along a path, / are setup / hold times, is the clock period, and is the clock skew (how much later the capturing flop's clock arrives than the launching flop's — it can be negative if the capture clock arrives earlier).

The one picture we keep returning to — a signal launched by FF1, running through logic, and needing to be settled at FF2 before its next edge:

Figure — Timing analysis basics (static timing)

Level 1 — Recognition

Goal: pick the right formula and the right path (max vs min).

Recall Solution L1.1

Setup → longest path. Setup fears data arriving too late; the slowest route (the propagation delay, ) is the latest arrival. Hold → shortest path. Hold fears data arriving too early and corrupting the capture at the same edge; the fastest route (the contamination delay, ) is the earliest disturbance.

Recall Solution L1.2

Setup constraint at equality: .

Recall Solution L1.3

False. The hold equation contains no . Hold is a same-edge race; the clock period is irrelevant to it.


Level 2 — Application

Goal: plug numbers into setup, hold, slack, and .

Recall Solution L2.1

ns.

Recall Solution L2.2

Arrival (required by data) ns. Setup slack fails by 0.5 ns. The deadline (6.5 ns) arrives before the data can settle (7.0 ns).

Recall Solution L2.3

Earliest arrival ns. Hold slack hold violation. New data races to FF2 in 0.35 ns but must stay away until 0.5 ns after the edge.


Level 3 — Analysis

Goal: reason about skew (both signs), and about which path each violation lives on.

Recall Solution L3.1

Start from the formula and substitute term by term: At the slack was , so . Adding skew only touches the term: Positive skew helps setup — because it enters with a sign, a later capture edge pushes the deadline back, giving data more time.

Recall Solution L3.2

Substitute into the hold-slack formula term by term: Here appears inside a subtraction, so it enters slack with a sign. At the slack was ; adding of skew subtracts : → now a hold violation. Positive skew hurts hold: delaying the capture edge means the old value must be held longer, so early-arriving new data corrupts it. Same , opposite signs in the two formulas — that is the whole asymmetry. See the arrows below.

Figure — Timing analysis basics (static timing)
Recall Solution L3.3

Negative skew flips both signs relative to L3.1–L3.2. Substitute : Negative skew hurts setup (deadline pulled earlier, less time — slack shrank) and helps hold (the old value need be held for less time — slack grew). This is the exact mirror of positive skew. Both paths still pass here, but you can see the trade run in the opposite direction.

Recall Solution L3.4

Slowing the clock only relaxes setup (it enlarges ). Since the failure vanished, it was a setup violation, living on the longest / critical path (). A hold failure would have been unaffected.


Level 4 — Synthesis

Goal: choose and size a fix, not just detect a problem.

Recall Solution L4.1

Current hold slack ns. We need to add at least ns of delay. Buffers needed buffers (adding exactly ns → new slack ns, which passes at ). Note we add delay to the data path, never slow the clock — hold is -independent.

Recall Solution L4.2

Setup slack → still passes. Because the buffers sit on the short path only, the critical (long) path is untouched, so the setup fix is not disturbed.

Recall Solution L4.3

Arrival ns. We need , i.e. (so MHz gives margin).


Level 5 — Mastery

Goal: integrate everything, including the physical why, edge cases, and the timing exceptions (multi-cycle and false paths).

Recall Solution L5.1

(a) Setup: . Even with no logic, the register overhead sets a floor on the period. (b) Hold: ns; require ns → hold FAILS by 0.2 ns. Back-to-back flops are the classic hold-violation shape: the new value shoots through in just , faster than the old value can be captured. Real libraries guarantee or insert delay to prevent exactly this — this is why metastability and hold are cousins.

Recall Solution L5.2

(a) Setup slack . Set : So the minimum positive skew that rescues setup is ns (setup slack becomes exactly ). (b) With ns, hold slack drops by that same amount (it enters hold with a sign): Here we bought the setup fix with skew and the hold path had enough cushion (0.5 ns) to absorb the 0.2 ns cost. This is useful skew — a real optimization, but only safe when hold margin can afford it. Had the hold slack started below ns, this same skew would have created a hold violation.

Recall Solution L5.3

Setup slack ✅ Hold slack ✅ Both positive → the path signs off. This is what a passing STA report row looks like.

Recall Solution L5.4

(a) With : Setup slack ns ✅ (barely). Hold slack ns ❌. (b) Add to the route. Since it is the same wire for both checks, becomes in both formulas: The only value satisfying both is ns exactly — a razor edge with zero margin on either side. Any real-world variation (a slightly faster or slower buffer, temperature drift) tips one check negative. Buffering trades hold slack for setup slack on the same wire, so on a single shared route it can never create margin for both at once. The real fix: restructure the logic so the fast and slow concerns live on different physical routes, or pipeline to shorten the long path, or retime the flops. See Critical path and pipelining.

Recall Solution L5.5

Arrival (data required time) ns. (a) Single-cycle setup slack → fails badly. (b) With a 3-cycle exception the deadline is ns: setup slack passes. The path was never actually broken; the default one-cycle assumption was wrong for it. (c) No. Hold is still evaluated at a near edge (by default one cycle from launch), so the MCP does not loosen hold — you must still satisfy . Forgetting this is the classic MCP hold trap.

Recall Solution L5.6

Once the false path is excluded, the true critical path sets the period: ns. The chip was always capable of ~167 MHz; the false path was a phantom limit. Caveat: marking a path false is a promise that it truly cannot toggle — if that promise is wrong, silicon fails while STA reports "clean."


Recall

Recall Minimum

when there is zero combinational logic — the register overhead alone sets a floor; logic delay only adds to it.

Recall How do you fix a hold violation, and how many buffers?

Add delay to the short data path (never slow the clock). Number of buffers .

Recall What must both be true for a path to sign off?

Setup slack and hold slack — two separate checks on two path extremes.

Recall What does negative skew (capture clock early) do?

Opposite of positive skew: it hurts setup (deadline pulled earlier) and helps hold (old value held for less time).

Recall What is a multi-cycle path, and does it relax hold?

A path the designer allows cycles instead of 1, so setup deadline becomes . It does not relax hold — hold is still checked at the default near edge.

Recall What is a false path?

A structurally-present route that can never carry a real transition; the designer marks it so STA ignores it, preventing a phantom path from limiting .

Recall Difference between

and ? = contamination (fastest) delay, used for hold; = propagation (slowest) delay, used for setup.

Connections