BitFlow

Static timing analysis (STA) basics

How static timing analysis checks every path in a design without simulation: timing paths, arrival and required time, slack, WNS and TNS, corners, and the SDC constraints that drive it.

By BitFlow · · 8 min read

What STA does

Static timing analysis checks that every signal in a synchronous design arrives in time, without running a single test vector. It adds up the delays along every path through the netlist and compares them with the clock period. Because it covers every path, it finds the slowest one even if no testbench ever exercises it.

Simulation checks that the design does the right thing; STA checks that it does it fast enough. A chip needs both.

Timing paths

STA splits the design into paths, each starting at a launch point and ending at a capture point:

  • Register to register: clock pin of one flip-flop, through logic, to the D pin of another. Most paths are these.
  • Input to register: a top-level input to a flip-flop, constrained with set_input_delay.
  • Register to output: a flip-flop to a top-level output, constrained with set_output_delay.
  • Input to output: pure combinational paths straight through the block.

Arrival time, required time and slack

slack = required time − arrival time
For setup. Positive slack means the path is fast enough; negative slack is a violation.

The arrival time is when the data actually reaches the capture pin: clock-to-Q plus every cell and wire delay on the path. The required time is the latest it may arrive: the next clock edge, minus the capturing flip-flop's setup time, adjusted for clock skew and uncertainty.

Worked example: Reading one path

Clock period 10 ns, t_cq = 0.4 ns, logic = 7.9 ns, setup = 0.3 ns, clock uncertainty 0.2 ns.

  1. Arrival = 0.4 + 7.9 = 8.3 ns.
  2. Required = 10 − 0.3 − 0.2 = 9.5 ns.
  3. Slack = 9.5 − 8.3 = +1.2 ns.

Answer:The path meets setup with 1.2 ns to spare; the clock could run at about 1 / (10 − 1.2) ns ≈ 114 MHz.

Two summary numbers describe a whole design: WNS (worst negative slack, the single worst path) and TNS (total negative slack, the sum over all failing endpoints). WNS tells you how far off you are; TNS tells you how widespread the problem is.

Corners and hold

Cell delays change with manufacturing process, voltage and temperature (PVT). STA runs at several corners: setup is usually worst at the slow corner (slow process, low voltage), hold at the fast corner. A design must pass both.

The hold check uses the same clock edge, so it doesn't depend on the clock period. A hold violation can't be fixed by slowing the clock.

Constraints (SDC)

STA only checks what you tell it about. The constraints, usually in SDC (Synopsys Design Constraints) format, define the clocks and the environment:

create_clock -name clk -period 10 [get_ports clk]
set_clock_uncertainty 0.2 [get_clocks clk]
set_input_delay  2 -clock clk [all_inputs]
set_output_delay 2 -clock clk [all_outputs]
set_clock_groups -asynchronous -group clk -group clk_b   ;# a CDC boundary
Watch outA missing constraint doesn't fail; it silently leaves paths unchecked. Always review the report of unconstrained paths.

Questions

What is static timing analysis?

Static timing analysis checks that every timing path in a synchronous circuit meets its setup and hold requirements by summing cell and wire delays, without simulating input vectors.

What is slack in STA?

Slack is the required time minus the arrival time of a signal at a capture point. Positive slack means the timing is met; negative slack is a violation.

What are WNS and TNS?

WNS (worst negative slack) is the slack of the single worst path. TNS (total negative slack) is the sum of negative slack over all failing endpoints, showing how widespread the violations are.

Why is STA better than timing simulation?

Timing simulation only checks the paths the test vectors happen to exercise. STA checks every path exhaustively and is much faster, which is why it is used for timing signoff.

Was this article helpful?

Keep going