GuidesTiming Closure

Setup and Hold Time: How the Checks Work and How to Fix Violations

The two checks every flip-flop path has to pass, what each one depends on, and why a hold violation is the one you cannot ship around.

Every register-to-register path in a synchronous design is signed off with two checks. The setup check asks whether data launched on one clock edge reaches the capturing flip-flop early enough to be sampled on the next edge. The hold check asks whether new data arrives late enough that it does not overwrite the value the capturing flop is still sampling on the current edge. Static timing analysis (STA) runs both checks on every path, at every corner and mode you sign off, and timing closure is not done until both report zero violations.

What setup time and hold time are

Setup time is the minimum time the data at a flip-flop's D pin must be stable before the active clock edge. Hold time is the minimum time it must stay stable after that edge. Both are properties of the cell, characterized by the library vendor and stored in the Liberty (.lib) file as constraint arcs (for a rising-edge flop, setup_rising and hold_rising), usually as tables indexed by the data and clock transition times. Either value can be negative for a given cell and condition.

The actual numbers depend on the standard-cell library, the PVT corner and the slews on the pins. Read them from your foundry or IP vendor's Liberty files for the corner you are checking; there is no generic value worth quoting.

Violate either window and the flop can capture the wrong value or go metastable. STA guarantees the windows are met on synchronous paths. It does not make asynchronous clock-domain crossings safe; those need synchronizers and a CDC check, not a timing fix.

The setup check

For a single-cycle path between two flops on the same clock with period T, the latest data arrival must come before the capture edge minus the setup time:

Arrival (max)  = launch clock latency + clk-to-Q (max) + data path delay (max)
Required       = T + capture clock latency - setup time - clock uncertainty
Setup slack    = Required - Arrival

Positive slack passes; negative slack is a violation. Because the period T sits in the required time, a setup failure is a speed problem: the path is too slow for the clock. Lowering the frequency makes it pass, which is why a part with setup violations can still work, just at a lower frequency than you designed for.

The hold check

The hold check compares the earliest data arrival against the same clock edge that launched it, as seen at the capture flop:

Arrival (min)  = launch clock latency + clk-to-Q (min) + data path delay (min)
Required       = capture clock latency + hold time + clock uncertainty
Hold slack     = Arrival - Required

The clock period does not appear anywhere in it. A hold violation fails at every frequency, so slowing the clock does nothing for it. On silicon that usually means a respin, which is why hold is treated as the non-negotiable check of the two.

How clock skew moves both checks

Skew is the difference between the capture and launch clock latencies. It pushes the two checks in opposite directions:

SkewSetupHold
Positive (capture clock arrives later than launch)Helps: more time to arriveHurts: the capture flop holds longer
Negative (capture clock arrives earlier than launch)Hurts: less time to arriveHelps

That trade is the basis of useful skew: clock tree synthesis and the optimizer deliberately delay or advance individual clock pins to lend slack from a path that has it to one that does not. It also explains why hold is mostly fixed after clock tree synthesis. Before CTS the tool times with ideal clocks and models skew and jitter through set_clock_uncertainty; once the tree is built, propagated clock latencies replace the estimate and the real hold picture appears.

Which corners and derates each check uses

Setup is limited by the slowest paths, so it is usually worst at slow process, low voltage corners. Hold is limited by the fastest paths, so it is usually worst at fast process, high voltage corners. Temperature is less predictable: at advanced nodes temperature inversion can make the cold corner the slow one, so check both temperature extremes your sign-off kit lists rather than assuming hot is slowest. The corner and mode list itself comes from your foundry's sign-off recommendations and your product's operating conditions.

On-chip variation derates are applied pessimistically in each direction. For setup, the launch clock and data path get the late derate and the capture clock gets the early derate; for hold, the reverse. Where launch and capture clocks share part of the tree, clock reconvergence pessimism removal (CRPR) takes back the pessimism of derating one physical wire two different ways. Which derating method you sign off with, flat OCV, AOCV or POCV, changes how much margin each check loses; our comparison of POCV and AOCV derating covers that choice.

