Negative Setup and Hold Time: Causes, Liberty Data and STA

Negative setup and hold time explained with real ASAP7 Liberty data and OpenSTA runs: causes, slew and corner effects, STA math, debug steps and interview Q&As.

Negative Setup and Hold Time: Causes, Liberty Data and STA
On this page 13 sections
  1. Setup and hold time: a quick recap
  2. What a negative setup or hold time means
  3. Why it happens: delays inside the flop
  4. How setup and hold are characterized
  5. Reading negative values in a real Liberty file
  6. How STA uses a negative value
    1. Worked example 1: same flop, different slews (real OpenSTA result)
    2. Worked example 2: negative hold on one edge, violation on the other (real OpenSTA result)
    3. Worked example 3: hand check of a hold path (illustrative)
  7. Where negative values matter in practice
  8. Common mistakes
  9. Debugging flowchart
  10. Interview questions and answers
  11. FAQ
  12. Summary
  13. References

Can setup or hold time be negative? Yes. Open a modern standard-cell Liberty file and you will find negative numbers in the setup and hold tables of ordinary flip-flops. They are not bugs, and STA tools use them exactly as written. But they are easy to misread, and the misreading causes real mistakes in hold fixing and in interview answers.

This post explains what a negative setup or hold time means, why it happens inside a flop, how to read it in real Liberty tables, how STA uses it, and what to check when a path near a flop fails. All library numbers are read from the open ASAP7 7 nm predictive library (DFFHQNx1, RVT), and all slacks come from a small hand-written netlist timed with OpenSTA 2.3.1 (no wire parasitics). Anything that is not a tool or library result is labelled illustrative.

Setup and hold time: a quick recap#

For a rising-edge flop, setup time is how long before the active clock edge the data must be stable, and hold time is how long after the edge it must stay stable. Together they define a window around the edge in which D must not change. If you need the basics of checking these against path delays, read setup and hold violations and the STA overview first.

Both values are measured at the cell pins: from the D pin to the CLK pin, with the 50% points of the waveforms as the usual reference. That detail is the whole story behind negative values.

What a negative setup or hold time means#

A negative number simply moves one side of the window across the clock edge:

  • Negative hold time: data may change before the clock edge and the flop still captures the old value correctly. The window ends before the edge.
  • Negative setup time: data may arrive after the clock edge and still be captured. The window starts after the edge.

What can never be negative is the width of the window, setup + hold. If both were negative enough to make the sum negative, the flop would need no stable time at all, which is impossible. In ASAP7 DFFHQNx1, the smallest setup + hold across all 49 table points (same D edge, same slew pair) is +4.47 ps for a rising D and +11.09 ps for a falling D at the TT corner, and +1.31 ps / +6.96 ps at the FF corner. Each side can be negative; the sum never is.

Figure 1. A negative hold moves the end of the stable window before the clock edge; setup + hold stays positive.

Why it happens: delays inside the flop#

The flop does not sample at its pins. It samples at an internal storage node, usually the master latch, which has its own internal setup and hold needs. Between the pins and that node there are delays:

  • d_data: the D pin goes through an input stage (inverter, transmission gate or mux in a scan flop) before it reaches the storage node.
  • d_clk: the CLK pin goes through local clock inverters that create the internal clock phases.

To a first order, the values seen at the pins are:

Formula
setup_pin = Ts_int + d_data - d_clk hold_pin = Th_int + d_clk - d_data

If the data path inside the cell is slower than the clock path by more than the internal hold requirement, hold_pin goes negative. Data that changes at the D pin slightly before the edge still reaches the storage node after the internal latch has closed. The same logic gives a negative setup time when the internal clock path is the slower one.

Figure 2. Internal data and clock delays shift the pin-level setup and hold values (conceptual model).

This model is conceptual. Real numbers depend on the transistor design, slews, edge and PVT corner, and come from characterization.

How setup and hold are characterized#

A characterization tool simulates the cell at transistor level for each pair of D slew and CLK slew in the table. It sweeps the data-to-clock offset and finds the point where the flop stops behaving correctly. A common pass/fail criterion is a set push-out of clock-to-Q delay (for example 10% over its nominal value) or outright failure to capture. The offset at that point, measured between the D and CLK 50% crossings, is the table entry. It can land on either side of zero.

