Definitionintro
Setup and hold constraints
Also called setup time, hold time.
A register's data must be stable from the setup time before to the hold time after the clock edge, which bounds the longest and the shortest paths.
An edge-triggered register (a flip-flop) copies its data input to its output at each active edge of its clock. It copies the value correctly only if is stable during a short window around the edge: from the setup time before the edge to the hold time after it. For a path from one register to another this gives two inequalities: the setup constraint bounds the longest delay of the path from above, and the hold constraint bounds the shortest delay from below. Static timing analysis checks the setup constraint with the late arrival times and the hold constraint with the early ones.
Definition
Consider a launch register and a capture register with a combinational path from of to of , and a clock with period . Let and be the times at which a clock edge reaches the clock pins of and . Let and be the largest and the smallest delay from the clock pin of to the data pin of , over all paths between them; they include the clock-to-output delay of .
Setup constraint. The value launched at an edge must reach at least before the next edge at :
The setup slack is .
Hold constraint. The value launched at an edge must not reach before after the same edge at , or it would replace the value that is capturing at that edge:
The hold slack is . A negative or is a violation.
Late for setup, early for hold. The setup check uses the largest delay and the latest launch, and the hold check uses the smallest delay and the earliest launch. In the words of arrival and required time: the data pin of has the late required time and the early required time . Using the late arrival for the hold check would hide every hold violation.
Skew. Let be the clock skew of the pair. The constraints become
A positive skew helps the setup constraint and hurts the hold constraint by the same amount. This is the clock skew between two registers of one chip. The clock skew of distributed systems is the offset between the clocks of two processes, a different idea.
Two facts that follow.
- The hold constraint does not contain . A hold violation stays at every clock period, so it cannot be fixed by a slower clock. It is fixed by more delay on the short path or by less skew.
- If every register pair meets its hold constraint, the circuit works at every period , where over all register pairs joined by a path. With zero skew, is the longest register-to-register delay plus the setup time.
The values and are properties of the register cell, given in its library, and can depend on the slews of the data and clock signals. Either one can be negative, but their sum, the width of the window in which must be stable, is positive for a real register.
Examples and non-examples
One register pair. Let , , , , , and . The setup slack is , so the path meets setup, and it would meet setup at every period . The hold slack is , a violation at every period. A delay buffer of on the short path only gives and hold slack 0. If the buffer also lies on the long path, becomes and the setup slack .
A shift register. Let the output of drive of by a wire with no delay, with clock-to-output delay , so . With and a skew , the hold slack is . Short paths between neighboring registers are where hold violations appear, and they become worse when the clock reaches the capture register later.
Non-example: a latch. A level-sensitive latch is transparent while its clock is high. Data that arrives late during the transparent phase passes through and uses time of the next stage (time borrowing). The two inequalities above, with a single edge per register, do not describe it; latch timing needs a constraint per phase.
Non-example: the delay of one path. and range over all paths from to . Checking only the path that a simulation happens to excite is not a setup or hold check. A path that no input can excite may be excluded, but only as a declared false path.
Related definitions
- Multicycle path. If the design captures the data of a path only every cycles, the setup constraint uses in place of , and the hold check moves by cycles too. Tools need both settings, and forgetting the hold setting is a known mistake.
- Clock skew scheduling. If the clock times are variables, all setup and hold inequalities are difference constraints . Clock skew scheduling chooses the , and retiming moves the registers instead.
- Clock tree synthesis. The skews come from the clock tree, which is built for zero or bounded skew.
- Recovery and removal. For an asynchronous reset pin, the same two checks against the clock edge are called recovery (like setup) and removal (like hold).
- Metastability. When changes inside the window, the register may stay between 0 and 1 for an unbounded time. Setup and hold constraints are the condition under which this does not happen for synchronous paths.
References
- J. Bhasker and Rakesh Chadha, Static Timing Analysis for Nanometer Designs, A Practical Approach, Springer, 2009, Chapter 8, Timing Verification (the setup and hold timing checks, multicycle paths and false paths)
- John P. Fishburn, Clock skew optimization, IEEE Transactions on Computers 39(7), 945 to 951, 1990, the two constraints on each pair of registers (zero clocking for the long paths and double clocking for the short paths)
- Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, Springer, 1st edition, 2011, Chapter 8, Timing Closure, Section 8.2 (timing analysis and performance constraints)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag D3XRM3 Edit this page History Report an error Markdown