Draft preview. Lessons are being written and reviewed.

Digital Design / Module 9: Static timing

50. Clock skew and jitter

Add a real clock to the equation.

Lecture coming soon

Lab: Timing path lab

The idea

So far, we have assumed that the clock reaches every flop at the same instant. Real clocks don't, and this changes both timing checks.

Skew

Skew is the difference in arrival time between the launch flop and capture flop. Define it as capture arrival minus launch arrival.

  • Setup: Tclk + Tskew >= Tcq + Tcomb + Tsetup
  • Hold: Tcq + Tcomb >= Thold + Tskew

Positive skew (capture clock arrives late) gives setup more time and makes hold harder. Negative skew does the opposite. It's the same number with opposite effects on the two checks.

Worked example

Using Tcq = 0.3, Tcomb = 2.2, Tsetup = 0.5, and Tclk = 2.9 ns, the setup is -0.1 ns. Add 0.2 ns of positive skew, and the slack becomes +0.1 ns. If Thold = 0.1 and the path has Tcomb = 0, hold slack goes from 0.3 - 0.1 = +0.2 ns to 0.3 - 0.1 - 0.2 = 0 ns. Some designers deliberately add delay this way, which is called useful skew. The next path, however, loses what this path gains.

Jitter

Jitter is variation in the clock edge timing from cycle to cycle, caused by things like PLL noise and supply noise. It can't be planned around, so we subtract it from setup margin. Since hold compares launch and capture at the same edge, cycle-to-cycle jitter has little effect there.

Uncertainty

Timing tools combine jitter and margin into one number, set by set_clock_uncertainty:

create_clock -name clk -period 2.0 [get_ports clk]
set_clock_uncertainty 0.1 [get_clocks clk]

Where skew comes from

Clock tree synthesis balances wire and buffer delays across the chip, but it can never be perfect. Local variation means that two identical paths still differ. Tools account for this using on-chip variation margins.

Common mistake

Getting the sign wrong. Picture it rather than memorising it: the capture clock arriving later gives data more time to arrive (setup improves), and it also keeps the capture flop looking for longer, so new data can sneak in (hold gets worse).

Key ideas

  • Useful skew helps setup on one path and hurts the next.
  • Positive skew hurts hold.
  • Jitter reduces setup margin.

Your exercise

Recalculate slack with 0.2 ns of positive skew.

Interview questions

corePositive skew's effect on setup and hold?

basicWhat is the difference between clock skew and clock jitter?

basicTclk = 2.0 ns, Tcq = 0.2 ns, Tcomb = 1.6 ns and Tsetup = 0.2 ns. What is the setup slack with no skew, and with 0.1 ns of positive skew (capture clock late)?

coreTcq = 0.2 ns, Tcomb = 0.1 ns, Thold = 0.1 ns. What is the hold slack with no skew, and with 0.25 ns of positive skew?

corePath A to B has -0.15 ns setup slack, and path B to C has +0.3 ns. How could useful skew fix this, and what do you have to recheck?

coreWhy does cycle-to-cycle jitter reduce setup margin but hardly affect hold?

coreA 2.0 ns clock has 0.1 ns of clock uncertainty set in constraints. A path needs Tcq + Tcomb + Tsetup = 1.95 ns. Does it pass?

advancedIn a long shift register with no logic between flops, the clock tree happens to deliver the clock later to each successive flop. Why is this risky?

advancedFor a flop-to-flop path with no logic, Tcq = 0.12 ns and Thold = 0.05 ns. What is the largest positive skew the path can tolerate?

Practise these 9 questions with animations