Two consequences matter for STA engineers:

  1. Setup and hold are characterized one at a time. While the setup value is found, the data is held for a long time after the edge, and vice versa. In silicon the two interact: shrinking the hold margin increases the setup needed. Salman et al. showed this interdependence and how it can be used to reduce pessimism in STA (IEEE TCAD, 2007; see references). Standard STA uses the independent values.
  2. The tables are not perfectly smooth. Some ASAP7 rows step up and down by a few picoseconds. That is normal for a search-based measurement; do not read physics into a small wiggle.

Reading negative values in a real Liberty file#

Here is the Liberty structure for the D pin of DFFHQNx1_ASAP7_75t_R. index_1 is the D (constrained pin) slew and index_2 is the CLK (related pin) slew, both in ps:

Code
pin (D) { timing () { related_pin : "CLK"; timing_type : hold_rising; rise_constraint (constraint_template_7x7) { /* D rising */ index_1 ("5, 10, 20, 40, 80, 160, 320"); index_2 ("5, 10, 20, 40, 80, 160, 320"); values ( ... 49 entries ... ); } fall_constraint (constraint_template_7x7) { ... } /* D falling */ } timing () { related_pin : "CLK"; timing_type : setup_rising; ... } }

There are four tables per corner: hold and setup, each for a rising and a falling D. Counting the negative entries across the 49 points of each table (real library data):

Data table
Corner (RVT) Hold, D rise Hold, D fall Setup, D rise Setup, D fall
FF (0.77 V, 0 °C) 33 / 49 4 / 49 1 / 49 23 / 49
TT (0.70 V, 25 °C) 34 / 49 5 / 49 5 / 49 22 / 49
SS (0.63 V, 100 °C) 35 / 49 0 / 49 6 / 49 23 / 49

Three things stand out:

  • Negative hold is the common case for a rising D in this flop, and rare for a falling D. A single "hold time" number on a datasheet hides this. STA checks both edges.
  • Negative setup is common for a falling D when the clock edge is slow.
  • Slews move the values a lot. At TT, hold for a rising D goes from −19.54 ps (slow D, fast clock) to +11.12 ps (fast D, slow clock).
Figure 3. Real ASAP7 DFFHQNx1 RVT TT Liberty tables: hold (rising D) and setup (falling D) versus D and CLK slew.

Scan flops show the same thing on their extra pins. In SDFHx1, hold for a rising SI is negative in 44 of 49 points at FF and 39 at TT. This matters for scan shift paths, which are often flop-to-flop with no logic in between (see scan chain reordering).

For more on table lookup and interpolation, read NLDM vs CCS vs ECSM and the timing library (.lib) post.

How STA uses a negative value#

The tool looks up the value for the actual D slew and CLK pin slew, interpolates, and uses it as-is:

Formula
Hold: required = capture clock arrival (- CRPR) + library hold slack = data arrival - required Setup: required = next capture edge arrival (+ CRPR) - library setup slack = required - data arrival

A negative hold lowers the hold requirement; a negative setup raises the setup required time. Both make the check easier. In an OpenSTA report the lines read library hold time -3.54 and, for a negative setup, library setup time +0.82. The tool shows the setup term as subtracted, so a negative library setup appears as a positive number. See how to read a timing report for the full format.

Worked example 1: same flop, different slews (real OpenSTA result)#

An input port din drives r1/D directly, with ideal clocks at TT. Changing only the D slew (set_input_transition) and the clock slew (set_clock_transition, one OpenSTA run per value) gives these library values in the reports:

Data table
D slew (ps) CLK slew (ps) Hold, D rise Setup, D fall
5 20 −0.35 −0.82
20 20 −3.54 +3.14
160 20 −11.87 +21.09
20 5 −5.29 +7.31
20 80 +2.33 −11.35
20 160 +3.38 −21.21

At a 5 ps D slew the setup for a falling D really is negative: the report shows library setup time 0.82, which raises the required time. A slower D edge makes hold more negative but setup much worse. A slower clock edge does the opposite, and it can flip a negative hold to positive: −3.54 ps at 20 ps clock slew becomes +2.33 ps at 80 ps. Hold numbers that look comfortable in an early run can get worse once clock transitions degrade, which is one more reason to keep clock slews under control (see DRVs: max transition).

