Draft preview. Lessons are being written and reviewed.

Digital Design / Module 9: Static timing

49. The timing path

Compute slack by hand.

Lecture coming soon

Lab: Timing path lab

The idea

A chip's maximum frequency is set by its slowest path between flops. A signal leaves one flop at a clock edge, travels through logic, and must arrive at the next flop before the following edge. Static timing analysis (STA) checks every such path, without running any test vectors.

The setup check

All of these must fit within one clock period:

Tclk >= Tcq + Tcomb + Tsetup

Slack is the margin left over. Positive means the path passes, and negative means it fails.

Setup slack = Tclk - (Tcq + Tcomb + Tsetup)

Worked example

Given Tcq = 0.3 ns, Tcomb = 2.2 ns, and Tsetup = 0.5 ns:

  • The minimum period is 0.3 + 2.2 + 0.5 = 3.0 ns.
  • So fmax = 1 / 3.0 ns, which is about 333 MHz.
  • At a 3.5 ns clock, the slack is +0.5 ns. At 2.8 ns, it is -0.2 ns, a violation.

The hold check

New data launched at an edge must not reach the capture flop too soon, or it would corrupt the value being captured by that same edge.

Tcq + Tcomb >= Thold

The clock period isn't in this equation. With no logic between flops and a large , this can fail at any frequency.

Why STA instead of simulation

Simulation only checks the paths your tests exercise. STA examines all paths structurally, using the worst and best-case cell delays. On a chip with millions of flops, no realistic test set could do this. The trade-off is that STA doesn't know which paths can actually occur, so you must tell it about exceptions. The Constraints lesson covers this.

Common mistake

Using one set of delays for both checks. Setup is checked with the slowest conditions on the data path, and hold with the fastest. Real tools run many corners, covering process, voltage and temperature combinations. Move the sliders in the lab above to see both slack values respond.

Key ideas

  • Tclk >= Tcq + Tcomb + Tsetup (ideal clock).
  • Hold: Tcq + Tcomb >= Thold.
  • Slack is required time minus arrival time.

Your exercise

Find fmax with Tcq 0.3 ns, Tcomb 2.2 ns, Tsu 0.5 ns.

Interview questions

coreWhat's the fmax for that path?

basicWhat is setup slack, and what does its sign tell you?

basicTcq = 0.2 ns, Tcomb = 1.5 ns, Tsetup = 0.1 ns, and the clock period is 2.0 ns. What is the setup slack, and what is fmax for this path?

coreTwo flops are joined by a short wire: Tcq = 0.1 ns, Tcomb = 0.05 ns and Thold = 0.2 ns. Does the path meet hold? What happens if you lower the clock frequency?

coreWhy does the clock period appear in the setup check but not in the hold check?

coreA capture flop is fed by two paths from the same launch flop: one with 2.4 ns of logic and one with 0.05 ns. Tcq = 0.3 ns, Tsetup = 0.5 ns, Thold = 0.4 ns, and the period is 3.5 ns. Which path decides each check, and do they pass?

coreWhy do chip teams rely on static timing analysis instead of timing simulation to sign off timing?

advancedAt the slow corner, Tcq = 0.4 ns, Tcomb = 2.6 ns and Tsetup = 0.6 ns. At the fast corner, Tcq = 0.15 ns, Tcomb = 0.1 ns and Thold = 0.3 ns. What is fmax, and does hold pass?

advancedA path is launched on the rising edge and captured on the falling edge of a 4 ns clock. Tcq = 0.3 ns, Tcomb = 1.4 ns and Tsetup = 0.4 ns. Does it meet setup?

Practise these 9 questions with animations