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.

Timing pathff1 to ff2 at a 0.3 Ns ClockThe two-flop block path2: flop ff1, an inverter, a NAND gate and flop ff2, all on one clock.

ff1 → ff2setup check, latest arrival3 cells

  • Clock latency
  • Cell delay
  • Setup time
ff1 to ff2 at a 0.3 ns clock00.050.10.150.20.250.30.35time (ns)launch clk ↑capture clk ↑Data arrivesRequired byff1/CLK → ff1/Q (dfxtp_1): 0.3082 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0376 ns2 inv_1u2/A → u2/Y (nand2_1): 0.0330 ns3setup −0.0882 nsslack −0.1671 ns · violatedarrival 0.3789required 0.2118ff1 to ff2 at a 0.3 ns clock00.10.20.3time (ns)launch clk ↑capture clk ↑Data arrivesRequired byff1/CLK → ff1/Q (dfxtp_1): 0.3082 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0376 ns2u2/A → u2/Y (nand2_1): 0.0330 ns3setup −0.0882 nsslack −0.1671 ns · violatedarrival 0.3789required 0.2118
  1. Launch at 0 ns

    The clock edge at 0 ns makes ff1 send new data toward ff2 through the two gates.

  2. Data arrives

    The clock-to-Q delay of ff1 and the delays of the two gates add up to 0.3789 ns.

  3. 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.

  4. 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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1ff1/CLK → ff1/Qdfxtp_1fall0.30820.30820.0249
ff1/Q → u1/Awire q1fall0.00000.30820.0249
2u1/A → u1/Yinv_1rise0.03760.34590.0299
u1/Y → u2/Awire n1rise0.00000.34590.0299
3u2/A → u2/Ynand2_1fall0.03300.37890.0233
u2/Y → ff2/Dwire n2fall0.00000.37890.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.

path2 in RTL Simulation: The Same Waveform at 2 Ns or at 0.3 NsOne column per clock cycle. b stays 1, so ff2 receives the value of a two edges later.
012345abff1/Qff2/Dy (ff2/Q)y follows a
Scroll horizontally ↔
  1. Cycle 1

    ff1 captures a at the edge. In RTL, its Q changes at the edge itself, with zero delay.

  2. Cycle 2

    The inverter and the NAND also take zero time, so ff2/D is ready at once.

  3. 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.

QuestionSimulationStatic timing analysis
What does it check?The function: the right value in the right cycleThe timing: every path arrives in time
Which paths?Only the paths the stimulus togglesEvery path, with or without a test
What does it need?A testbench and stimulusThe netlist, cell timing, the clocks and the wires
What does it give?A waveform and a pass or failA 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.

The Inputs and Outputs of a Timing RunArrows show what flows into OpenSTA and what comes out.
  • File
  • Constraint
  • Tool
  • Report
  • Data
The inputs and outputs of a timing runArrows show what flows into OpenSTA and what comes out. file Netlist cells and their wires(Verilog) file Liberty delay and checktables per cell constraint SDC clocks, I/O delays,exceptions file Parasitics(SPEF) wire R and C, afterrouting tool OpenSTA arrival, required,slack report Slack perendpoint setup and hold, WNS,TNS report check_setup what was not timed structurecell delaysclockswire delaysreportgaps
  1. file Netlistcells and their wires (Verilog)
    • structure → OpenSTA
  2. file Libertydelay and check tables per cell
    • cell delays → OpenSTA
  3. tool OpenSTAarrival, required, slack
    • report → Slack per endpoint
    • gaps → check_setup
  4. constraint SDCclocks, I/O delays, exceptions
    • clocks → OpenSTA
  5. file Parasitics (SPEF)wire R and C, after routing
    • wire delays → OpenSTA
  6. report Slack per endpointsetup and hold, WNS, TNS
  7. report check_setupwhat was not timed
  1. 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.

  2. The clocks

    The SDC file says when the clock edges come. Without it, no path has a required time.

  3. The wires

    After routing, a SPEF file adds each wire's resistance and capacitance.

  4. 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.