Worked example 2: negative hold on one edge, violation on the other (real OpenSTA result)#

Two back-to-back flops, r3/QN driving r4/D with no logic between them. The capture branch of the hand-built clock tree has two more buffers than the launch branch, so after set_propagated_clock the capture clock arrives late. Launch latency is 48.42 ps, capture latency 92.87 ps, CRPR 0.37 ps, so the hold check sees 44.82 ps of skew that works against it. That is far more than a balanced tree would give, but it shows the effect clearly.

Code
D rises D falls data arrival at r4/D 95.23 93.55 capture clock (- CRPR) 92.50 92.50 library hold time -3.85 +10.10 data required time 88.65 102.61 slack +6.58 -9.06 (VIOLATED)

The rising-D check gets a negative hold and passes. The falling-D check needs +10.10 ps and fails by 9.06 ps. Anyone who reads "this flop has negative hold" and stops there misses the real violation.

One HB1xp67 hold buffer before r4/D fixes both edges: +23.26 ps (rise) and +8.63 ps (fall). Setup slack on the path drops from 283.07 to 265.37 ps. The library hold values also moved (−3.85 to −2.91 ps rise, +10.10 to +11.49 ps fall) because the buffer changed the D slew.

As a what-if experiment, the same netlist was timed with a copy of the library whose negative hold entries were clamped to zero. The rising-D slack drops from +6.58 to +2.73 ps: the 3.85 ps credit disappears and nothing else changes. This only shows the size of the credit. It is not a recommendation to edit libraries.

Figure 4. Real OpenSTA 2.3.1 results: the rising-D check passes on a negative hold while the falling-D check fails.

Worked example 3: hand check of a hold path (illustrative)#

Illustrative numbers. A path has a launch clock latency of 300 ps, clock-to-Q of 40 ps and 15 ps of logic, so data arrives at 355 ps. The capture clock latency is 370 ps. The flop's hold time at these slews is −8 ps and the hold uncertainty is 10 ps.

Formula
required = 370 + 10 + (-8) = 372 ps slack = 355 - 372 = -17 ps

With a positive 8 ps hold, the slack would have been −33 ps. Negative hold reduces the fix, it does not remove it: the 70 ps of skew still dominates. If you see a hold violation like this, look at the skew first (see clock tree synthesis and clock uncertainty).

Where negative values matter in practice#

  • Hold fixing count. Back-to-back flops, shift registers and scan chains have almost no data delay. Negative hold on the common edge reduces the number of hold buffers needed, which saves area and setup slack. But the worst edge decides, as Example 2 shows.
  • Scan shift and lockup latches. Scan paths that cross clock branches with large skew are fixed with lockup latches, not by relying on negative hold. See half-cycle paths and latch vs flip-flop.
  • Corners. Values change with PVT. In ASAP7 the falling-D hold has 4 negative points at FF and none at SS, so a path can lean on a negative hold in one corner and not in another. Always time every corner in MMMC.
  • Useful skew. When a tool delays a capture clock to help setup, the hold check on that flop gets harder. Negative hold gives a little room, not a guarantee (see useful skew).

Common mistakes#

  1. Treating a negative hold as "no hold check needed". The check is still there, with a negative requirement. And the other D edge may have a positive one.
  2. Quoting one hold number for a flop. There are two edges, 49 slew points and several corners.
  3. Ignoring the slew dependence. A degraded clock transition can turn negative hold positive, as the +2.33 ps case shows.
  4. Trusting extrapolated values. If the D or CLK slew is outside the table range (here, above 320 ps), the value is extrapolated and unreliable. Fix the transition.
  5. Editing or clamping library values without sign-off agreement. Margins belong in uncertainty or derates that everyone can see, not in hidden library edits.

Debugging flowchart#

Figure 5. Debug flowchart for violations at a flop with negative or unexpected setup and hold values.

In OpenSTA, report_checks -path_delay min -rise_to <pin> and -fall_to <pin> split the two edges. Add -fields {slew} to see the slews used for the lookup. After any fix, re-check setup on the same path and re-time all modes and corners. A hold buffer that fixes TT can create a setup problem at SS (see ECO in physical design).

