0.01.02.03.04.05.06.07.0nstiming bar: the delays of the path will appear here0.01.02.03.04.05.06.07.0nsFF1→FF2cqg1g2g3g4wirearrival 5.5 ns0.01.02.03.04.05.06.07.0nsrequired 4.6next tick 5.0FF1→FF2cqg1g2g3g4wire0.01.02.03.04.05.06.07.0nsrequired 4.6next tick 5.0FF1→FF2cqg1g2g3g4wireslack −0.9 nsstatic timing report · setup · 200 MHzpath arrival required slack FF1 → FF2 5.5 4.6 −0.9 ✗FF1 → FF3 0.6 4.6 +4.0 ✓worst negative slack (WNS): −0.9 ns → not closed0.01.02.03.04.05.06.07.0nsrequired 5.85next tick 6.25FF1→FF2cqg1g2g3g4wireslack +0.35 ns0.01.02.03.04.05.06.07.0nsrequired 4.6next tick 5.0FF1→FF2cqg1g2g3g4wireslack +1.0 ns0.01.02.03.04.05.06.07.0nsrequired 4.6next tick 5.0FF1→FF2cqg1g3g4wireslack +0.1 ns0.01.02.03.04.05.06.07.0nsrequired 4.6next tick 5.0FF1→FFpcqg1g2slack +2.1 nsFFp→FF2cqg3g4wireslack +1.1 ns0.00.20.40.60.81.0nshold time 0.5FF1→FF3cqwirehold slack −0.1 ns0.00.20.40.60.81.0nshold time 0.5FF1→FF3cqwirebufbufhold slack +0.3 nsQDDCLKabcdb1.0 ns1.0 ns1.0 ns1.0 ns1.0 ns01FF1ANDANDFFANDANDFF2FF30101
Glowing token: the new value racing along a path, in slow motionTiming bar: each delay as a segment against time (cq = clock-to-Q, g = gate)Dashed line: the required time; shaded strip: the setup or hold windowSlack box: green = time to spare, red = late (or too early, for hold)A value launched by flip-flop 1 must cross four AND gates and a long wire and settle before the next tick reaches flip-flop 2; the timing bar adds up the delays and shows the slack. Setup check for a path between two flip-flops: Tc ≥ tpcq + tpd + tsetup. Slack is how much room is left: required time (Tc − tsetup) minus arrival time (tpcq + tpd). Harris and Harris, Digital Design and Computer Architecture, section 3.5. Hold check: tccq + tcd ≥ thold, using the fastest delays. The clock period is not in it, so slowing the clock never fixes a hold violation; adding buffers to the short path does (Harris and Harris, section 3.5.2). Static timing analysis computes arrival and required times for every path from the cell and wire delays, with no test inputs, and reports the slack of each (Bhasker and Chadha, Static Timing Analysis for Nanometer Designs). AMD Vivado's timing summary reports the worst negative slack (WNS) for setup and the worst hold slack (WHS); the design meets timing when both are zero or more (UG906).

Paths and slack

  1. After synthesis and placement, a design is flip-flops joined by gates and wires. On a clock tick, a new value leaves one flip-flop and races through the gates to the next. It must get there before the following tick.

Checking every path

Fixing negative slack

Hold time

The timing sums

;; step 1/11 · paths
;; about: Flip-flop 1, Gates, Long wire, Flip-flop 2
flip-flop 1 → 4 AND gates → long wire → flip-flop 2

synthesis   turns your code into gates
placement   puts each gate on the chip
routing     draws the wires between them

Every flip-flop-to-flip-flop link is a
"path". A real design has millions.

The delays here (0.5 ns clock-to-Q, 1.0 ns per gate, 1.0 ns long wire, 0.4 ns setup, 0.5 ns hold) are round example numbers on the nanosecond scale of an FPGA design. Real tools read each cell's delays from the chip's timing library and also add clock skew and uncertainty, which this example leaves at zero. The example hold time (0.5 ns) is set above the fastest clock-to-Q (0.3 ns) so the short path fails; real flip-flops are usually built with clock-to-Q longer than the hold time, so two flip-flops joined by a bare wire normally pass hold, and real hold failures mostly come from clock skew (Harris and Harris, sections 3.5.2 and 3.5.3). In Python, 200e6 is 200 × 10⁶ (200 MHz), so 1 / 200e6 is the period in seconds and × 1e9 turns it into nanoseconds.