KindExample in paths4Setup slack (ns)Needs in the SDC
Input port to flopin → f11.4014A clock and set_input_delay
Flop to flop (the clock's own group)f1 → f21.5458A clock
Flop to output portf2 → out1.1302A clock and set_output_delay
Input port to output portin2 → out20.9834Both 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.

Timing pathThe Setup Check at a 2 Ns ClockThis is the same path as in the opening figure, and only the clock period has changed.

ff1 → ff2setup check, latest arrival3 cells

  • Clock latency
  • Cell delay
  • Setup time
The setup check at a 2 ns clock00.20.40.60.811.21.41.61.82time (ns)launch clk ↑capture clk ↑Data arrivesRequired byff1/CLK → ff1/Q (dfxtp_1): 0.3082 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0376 nsu2/A → u2/Y (nand2_1): 0.0330 nssetup −0.0882 nsslack +1.5329 ns · metarrival 0.3789required 1.9118The setup check at a 2 ns clock00.511.52time (ns)launch clk ↑capture clk ↑Data arrivesRequired byff1/CLK → ff1/Q (dfxtp_1): 0.3082 ns1u1/A → u1/Y (inv_1): 0.0376 nsu2/A → u2/Y (nand2_1): 0.0330 nssetup −0.0882 nsslack +1.5329 ns · metarrival 0.3789required 1.9118
  1. Clock to Q

    ff1's output Q changes 0.3082 ns after the clock edge reaches its CLK pin.

  2. Two gates

    The inverter and the NAND add 0.0707 ns. Data arrives at 0.3789 ns.

  3. Required time

    2 ns − 0.0882 ns of setup = 1.9118 ns.

  4. 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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1ff1/CLK → ff1/Qdfxtp_1fall0.30820.30820.0249
ff1/Q → u1/Awire q1fall0.00000.30820.0249
2u1/A → u1/Yinv_1rise0.03760.34590.0299
u1/Y → u2/Awire n1rise0.00000.34590.0299
3u2/A → u2/Ynand2_1fall0.03300.37890.0233
u2/Y → ff2/Dwire n2fall0.00000.37890.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
Timing pathThe Hold Check: Launch and Capture on the Same Edge

ff1 → ff2hold check, earliest arrival3 cells

  • Clock latency
  • Cell delay
  • Hold time
The hold check: launch and capture on the same edge00.050.10.150.20.250.30.35time (ns)launch and capture clk ↑Data arrivesRequired afterff1/CLK → ff1/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0303 ns2u2/A → u2/Y (nand2_1): 0.0354 ns3hold −0.0205 nsslack +0.4033 ns · metarrival 0.3828required −0.0205The hold check: launch and capture on the same edge00.10.20.3time (ns)launch and capture clk ↑Data arrivesRequired afterff1/CLK → ff1/Q (dfxtp_1): 0.3171 ns1 dfxtp_1u1/A → u1/Y (inv_1): 0.0303 ns2u2/A → u2/Y (nand2_1): 0.0354 ns3hold −0.0205 nsslack +0.4033 ns · metarrival 0.3828required −0.0205
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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1ff1/CLK → ff1/Qdfxtp_1rise0.31710.31710.0388
ff1/Q → u1/Awire q1rise0.00000.31710.0388
2u1/A → u1/Yinv_1fall0.03030.34740.0188
u1/Y → u2/Awire n1fall0.00000.34740.0188
3u2/A → u2/Ynand2_1rise0.03540.38280.0281
u2/Y → ff2/Dwire n2rise0.00000.38280.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.

Timing pathThe Worst Path STA Finds in Fpath: Through Both Slow ChainsFlop fa launches, the data runs through both chains and both muxes, and flop fy captures.

fa → fysetup check, latest arrival11 cells

  • Clock latency
  • Cell delay
  • Setup time
The worst path STA finds in fpath: through both slow chains00.20.40.60.811.21.4time (ns)launch clk ↑capture clk ↑Data arrivesRequired byfa/CLK → fa/Q (dfxtp_1): 0.3149 ns1 dfxtp_1c1/A → c1/X (buf_1): 0.0768 ns2c2/A → c2/X (buf_1): 0.0736 ns3c3/A → c3/X (buf_1): 0.0736 ns4c4/A → c4/X (buf_1): 0.0724 ns5m1u/A1 → m1u/X (mux2_1): 0.2903 ns6 mux2_1e1/A → e1/X (buf_1): 0.0908 ns7e2/A → e2/X (buf_1): 0.0736 ns8e3/A → e3/X (buf_1): 0.0736 ns9e4/A → e4/X (buf_1): 0.0707 ns10m2u/A0 → m2u/X (mux2_1): 0.2588 ns11 mux2_1setup −0.0999 nsslack −0.1689 ns · violatedarrival 1.4691required 1.3001The worst path STA finds in fpath: through both slow chains00.511.5time (ns)launch clk ↑capture clk ↑Data arrivesRequired byfa/CLK → fa/Q (dfxtp_1): 0.3149 ns1c1/A → c1/X (buf_1): 0.0768 ns2c2/A → c2/X (buf_1): 0.0736 ns3c3/A → c3/X (buf_1): 0.0736 ns4c4/A → c4/X (buf_1): 0.0724 ns5m1u/A1 → m1u/X (mux2_1): 0.2903 ns6 mux2_1e1/A → e1/X (buf_1): 0.0908 ns7e2/A → e2/X (buf_1): 0.0736 ns8e3/A → e3/X (buf_1): 0.0736 ns9e4/A → e4/X (buf_1): 0.0707 nsm2u/A0 → m2u/X (mux2_1): 0.2588 ns11setup −0.0999 nsslack −0.1689 ns · violatedarrival 1.4691required 1.3001
  1. Both chains

    The path passes 11 cells, through both muxes.

  2. 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).