Interview questions and answers#

1. Can hold time be negative? Explain. Yes. Hold is measured at the cell pins. If the internal data path from D to the storage node is slower than the internal clock path, data can change at the pin slightly before the clock edge and still arrive inside after the latch has closed.

2. Can setup time be negative? Yes, when the internal clock path is slower than the internal data path. Data can arrive at the pin slightly after the clock edge and still be captured. ASAP7 DFFHQNx1 shows this for a falling D with slow clock edges.

3. Can setup and hold both be negative at the same time? For the same edge and slews, their sum cannot be negative, since the flop needs some window of stable data. One of them can be negative; in ASAP7 the smallest setup + hold is still positive (+1.31 ps at FF for a rising D).

4. Does a negative hold time help or hurt hold closure? It helps. The required time drops, so data may arrive earlier. Fewer hold buffers are needed on short paths.

5. Why does a slow clock transition make hold worse? In the characterized tables, a slower CLK edge shifts the internal sampling point later relative to the CLK pin's 50% point. In ASAP7 TT, hold for a rising D goes from −3.54 ps at 20 ps CLK slew to +2.33 ps at 80 ps.

6. How is setup time characterized? By sweeping the data-to-clock offset at transistor level for each slew pair, and finding where clock-to-Q pushes out by a set amount (a common choice is 10%) or capture fails. Hold is found the same way, with setup kept large.

7. A flop has negative hold. Why do you still see a hold violation at its input? The other D edge may have a positive hold, the clock slew may be worse than assumed, or the skew is larger than the credit. In the OpenSTA demo, the rising D passed with −3.85 ps hold but the falling D failed with +10.10 ps.

8. What is setup-hold interdependence? The setup needed depends on how much hold margin is given, and vice versa. Libraries characterize each with the other relaxed, which is slightly pessimistic. Research such as Salman et al. (2007) uses the interdependence to reduce STA pessimism.

FAQ#

Is a negative value in the .lib a characterization error? Not by itself. Negative constraint values are normal. Treat very noisy or non-monotonic tables with care, and ask the library team if something looks wrong.

Do latches also have negative setup and hold? Yes. ASAP7's DHLx1 latch has negative values in its setup_falling and hold_falling tables, measured to the closing edge (see time borrowing).

Summary#

  • Setup and hold are measured at the cell pins. Internal data and clock delays can push either one below zero; the window width, setup + hold, stays positive.
  • In ASAP7 DFFHQNx1, hold for a rising D is negative in 33 to 35 of 49 table points depending on corner, while hold for a falling D is mostly positive.
  • STA uses the looked-up value as-is. Negative hold lowers the hold requirement; negative setup raises the setup required time.
  • Values depend strongly on D slew, CLK slew, edge and corner. A slow clock edge turned −3.54 ps hold into +2.33 ps.
  • Always check both D edges: in the OpenSTA demo the rising D passed with −3.85 ps hold while the falling D failed by 9.06 ps, fixed with one hold buffer.

References#

  • E. Salman, A. Dasdan, F. Taraporevala, K. Kucukcakar and E. G. Friedman, "Exploiting Setup–Hold-Time Interdependence in Static Timing Analysis," IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 26, no. 6, pp. 1114–1125, 2007. DOI: 10.1109/TCAD.2006.885834
  • L. T. Clark et al., "ASAP7: A 7-nm finFET predictive process design kit," Microelectronics Journal, vol. 53, pp. 105–115, 2016. DOI: 10.1016/j.mejo.2016.04.006
  • ASAP7 standard-cell libraries used here (asap7sc7p5t_SEQ_RVT_*_nldm_220123.lib), as packaged in OpenROAD-flow-scripts: github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
  • OpenSTA static timing analyzer, Parallax Software: github.com/parallaxsw/OpenSTA

Written by

Swasti Pujari

Associate Director, Backend Engineering at CoreIC Technologies, with 15+ years in VLSI Physical Design and backend engineering. Previously Practice Head at UST Global, leading Physical Design, STA, EMIR, DFT, and Physical Verification. Delivered 3nm, 6nm and 7nm projects for AMD, Intel, and Microchip, and published IEEE research on hybrid AI-EDA floorplanning.