S3 · Lesson 16 · Static timing analysis
Setup and hold slack, clock skew, uncertainty and the critical path
A chip with a billion gates can't be simulated with every input pattern to check its timing, so it isn't. Static timing analysis checks every path between registers with arithmetic instead: the latest a signal can arrive must be before the capturing edge minus setup time, and the earliest must be after the edge plus hold time. Two numbers come out per path, setup slack and hold slack, and a design meets timing when every one is positive. Clock skew helps one and hurts the other, which is why hold violations, unlike setup violations, can't be fixed by slowing the clock.
- One register-to-register path: setup slack (solid) and hold slack (dashed) against the clock skew, the amount by which the capturing flip-flop's clock arrives later than the launching one's.
- Positive skew gives the slow path more time, raising setup slack, but lets the fast path race through before the capturing flip-flop's hold window closes, lowering hold slack.
- Change the clock period: only the setup line moves. Hold slack doesn't depend on the period at all.
Predict
A path fails its hold check by 30 ps. Will lowering the clock frequency fix it?
No. A hold violation means a new value races from one flip-flop to the next within the same clock edge, before the capturing flip-flop has finished latching the old one. Both flip-flops see the same edge, so the period never enters the hold check. A chip with hold violations fails at every frequency; the fix is adding delay (buffers) to the short path, or reducing the skew.
Name it
The setup check
Data launched at one edge must arrive before the next capturing edge, less the setup time:
where is how much later the capture clock arrives than the launch clock, and covers jitter and margin. The critical path is the one with the least setup slack; it sets .
The hold check
Data launched at an edge must not reach the capturing flip-flop until after that same edge's hold window:
The clock period doesn't appear. Hold failures are fixed by inserting delay into short paths, which tools do automatically after the clock tree is built.
Skew
Skew trades setup for hold: positive skew (late capture) helps setup and hurts hold. Clock trees aim for near-zero skew; useful skew deliberately shifts clocks to borrow time across stages.
Exceptions
- Multicycle paths that are allowed N cycles get N·T in the setup check (and the hold check is usually moved accordingly).
- False paths that can never be exercised (between unrelated clocks, through mutually exclusive multiplexer settings) are excluded.
- On-chip variation: real analysis uses the launch path's slowest corner against the capture path's fastest, with derating.
Worked example
A path has = 50 ps, setup 30 ps, hold 20 ps, logic between 30 and 800 ps, a 1000 ps clock and +50 ps of skew. Find both slacks, then add 40 ps of clock uncertainty.
Show the solution
- Setup slack. The skew gives the capture edge 50 ps more time:
- Hold slack. The shortest path races the late capture edge: Barely passing, because the skew that helped setup hurt hold.
- Add 40 ps of uncertainty. The setup slack drops to +130 ps. Conservative tools also apply uncertainty to hold, which would make it −30 ps, needing buffers.
Answer +170 ps of setup slack and +10 ps of hold slack; with 40 ps of uncertainty, +130 ps for setup (and −30 ps for hold if the tool applies it there too).
Worked example
What's this path's maximum frequency with and without the skew? And if a slow divider is declared a 2-cycle multicycle path with 1700 ps of logic, does it pass at 1 GHz?
Show the solution
- Without skew.
- With +50 ps of useful skew.
- The multicycle path. It gets ps: so it passes, as long as the design really does wait two cycles for its result.
Answer 1.14 GHz without skew and 1.20 GHz with it; the multicycle path passes with +220 ps of slack.
Worked example
Stage 1 has 1100 ps of logic and stage 2 has 700 ps, both on a 1000 ps clock with 50 ps clock-to-Q and 30 ps setup. How much useful skew on the middle register makes both stages pass?
Show the solution
- Stage 1 slack. Delaying the middle register's clock by s gives stage 1
- Stage 2 slack.
- Choose s. Any s from 180 to 220 ps works; s = 200 ps leaves 20 ps on each.
- Check hold. The shift hurts stage 1's hold check by 200 ps, so its shortest path must exceed
Answer 180 to 220 ps of skew works; 200 ps leaves 20 ps of slack in each stage, provided stage 1's shortest path exceeds 170 ps.
Check
A path has period 1000 ps, clock-to-Q 40 ps, maximum logic 700 ps, setup 50 ps and skew −30 ps. What's its setup slack?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A path has clock-to-Q 40 ps, minimum logic 10 ps, hold 30 ps and skew 60 ps. What's its hold slack?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
With clock-to-Q 40 ps, logic 400 ps, setup 40 ps and 50 ps of useful skew, what's the maximum frequency?
Write units the way you normally would: 1.5 GHz, 1500 MHz and 0.0015 THz are the same answer.
Check
A path's hold slack is −25 ps. How many 15 ps delay buffers fix it?
Check
A path declared 3-cycle multicycle has 1400 ps of logic, clock-to-Q 50 ps, setup 30 ps, at a 500 ps period. What's its setup slack?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A path has 50 ps of setup slack before clock uncertainty. With 20 ps of uncertainty, what remains?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A path has 50 ps clock-to-Q, 30 ps setup and 20 ps hold; its logic takes 60 ps at least and 600 ps at most. The clock period is 800 ps, the capture clock arrives 50 ps after the launch clock, and 0 ps of uncertainty is reserved.
(a)
What is the setup slack?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
What is the hold slack?
Check
A path has clock-to-Q q, maximum logic L, setup s, capture-clock skew k and uncertainty u.
Step 1
What is the shortest clock period it passes at?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is its maximum frequency (per unit of time)?
Explain why
Why does clock skew help setup timing but hurt hold timing?
Skew here means the capturing flip-flop's clock edge arrives later than the launching flip-flop's. For the setup check, the data launched at one edge must arrive before the next capturing edge, and a later capturing edge gives the slow path more time, so slack improves. For the hold check, the data launched at an edge must not arrive at the capturing flip-flop until that flip-flop has finished latching the previous value at the same edge. If the capturing edge is late, the window during which the old value must stay stable extends further, so a fast path is more likely to overwrite it too soon. The same skew moves the two checks in opposite directions.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.