Slack in static timing analysis is the margin by which a timing path meets its requirement: for setup it is required time minus arrival time, for hold it is arrival time minus required time. Positive or zero slack means the path meets timing; negative slack is a violation. This post defines both kinds with a stated skew convention, works through a path report with numbers, and explains WNS and TNS.
Key takeaways
- Setup slack = required time - arrival time. Hold slack = arrival time - required time.
- Slack >= 0 passes. Slack < 0 is a violation.
- Setup slack depends on the clock period; hold slack does not for same-edge paths.
- The critical path is the path with the worst (smallest) setup slack.
- WNS is the worst slack in the design; TNS is the sum of all negative endpoint slacks.
Definition
Slack is defined as the difference between the required arrival time of a signal and its actual arrival time.
It should be always >= zero.
It is also defined as the difference between the clock period and the total path delay from one flop to the other flop, which includes the clock to Q delay of the source flop, the total combinational delay between the flops and the setup time of the destination flop.
Slack related problems will arise for the critical paths in the design, i.e. nothing but the max delay paths: clock to Q delay + propagation delay + setup of the destination flop.
In any design slack should always be +ve. If it is negative it means there is a timing violation, that is, a setup or a hold requirement is not met, and it gets difficult to achieve the required frequency.
A slack of exactly zero also meets timing, with no margin left.
Arrival time and required time
Sign convention used in this post: tskew = clock arrival at the capturing flop minus clock arrival at the launching flop. Times are measured from the ideal launch clock edge at 0.
| Term | Setup analysis | Hold analysis |
|---|---|---|
| Arrival time (data) | launch clock latency + tcq,max + tcomb,max | launch clock latency + tcq,min + tcomb,min |
| Required time | T + capture clock latency - tsetup - uncertainty | capture clock latency + thold + uncertainty |
| Slack | required - arrival | arrival - required |
With zero clock uncertainty and latencies folded into skew, these reduce to:
setup slack = (T + tskew - tsetup) - (tcq,max + tcomb,max)
hold slack = (tcq,min + tcomb,min) - (thold + tskew)
When skew is zero, setup slack is exactly the second definition above: clock period minus (clock-to-Q + combinational delay + setup time).
Worked example: reading a setup path report
Below is a simplified path report in the style STA tools print, for a 1.00 ns clock (1 GHz). The values are illustrative.
Startpoint: FF1 (rising edge clock CLK)
Endpoint: FF2 (rising edge clock CLK)
Path type: max (setup)
Point Incr Path
------------------------------------------------
clock CLK (rise edge) 0.000 0.000
clock network delay 0.120 0.120
FF1/CK -> FF1/Q 0.090 0.210
U10/Y (NAND2) 0.140 0.350
U22/Y (AOI21) 0.210 0.560
U31/Y (BUF) 0.180 0.740
FF2/D 0.020 0.760
data arrival time 0.760
clock CLK (rise edge) 1.000 1.000
clock network delay 0.150 1.150
clock uncertainty -0.050 1.100
FF2 setup -0.060 1.040
data required time 1.040
------------------------------------------------
slack (MET) 0.280
- Arrival: launch latency 0.120 + clock-to-Q 0.090 + logic and wire 0.550 = 0.760 ns.
- Required: period 1.000 + capture latency 0.150 - uncertainty 0.050 - setup 0.060 = 1.040 ns.
- Slack: 1.040 - 0.760 = +0.280 ns. Skew here is 0.150 - 0.120 = +0.030 ns, which helps setup.
- If the clock were tightened to 0.70 ns, required would be 0.740 ns and slack -0.020 ns: a violation.
Worked example: hold slack on the same pair of flops
Suppose the fastest path from FF1 to FF2 has tcq,min = 0.070 ns and tcomb,min = 0.040 ns, FF2 has thold = 0.030 ns, and hold uncertainty is 0.020 ns.
- Arrival: 0.120 + 0.070 + 0.040 = 0.230 ns.
- Required: 0.150 + 0.030 + 0.020 = 0.200 ns.
- Hold slack: 0.230 - 0.200 = +0.030 ns. Met, and it does not change with the clock period.
WNS, TNS and the critical path
STA tools report slack per endpoint (the D pin of a flop or an output port) using the worst path into it. Two summary numbers follow:
- WNS (worst negative slack): the smallest slack over all endpoints. The path behind it is the critical path.
- TNS (total negative slack): the sum of the slacks of all endpoints whose slack is negative. It shows how widespread the problem is.
| Endpoint | Worst setup slack (ns) | Counts towards TNS? |
|---|---|---|
| FF2/D | -0.12 | Yes |
| FF7/D | -0.05 | Yes |
| FF9/D | +0.30 | No |
| OUT1 | -0.02 | Yes |
WNS = -0.12 ns, TNS = -0.12 - 0.05 - 0.02 = -0.19 ns, and there are 3 violating endpoints. A design with a small WNS but a large TNS has many near-critical paths and is usually harder to close than one with a single bad path.
How to improve negative slack
- Setup: restructure or pipeline logic, upsize or swap to faster cells, buffer heavily loaded nets, reduce wire length through placement, or use useful skew. As a last resort, relax the frequency.
- Hold: add delay cells on the short path or reduce skew, then recheck setup.
- Constraints: make sure the path is real. A false path or a multicycle path that is not declared shows up as false negative slack.
Related reading
- Setup time and hold time: equations and worked examples
- Contamination delay and hold time
- Wire load models for pre-layout timing
- Multicycle paths and false paths in static timing analysis
- The Semiconductor Hub glossary: slack and critical path
Frequently asked questions
What is slack in STA?
The difference between when a signal is required and when it actually arrives. Positive or zero slack meets timing; negative slack is a violation.
What is the difference between setup slack and hold slack?
Setup slack is required time minus arrival time on the slowest path and depends on the clock period. Hold slack is arrival time minus required time on the fastest path and does not depend on the period for same-edge paths.
Is zero slack acceptable?
Yes, zero slack meets the constraint, but it leaves no margin for variation, so teams often aim for a small positive target.
What do WNS and TNS mean?
WNS is the worst negative slack across all endpoints. TNS is the sum of the negative slacks of all violating endpoints.
How do you calculate the maximum frequency from slack?
For the critical setup path, the minimum period is the current period minus the setup slack. With a 1.00 ns period and +0.28 ns slack, the path could run at 0.72 ns, about 1.39 GHz, before other effects are considered.

Your comments will be moderated before it appears here.