S316 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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?

Name it

The setup check

Data launched at one edge must arrive before the next capturing edge, less the setup time:

slacksetup=(T+tskew−tunc)−(tclk-q+tlogic,max+tsetup)

where tskew is how much later the capture clock arrives than the launch clock, and tunc covers jitter and margin. The critical path is the one with the least setup slack; it sets fmax.

The hold check

Data launched at an edge must not reach the capturing flip-flop until after that same edge's hold window:

slackhold=(tclk-q+tlogic,min)−(thold+tskew)

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 tclk-q = 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
  1. Setup slack. The skew gives the capture edge 50 ps more time: S=(1000+50)−(50+800+30)=+170ps
  2. Hold slack. The shortest path races the late capture edge: S=(50+30)−(20+50)=+10ps Barely passing, because the skew that helped setup hurt hold.
  3. 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
  1. Without skew. f=1(50+800+30)ps=1.14GHz
  2. With +50 ps of useful skew. f=1830ps=1.20GHz
  3. The multicycle path. It gets 2×1000 ps: S=2000−(50+1700+30)=+220ps 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
  1. Stage 1 slack. Delaying the middle register's clock by s gives stage 1 S1=1000+s−1180=s−180
  2. Stage 2 slack. S2=1000−s−780=220−s
  3. Choose s. Any s from 180 to 220 ps works; s = 200 ps leaves 20 ps on each.
  4. Check hold. The shift hurts stage 1's hold check by 200 ps, so its shortest path must exceed 20+200−50=170ps

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°.

Explain why

Why does clock skew help setup timing but hurt hold timing?

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.