How to fix setup violations

A setup violation means the data path, or the clock arriving at the capture flop, needs to be faster relative to the launch. The usual moves, roughly from cheapest to most disruptive:

  • Upsize cells on the critical path for more drive strength.
  • Swap threshold voltage to a faster flavor (for example HVT or SVT to LVT). It costs leakage, so keep it to the paths that need it.
  • Buffer or reroute long nets, reduce fanout, or promote critical nets to wider, less resistive upper metal layers.
  • Improve placement: pull the cells of a long path closer together, or revisit the floorplan if the endpoints sit far apart.
  • Apply useful skew, delaying the capture clock where the next stage has slack to spare.
  • Restructure the logic: fewer levels, a different decomposition, or moving the late-arriving signal closer to the output.
  • Change the architecture: add a pipeline stage, or, if the path really is allowed several cycles, declare it as a multicycle path (see below).

How to fix hold violations

A hold violation means data races through too fast. The fixes add delay to the data path or shift the clocks:

  • Insert delay cells or buffers on the data path, as close to the capture flop as possible so the extra delay does not land on other paths that share the launch side.
  • Downsize cells or swap to a slower threshold voltage on the short path.
  • Adjust skew so the capture clock arrives earlier, as long as the setup check on the same flop still passes.

Every hold fix adds delay to a path that might also be setup-critical at another corner. Fix hold at the fast corners while timing setup at the slow ones in the same multi-corner, multi-mode run, otherwise each round of fixes undoes the last. Hold buffers also take area and add routing, so a block that needs very large numbers of them is usually pointing to a skew or constraints problem, not a shortage of buffers.

Multicycle and half-cycle paths

A multicycle path gives the setup check more than one period. In SDC, set_multicycle_path 2 -setup -from A -to B moves the setup capture edge out by one cycle, but by default it also moves the hold check forward by one cycle, which makes hold far harder to meet. The usual companion is set_multicycle_path 1 -hold -from A -to B, which brings the hold check back to the original launch edge. Only declare a multicycle path when the design really guarantees it, for example with an enable that holds the data stable; a wrong exception hides a real failure.

A half-cycle path runs between a rising-edge and a falling-edge flop. Setup gets half a period instead of a full one, so these paths are common setup offenders, while their hold check is correspondingly easier.

Reading the report

Every STA tool reports the two checks separately: max delay paths are setup, min delay paths are hold. In Synopsys PrimeTime that is report_timing -delay_type max and -delay_type min; in OpenSTA and OpenROAD, report_checks -path_delay max and -path_delay min. Check your tool's documentation for the exact options in the version you run. When a path fails, read it in this order:

  1. Which check and which corner. A setup failure at the slow corner and a hold failure at the fast corner have different fixes.
  2. The clock section. Large launch-to-capture latency differences point to the clock tree, not the data path.
  3. The data path. Look for one stage with an outsized delay: a long net, a weak driver, a high-fanout pin or a large transition.
  4. The constraints. A path that should be false or multicycle, or a missing generated clock, shows up as an impossible violation no amount of sizing will close.

Quick reference

TermWhat it means
Setup timeHow long data must be stable before the capturing clock edge
Hold timeHow long data must stay stable after the capturing clock edge
SlackMargin on a check; negative slack is a violation
WNS / TNSWorst negative slack, and total negative slack summed over failing endpoints
Clock skewCapture clock latency minus launch clock latency
Clock uncertaintyMargin for jitter and, before CTS, estimated skew
CRPRClock reconvergence pessimism removal: undoes double-counted derate on the shared clock path
Useful skewDeliberately skewing clock pins to move slack between stages
  1. POCV vs AOCV Derating in Timing Sign-OffWhy a design choice between three derating methods matters at advanced nodes.