CellArcThroughEdgeDelay (ns)Time (ns)Slew (ns)
1fa/CLK → fa/Qdfxtp_1fall0.31490.31490.0308
fa/Q → c1/Awire qafall0.00000.31490.0308
2c1/A → c1/Xbuf_1fall0.07680.39170.0233
c1/X → c2/Awire d1fall0.00000.39170.0233
3c2/A → c2/Xbuf_1fall0.07360.46530.0233
c2/X → c3/Awire d2fall0.00000.46530.0233
4c3/A → c3/Xbuf_1fall0.07360.53880.0233
c3/X → c4/Awire d3fall0.00000.53880.0233
5c4/A → c4/Xbuf_1fall0.07240.61120.0222
c4/X → m1u/A1wire d4fall0.00000.61120.0222
6m1u/A1 → m1u/Xmux2_1fall0.29030.90150.0624
m1u/X → e1/Awire m1fall0.00000.90150.0624
7e1/A → e1/Xbuf_1fall0.09080.99230.0235
e1/X → e2/Awire f1fall0.00000.99230.0235
8e2/A → e2/Xbuf_1fall0.07361.06590.0233
e2/X → e3/Awire f2fall0.00001.06590.0233
9e3/A → e3/Xbuf_1fall0.07361.13950.0233
e3/X → e4/Awire f3fall0.00001.13950.0233
10e4/A → e4/Xbuf_1fall0.07071.21020.0206
e4/X → m2u/A0wire f4fall0.00001.21020.0206
11m2u/A0 → m2u/Xmux2_1fall0.25881.46910.0500
m2u/X → fy/Dwire m2fall0.00001.46910.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
Both muxes read the same select, qs.
// 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));
endmodule
The designer tells STA that this path cannot happen. Two -through options in a row mean: through m1u/A1, then through m2u/A0.
set_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 cornerWorst setup slack (ns)Worst hold slack (ns)
tt_025C_1v80 (typical)1.53290.4033
ss_100C_1v60 (slow, hot)1.02980.8077
ss_n40C_1v60 (slow, cold)0.93860.8244
ff_n40C_1v95 (fast, cold)1.69560.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 stageClock modelWire modelLessons
After synthesisIdeal: every flop sees the edge at onceNone, or an estimateT2, T4, T5
After placementIdealEstimated from cell positionsPD L4.5
After clock tree synthesisPropagated through real buffersEstimatedT2.1, PD L5.3
After routing (sign-off)PropagatedExtracted 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
  1. 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.

  2. 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.

  3. 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.

STAOpenSTA in OpenROAD 26Q2 · sky130hd tt_025C_1v80 Liberty · simulator service
Edit the constraints, then run them

          
Expected: WNS 1.5329 ns worst minimum slack 0.4033 ns
Read 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

Predict the outputThe same path2 with a 1 ns clock instead of 2 ns. What worst setup slack (WNS) does OpenSTA report, in ns?
create_clock -name clk -period 1.0 [get_ports clk]
set_clock_transition 0.1 [all_clocks]
ConceptA block passes every RTL simulation test at a 0.3 ns clock. Why does that say nothing about its timing?
ConceptThe period of path2 drops from 2 ns to 0.3 ns. The setup slack falls to -0.1671 ns. What happens to the hold slack?
ConceptWhich of these problems can STA find?
ConceptA colleague says: "Every path is MET." The same run's check_setup lists 40 unconstrained endpoints. What do you conclude?

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.

Before
create_clock -name clk -period 2.0 [get_ports clk]
# no input or output delays
After
create_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.

Practice

Report a problem with this page