Why Static Timing Analysis
Learn what static timing analysis checks, what it needs and what it cannot see, from a first OpenSTA run.
You Will Be Able To
- Explain why a passing simulation does not prove a clock speed.
- Name the four inputs of a timing run and the output it gives.
- Read the slack of a first OpenSTA run and predict its sign.
- List the problems that STA cannot find.
- Lesson
- T1.1
- Time
- 25 min
- Runs on
- OpenROAD
- Check
- 5 questions
An RTL simulation of a two-flop block passes at any clock period you choose, because RTL has no gate delays. The same block in real cells needs 0.3789 ns to move data from one flop to the next. At a 0.3 ns clock, static timing analysis reports a slack of -0.1671 ns, with no test vector at all.
ff1 → ff2setup check, latest arrival3 cells
- Clock latency
- Cell delay
- Setup time
- Launch at 0 ns
The clock edge at 0 ns makes ff1 send new data toward ff2 through the two gates.
- Data arrives
The clock-to-Q delay of ff1 and the delays of the two gates add up to 0.3789 ns.
- Required time
The next edge comes at 0.3 ns. ff2 needs D 0.0882 ns before it, so the required time is 0.2118 ns.
- VIOLATED
Slack = 0.2118 − 0.3789 = -0.1671 ns.
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 0.3000 ns, latency 0.0000 ns, library setup time −0.0882 ns.
Arrival 0.3789 ns, required 0.2118 ns, slack −0.1671 ns (violated).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | ff1/CLK → ff1/Q | dfxtp_1 | fall | 0.3082 | 0.3082 | 0.0249 |
ff1/Q → u1/A | wire q1 | fall | 0.0000 | 0.3082 | 0.0249 | |
| 2 | u1/A → u1/Y | inv_1 | rise | 0.0376 | 0.3459 | 0.0299 |
u1/Y → u2/A | wire n1 | rise | 0.0000 | 0.3459 | 0.0299 | |
| 3 | u2/A → u2/Y | nand2_1 | fall | 0.0330 | 0.3789 | 0.0233 |
u2/Y → ff2/D | wire n2 | fall | 0.0000 | 0.3789 | 0.0233 |
The report
Startpoint: ff1 (rising edge-triggered flip-flop clocked by clk)
Endpoint: ff2 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ ff1/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0022 0.0249 0.3082 0.3082 v ff1/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0249 0.0000 0.3082 v u1/A (sky130_fd_sc_hd__inv_1)
1 0.0024 0.0299 0.0376 0.3459 ^ u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0299 0.0000 0.3459 ^ u2/A (sky130_fd_sc_hd__nand2_1)
1 0.0017 0.0233 0.0330 0.3789 v u2/Y (sky130_fd_sc_hd__nand2_1)
n2 (net)
0.0233 0.0000 0.3789 v ff2/D (sky130_fd_sc_hd__dfxtp_1)
0.3789 data arrival time
0.1000 0.3000 0.3000 clock clk (rise edge)
0.0000 0.3000 clock network delay (ideal)
0.0000 0.3000 clock reconvergence pessimism
0.3000 ^ ff2/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0882 0.2118 library setup time
0.2118 data required time
-------------------------------------------------------------------------------------
0.2118 data required time
-0.3789 data arrival time
-------------------------------------------------------------------------------------
-0.1671 slack (VIOLATED)OpenSTA 3.1.0 on the sky130 tt library, ideal clock with a 0.1 ns slew, no wires.
An RTL simulator could never show this failure, because it has no delays to add up.
One Stimulus or Every Path
An RTL simulator applies values to the inputs and computes the outputs at each clock edge. It shows the function of the design, but it does not know how long a real gate takes. So the waveform looks the same at any clock period.
- Cycle 1
ff1 captures a at the edge. In RTL, its Q changes at the edge itself, with zero delay.
- Cycle 2
The inverter and the NAND also take zero time, so ff2/D is ready at once.
- Cycle 5
The function is right at every period. The waveform says nothing about speed.
Logic values only, as an RTL simulator shows them. Real cells add delay, which this view cannot show.
A gate-level simulation adds cell delays, but it still checks only the paths that its test vectors happen to toggle. Static timing analysis (STA) works in a different way and uses no test vectors at all. Static means the answer does not depend on any input pattern: each path gets its worst delay. It adds up the worst delay along every path, from each startpoint to each endpoint. Then it compares that delay with the clock period.
A startpoint is where a timing path begins: a flop's clock pin or an input port. An endpoint is where it ends: a flop's data pin or an output port. Even a small block has many paths, and a large chip has millions. STA checks all of them in one run: seconds for a block, hours for a large chip.
| Question | Simulation | Static timing analysis |
|---|---|---|
| What does it check? | The function: the right value in the right cycle | The timing: every path arrives in time |
| Which paths? | Only the paths the stimulus toggles | Every path, with or without a test |
| What does it need? | A testbench and stimulus | The netlist, cell timing, the clocks and the wires |
| What does it give? | A waveform and a pass or fail | A slack at every endpoint |
The two methods answer different questions, so every chip needs both of them.
What a Timing Run Needs
STA reads four inputs and gives one main result for each endpoint. That result is the slack: how much earlier than needed the data arrives. A positive slack means the path meets the clock; a negative slack means it fails.
- File
- Constraint
- Tool
- Report
- Data
- Structure and cell delays
The netlist says which pins connect. The Liberty file says how long each cell takes for a given input slew and load.
- The clocks
The SDC file says when the clock edges come. Without it, no path has a required time.
- The wires
After routing, a SPEF file adds each wire's resistance and capacitance.
- What comes out
A slack for every endpoint, and a list of what could not be timed.
Read the diagram as text
- Netlist: cells and their wires (Verilog)
- Liberty: delay and check tables per cell
- SDC: clocks, I/O delays, exceptions
- Parasitics (SPEF): wire R and C, after routing
- OpenSTA: arrival, required, slack
- Slack per endpoint: setup and hold, WNS, TNS
- check_setup: what was not timed
- Netlist → OpenSTA: structure
- Liberty → OpenSTA: cell delays
- SDC → OpenSTA: clocks
- Parasitics (SPEF) → OpenSTA: wire delays
- OpenSTA → Slack per endpoint: report
- OpenSTA → check_setup: gaps
A missing input does not stop the run: it removes paths from the report.
Delete the SDC and run path2 again. OpenSTA still runs, but it times no path at all. check_setup lists 2 clock pins with no clock, the two flops' CLK pins. A tool that cannot time a path does not report it as failing; it simply leaves the path out.
Four Kinds of Path
Every timing path starts at a flop or an input port and ends at a flop or an output port. That gives four kinds. Engineers name them by their ends, and each kind needs different constraints.
| Kind | Example in paths4 | Setup slack (ns) | Needs in the SDC |
|---|---|---|---|
| Input port to flop | in → f1 | 1.4014 | A clock and set_input_delay |
| Flop to flop (the clock's own group) | f1 → f2 | 1.5458 | A clock |
| Flop to output port | f2 → out | 1.1302 | A clock and set_output_delay |
| Input port to output port | in2 → out2 | 0.9834 | Both I/O delays |
The block paths4 at a 2 ns clock with 0.5 ns I/O delays, one path group per kind (T2.3 explains group_path).
The input-to-output path from in2 to out2 has one NAND gate, yet it is the tightest. Its budget is what the two I/O delays leave of the period: 2 − 0.5 − 0.5 = 1 ns.
A First Run: Slack
Give path2 a 2 ns clock. ff1 launches data at the edge at 0 ns. The data reaches ff2/D after clock-to-Q (0.3082 ns) and two gates (0.0707 ns). ff2 must see it 0.0882 ns before the next edge: that is ff2's setup time.
ff1 → ff2setup check, latest arrival3 cells
- Clock latency
- Cell delay
- Setup time
- Clock to Q
ff1's output Q changes 0.3082 ns after the clock edge reaches its CLK pin.
- Two gates
The inverter and the NAND add 0.0707 ns. Data arrives at 0.3789 ns.
- Required time
2 ns − 0.0882 ns of setup = 1.9118 ns.
- MET
Slack = 1.9118 − 0.3789 = 1.5329 ns.
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 2.0000 ns, latency 0.0000 ns, library setup time −0.0882 ns.
Arrival 0.3789 ns, required 1.9118 ns, slack 1.5329 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | ff1/CLK → ff1/Q | dfxtp_1 | fall | 0.3082 | 0.3082 | 0.0249 |
ff1/Q → u1/A | wire q1 | fall | 0.0000 | 0.3082 | 0.0249 | |
| 2 | u1/A → u1/Y | inv_1 | rise | 0.0376 | 0.3459 | 0.0299 |
u1/Y → u2/A | wire n1 | rise | 0.0000 | 0.3459 | 0.0299 | |
| 3 | u2/A → u2/Y | nand2_1 | fall | 0.0330 | 0.3789 | 0.0233 |
u2/Y → ff2/D | wire n2 | fall | 0.0000 | 0.3789 | 0.0233 |
The report
Startpoint: ff1 (rising edge-triggered flip-flop clocked by clk)
Endpoint: ff2 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ ff1/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0022 0.0249 0.3082 0.3082 v ff1/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0249 0.0000 0.3082 v u1/A (sky130_fd_sc_hd__inv_1)
1 0.0024 0.0299 0.0376 0.3459 ^ u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0299 0.0000 0.3459 ^ u2/A (sky130_fd_sc_hd__nand2_1)
1 0.0017 0.0233 0.0330 0.3789 v u2/Y (sky130_fd_sc_hd__nand2_1)
n2 (net)
0.0233 0.0000 0.3789 v ff2/D (sky130_fd_sc_hd__dfxtp_1)
0.3789 data arrival time
0.1000 2.0000 2.0000 clock clk (rise edge)
0.0000 2.0000 clock network delay (ideal)
0.0000 2.0000 clock reconvergence pessimism
2.0000 ^ ff2/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0882 1.9118 library setup time
1.9118 data required time
-------------------------------------------------------------------------------------
1.9118 data required time
-0.3789 data arrival time
-------------------------------------------------------------------------------------
1.5329 slack (MET)OpenSTA 3.1.0, sky130 tt library, ideal 2 ns clock, no wires.
Slack is required time minus arrival time. The required time moves with the clock period, because it hangs on the next clock edge. The arrival time does not move, because the cells and wires alone decide it. That is why a faster clock turns a passing path into a failing one.
STA also checks the other side, hold. New data must not reach ff2 so fast that it corrupts the value ff2 is capturing at the same edge. For hold the subtraction turns round: hold slack = arrival − (capture edge + hold time). Here it is 0.4033 ns.
The hold check of the same path
ff1 → ff2hold check, earliest arrival3 cells
- Clock latency
- Cell delay
- Hold time
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 0.0000 ns, latency 0.0000 ns, library hold time −0.0205 ns.
Arrival 0.3828 ns, required −0.0205 ns, slack 0.4033 ns (met).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | ff1/CLK → ff1/Q | dfxtp_1 | rise | 0.3171 | 0.3171 | 0.0388 |
ff1/Q → u1/A | wire q1 | rise | 0.0000 | 0.3171 | 0.0388 | |
| 2 | u1/A → u1/Y | inv_1 | fall | 0.0303 | 0.3474 | 0.0188 |
u1/Y → u2/A | wire n1 | fall | 0.0000 | 0.3474 | 0.0188 | |
| 3 | u2/A → u2/Y | nand2_1 | rise | 0.0354 | 0.3828 | 0.0281 |
u2/Y → ff2/D | wire n2 | rise | 0.0000 | 0.3828 | 0.0281 |
The report
Startpoint: ff1 (rising edge-triggered flip-flop clocked by clk)
Endpoint: ff2 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: min
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ ff1/CLK (sky130_fd_sc_hd__dfxtp_1)
1 0.0024 0.0388 0.3171 0.3171 ^ ff1/Q (sky130_fd_sc_hd__dfxtp_1)
q1 (net)
0.0388 0.0000 0.3171 ^ u1/A (sky130_fd_sc_hd__inv_1)
1 0.0023 0.0188 0.0303 0.3474 v u1/Y (sky130_fd_sc_hd__inv_1)
n1 (net)
0.0188 0.0000 0.3474 v u2/A (sky130_fd_sc_hd__nand2_1)
1 0.0017 0.0281 0.0354 0.3828 ^ u2/Y (sky130_fd_sc_hd__nand2_1)
n2 (net)
0.0281 0.0000 0.3828 ^ ff2/D (sky130_fd_sc_hd__dfxtp_1)
0.3828 data arrival time
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.0000 0.0000 clock reconvergence pessimism
0.0000 ^ ff2/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0205 -0.0205 library hold time
-0.0205 data required time
-------------------------------------------------------------------------------------
-0.0205 data required time
-0.3828 data arrival time
-------------------------------------------------------------------------------------
0.4033 slack (MET)This is the min path of the same run, with both clock edges at 0 ns.
Both edges are at 0 ns, so the period does not appear in this check of a same-edge path. At 0.3 ns the hold slack is still 0.4033 ns.
Pessimism: Paths That Can Never Happen
STA follows the wires of the graph, not the logic values on them. It never asks whether a path can really carry a change. So it can report a failing path that no input pattern can ever exercise: a false path.
The block fpath has two muxes with one shared select, s. The first takes a slow buffer chain when s is 1, and the second takes another when s is 0. At a 1.4 ns clock, STA reports the path through both chains as the worst: -0.1689 ns.
fa → fysetup check, latest arrival11 cells
- Clock latency
- Cell delay
- Setup time
- Both chains
The path passes 11 cells, through both muxes.
- A violation on paper
The slack is -0.1689 ns. Yet this path needs s = 1 at the first mux and s = 0 at the second, at the same time.
Read the path as a table
Launch: clk rise edge at 0.0000 ns, clock latency 0.0000 ns (ideal). Capture: clk rise edge at 1.4000 ns, latency 0.0000 ns, library setup time −0.0999 ns.
Arrival 1.4691 ns, required 1.3001 ns, slack −0.1689 ns (violated).
| Cell | Arc | Through | Edge | Delay (ns) | Time (ns) | Slew (ns) |
|---|---|---|---|---|---|---|
| 1 | fa/CLK → fa/Q | dfxtp_1 | fall | 0.3149 | 0.3149 | 0.0308 |
fa/Q → c1/A | wire qa | fall | 0.0000 | 0.3149 | 0.0308 | |
| 2 | c1/A → c1/X | buf_1 | fall | 0.0768 | 0.3917 | 0.0233 |
c1/X → c2/A | wire d1 | fall | 0.0000 | 0.3917 | 0.0233 | |
| 3 | c2/A → c2/X | buf_1 | fall | 0.0736 | 0.4653 | 0.0233 |
c2/X → c3/A | wire d2 | fall | 0.0000 | 0.4653 | 0.0233 | |
| 4 | c3/A → c3/X | buf_1 | fall | 0.0736 | 0.5388 | 0.0233 |
c3/X → c4/A | wire d3 | fall | 0.0000 | 0.5388 | 0.0233 | |
| 5 | c4/A → c4/X | buf_1 | fall | 0.0724 | 0.6112 | 0.0222 |
c4/X → m1u/A1 | wire d4 | fall | 0.0000 | 0.6112 | 0.0222 | |
| 6 | m1u/A1 → m1u/X | mux2_1 | fall | 0.2903 | 0.9015 | 0.0624 |
m1u/X → e1/A | wire m1 | fall | 0.0000 | 0.9015 | 0.0624 | |
| 7 | e1/A → e1/X | buf_1 | fall | 0.0908 | 0.9923 | 0.0235 |
e1/X → e2/A | wire f1 | fall | 0.0000 | 0.9923 | 0.0235 | |
| 8 | e2/A → e2/X | buf_1 | fall | 0.0736 | 1.0659 | 0.0233 |
e2/X → e3/A | wire f2 | fall | 0.0000 | 1.0659 | 0.0233 | |
| 9 | e3/A → e3/X | buf_1 | fall | 0.0736 | 1.1395 | 0.0233 |
e3/X → e4/A | wire f3 | fall | 0.0000 | 1.1395 | 0.0233 | |
| 10 | e4/A → e4/X | buf_1 | fall | 0.0707 | 1.2102 | 0.0206 |
e4/X → m2u/A0 | wire f4 | fall | 0.0000 | 1.2102 | 0.0206 | |
| 11 | m2u/A0 → m2u/X | mux2_1 | fall | 0.2588 | 1.4691 | 0.0500 |
m2u/X → fy/D | wire m2 | fall | 0.0000 | 1.4691 | 0.0500 |
The report
Startpoint: fa (rising edge-triggered flip-flop clocked by clk)
Endpoint: fy (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
Fanout Cap Slew Delay Time Description
-------------------------------------------------------------------------------------
0.1000 0.0000 0.0000 clock clk (rise edge)
0.0000 0.0000 clock network delay (ideal)
0.1000 0.0000 0.0000 ^ fa/CLK (sky130_fd_sc_hd__dfxtp_1)
2 0.0035 0.0308 0.3149 0.3149 v fa/Q (sky130_fd_sc_hd__dfxtp_1)
qa (net)
0.0308 0.0000 0.3149 v c1/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0233 0.0768 0.3917 v c1/X (sky130_fd_sc_hd__buf_1)
d1 (net)
0.0233 0.0000 0.3917 v c2/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0233 0.0736 0.4653 v c2/X (sky130_fd_sc_hd__buf_1)
d2 (net)
0.0233 0.0000 0.4653 v c3/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0233 0.0736 0.5388 v c3/X (sky130_fd_sc_hd__buf_1)
d3 (net)
0.0233 0.0000 0.5388 v c4/A (sky130_fd_sc_hd__buf_1)
1 0.0018 0.0222 0.0724 0.6112 v c4/X (sky130_fd_sc_hd__buf_1)
d4 (net)
0.0222 0.0000 0.6112 v m1u/A1 (sky130_fd_sc_hd__mux2_1)
2 0.0038 0.0624 0.2903 0.9015 v m1u/X (sky130_fd_sc_hd__mux2_1)
m1 (net)
0.0624 0.0000 0.9015 v e1/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0235 0.0908 0.9923 v e1/X (sky130_fd_sc_hd__buf_1)
f1 (net)
0.0235 0.0000 0.9923 v e2/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0233 0.0736 1.0659 v e2/X (sky130_fd_sc_hd__buf_1)
f2 (net)
0.0233 0.0000 1.0659 v e3/A (sky130_fd_sc_hd__buf_1)
1 0.0020 0.0233 0.0736 1.1395 v e3/X (sky130_fd_sc_hd__buf_1)
f3 (net)
0.0233 0.0000 1.1395 v e4/A (sky130_fd_sc_hd__buf_1)
1 0.0015 0.0206 0.0707 1.2102 v e4/X (sky130_fd_sc_hd__buf_1)
f4 (net)
0.0206 0.0000 1.2102 v m2u/A0 (sky130_fd_sc_hd__mux2_1)
1 0.0017 0.0500 0.2588 1.4691 v m2u/X (sky130_fd_sc_hd__mux2_1)
m2 (net)
0.0500 0.0000 1.4691 v fy/D (sky130_fd_sc_hd__dfxtp_1)
1.4691 data arrival time
0.1000 1.4000 1.4000 clock clk (rise edge)
0.0000 1.4000 clock network delay (ideal)
0.0000 1.4000 clock reconvergence pessimism
1.4000 ^ fy/CLK (sky130_fd_sc_hd__dfxtp_1)
-0.0999 1.3001 library setup time
1.3001 data required time
-------------------------------------------------------------------------------------
1.3001 data required time
-1.4691 data arrival time
-------------------------------------------------------------------------------------
-0.1689 slack (VIOLATED)OpenSTA 3.1.0 on the sky130 tt library, ideal 1.4 ns clock, no wires.
The fpath netlist
// fpath: two muxes share one select. Mux m1 takes the slow chain c1-c4 when s is 1; mux m2 takes the slow chain e1-e4
// when s is 0. A path through both slow chains needs s = 1 and s = 0 at once, so it can never happen.
module fpath (clk, a, s, y);
input clk; input a; input s; output y;
wire qa, qs, d1, d2, d3, d4, m1, f1, f2, f3, f4, m2;
sky130_fd_sc_hd__dfxtp_1 fa (.CLK(clk), .D(a), .Q(qa));
sky130_fd_sc_hd__dfxtp_1 fs (.CLK(clk), .D(s), .Q(qs));
sky130_fd_sc_hd__buf_1 c1 (.A(qa), .X(d1));
sky130_fd_sc_hd__buf_1 c2 (.A(d1), .X(d2));
sky130_fd_sc_hd__buf_1 c3 (.A(d2), .X(d3));
sky130_fd_sc_hd__buf_1 c4 (.A(d3), .X(d4));
sky130_fd_sc_hd__mux2_1 m1u (.A0(qa), .A1(d4), .S(qs), .X(m1));
sky130_fd_sc_hd__buf_1 e1 (.A(m1), .X(f1));
sky130_fd_sc_hd__buf_1 e2 (.A(f1), .X(f2));
sky130_fd_sc_hd__buf_1 e3 (.A(f2), .X(f3));
sky130_fd_sc_hd__buf_1 e4 (.A(f3), .X(f4));
sky130_fd_sc_hd__mux2_1 m2u (.A0(f4), .A1(m1), .S(qs), .X(m2));
sky130_fd_sc_hd__dfxtp_1 fy (.CLK(clk), .D(m2), .Q(y));
endmoduleset_false_path -through [get_pins m1u/A1] -through [get_pins m2u/A0]With that line the worst path is a real one, with 0.0570 ns of slack, and the block passes. That is why set_false_path exists (T5.1), and why a wrong one is dangerous: STA obeys it.
Plain STA is also graph-based: at each pin it keeps only the worst arrival and slew from any input. Path-based analysis removes that smaller pessimism by re-timing one path with its own slews.
Worst-Case Libraries
A cell's delay depends on the process, the supply voltage and the temperature: a corner. STA does not average them. It times setup with slow libraries and hold with fast ones, because each check fails at its own extreme.
| Library corner | Worst setup slack (ns) | Worst hold slack (ns) |
|---|---|---|
| tt_025C_1v80 (typical) | 1.5329 | 0.4033 |
| ss_100C_1v60 (slow, hot) | 1.0298 | 0.8077 |
| ss_n40C_1v60 (slow, cold) | 0.9386 | 0.8244 |
| ff_n40C_1v95 (fast, cold) | 1.6956 | 0.2594 |
The block path2 at a 2 ns clock, with each of four sky130 libraries.
Setup is worst at a slow corner, and here the cold one is slower than the hot one. Hold is worst at the fast corner. Sign-off times every corner and every chip mode together: multi-corner multi-mode (MCMM) analysis, continued in T6.1.
Where STA Runs, and What It Cannot See
Teams run STA many times during a project, each time with the best data the flow has at that point.
| Flow stage | Clock model | Wire model | Lessons |
|---|---|---|---|
| After synthesis | Ideal: every flop sees the edge at once | None, or an estimate | T2, T4, T5 |
| After placement | Ideal | Estimated from cell positions | PD L4.5 |
| After clock tree synthesis | Propagated through real buffers | Estimated | T2.1, PD L5.3 |
| After routing (sign-off) | Propagated | Extracted R and C (SPEF) | T1.5, T6 |
The same SDC file follows the design through every one of these stages.
STA has four blind spots. First, it never checks function: a wrong adder with good slack passes. Second, it cannot assess a crossing between unrelated clocks. By default it even times such a path as if the clocks were related. A synchronizer makes the crossing safe, and a CDC check verifies it, as R6.1 shows. Third, it trusts the SDC: a false path on a real path hides it. Fourth, plain STA ignores crosstalk, the coupling between neighbouring wires, unless a signal-integrity engine adds it.
Asked in interviews
Why do we need STA when we have gate-level simulation?
Simulation checks only the paths its vectors toggle, at one corner. STA checks every path, with the worst delays, and needs no vectors. It is also far faster.
What are the inputs to STA?
The netlist, the Liberty timing libraries, the SDC constraints and, after routing, the wire parasitics. The output is a slack per endpoint.
What can STA not verify?
Logic function, asynchronous crossings and the correctness of its own constraints. A wrong false path or multicycle path hides a real failure.
Try It
This is the 2 ns run. Run it: WNS 1.5329 ns for setup, and 0.4033 ns for hold. Read the check_setup lines too: the ports a, b and y have no delays, so their paths are not timed.
Now change the period to 0.3 and run again. The setup slack becomes -0.1671 ns: VIOLATED. The hold slack does not move. Then find the shortest period that still meets setup.
Run to draw the timing paths here.
WNS 1.5329 ns worst minimum slack 0.4033 nsRead the netlist: path2.v (the bundled design path2)
// path2: the two-flop reference path of docs/pd-lessons (T1.2-T2.2), written by hand.
// ff1/Q -> u1 (inv_1) -> u2/A (nand2_1) -> ff2/D, both flops on clk.
module path2 (clk, a, b, y);
input clk;
input a;
input b;
output y;
wire q1;
wire n1;
wire n2;
sky130_fd_sc_hd__dfxtp_1 ff1 (.CLK(clk), .D(a), .Q(q1));
sky130_fd_sc_hd__inv_1 u1 (.A(q1), .Y(n1));
sky130_fd_sc_hd__nand2_1 u2 (.A(n1), .B(b), .Y(n2));
sky130_fd_sc_hd__dfxtp_1 ff2 (.CLK(clk), .D(n2), .Q(y));
endmodule
Check Yourself
Common Mistakes
Wrong Treat a clean timing report as proof that the chip works.
STA checks only when signals arrive, so a wrong logic function passes it with positive slack.
Fix Use simulation or formal checks for function, and STA for timing.
Wrong Assume a path that no test toggles cannot fail.
The silicon toggles that path one day, and STA times it whether or not a test reaches it.
Fix Read the slack of every endpoint, including paths your tests never exercise.
Wrong Believe the slack before reading the check_setup findings.
A missing clock or input delay removes paths from the report, so the worst slack looks better than it is.
Fix Make check_setup clean first, then read the slack.
create_clock -name clk -period 2.0 [get_ports clk]
# no input or output delayscreate_clock -name clk -period 2.0 [get_ports clk]
set_input_delay 0.2 -clock clk [get_ports {a b}]
set_output_delay 0.3 -clock clk [get_ports y]Remember
- Simulation checks function on the paths a test toggles; STA checks the timing of every path with no vectors.
- STA reads a netlist, Liberty timing, an SDC and, after routing, wire parasitics; it gives a slack per endpoint.
- Slack is required time minus arrival time. The period moves the setup required time; for a same-edge path it does not move the hold check.
- A missing constraint removes paths from the report, so read check_setup before trusting any slack.
- STA cannot check function, unrelated-clock crossings or the truth of its own exceptions.