Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
    • STA Foundations
    • Setup, Hold and Slack
      • Core Equations and Slack
      • Interpretation Shortcut
      • Worked Numeric Examples
      • Example 1: Setup Failure
      • Example 2: Hold Failure
      • Fix Strategy: Setup vs Hold
    • Skew and Variation
    • Timing Exceptions
    • Clock Gating
    • RTL for Timing
    • Clock Architecture
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Setup, Hold and Slack
  1. Topics
  2. RTL Design
  3. Timing & Clocking
  4. Setup, Hold and Slack
  5. Core Equations and Slack

Part 5 · Timing & Clocking · Intermediate

Core Equations and Slack

Setup and hold slack formulas with each term and corner explained.

On this page

    Why this matters

    Skew helps setup and hurts hold. A later capture clock gives setup extra time and takes hold time away, which is why useful skew can fix one violation and create another.

    After this lesson you can: write the setup and hold slack equations, place them on a timeline, and say how skew, data delay and the clock period move each one.

    Symbols

    These symbols appear in both slack formulas. Subscripts s and h mark setup and hold.

    Symbol

    Meaning

    T

    Clock period

    t_cq,max / t_cq,min

    Late/max clock-to-Q for setup; early/min clock-to-Q for hold, in the analyzed view

    t_logic

    Delay of combinational logic and wires on the path (max for setup, min for hold)

    t_su, t_h

    Setup and hold requirements of the capture flip-flop

    skew

    Capture clock arrival minus launch clock arrival (positive = capture clock is later)

    u_s, u_h

    Clock uncertainty margins for setup and hold

    Slack equations

    For the full-cycle, rising-edge, same-clock paths here, setup checks the next edge with late/max data delay; hold checks the same edge with early/min data delay. Evaluate each in every required mode/library/RC view. Slow setup and fast hold are useful starting intuitions, not exclusive signoff corners. Skew is the applicable early/late clock difference for that check, with variation/common-clock correction handled by STA.

    Setup slack

    slacksetup​=required time(T+skew−tsu​−us​)​​−arrival time(tcq,max​+tlogic,max​)​​

    Hold slack

    slackhold​=arrival time(tcq,min​+tlogic,min​)​​−required time(skew+th​+uh​)​​

    Put the equations on a timeline

    These are two independent constructed paths from the worked-examples lesson, measured from the launch clock edge at 0 ns. Both use setup 0.12 ns and hold 0.06 ns, with uncertainty set to zero to expose the edge relationship. The boxed interval and dashed boundary guides mark the capture flop's physical setup/hold window; the data dot marks a transition, not a logic level.

    Path 2: T=2 ns, positive skew=0.30 ns. Latest arrival is 0.35+1.65=2.00 ns; the next capture edge is 2.30 ns and its setup deadline is 2.18 ns.

    For setup, the captured word must be settled by next capture edge - setup. A +0.30 ns capture delay moves that deadline 0.30 ns later: without skew this path has -0.12 ns slack; with skew it has +0.18 ns. The final data must also stay stable through the capture hold window; that is checked separately with the next launched word's earliest arrival.

    Path 4, magnified time scale: skew=0.38 ns. Earliest new data is 0.35+0.05=0.40 ns, inside the same edge's window ending at 0.44 ns.

    For hold, the old word must survive until same capture edge + hold. The short path brings the next word at 0.40 ns, but the old word is needed through 0.44 ns. Delaying capture makes this requirement later and therefore harder. Adding 0.20 ns of data delay moves arrival to 0.60 ns and yields +0.16 ns hold slack. Increasing T does not move this same-edge window.

    Nonzero setup uncertainty moves the setup deadline earlier; hold uncertainty moves the hold requirement later. Those margins shrink usable slack but are not extra physical setup/hold time inside the flop. Separate early/late variation and common-clock correction are covered in skew and variation.

    Check yourself With fixed path delays, capture moves 0.10 ns later. How do setup and hold slack change?

    Setup gains 0.10 ns and hold loses 0.10 ns. The setup deadline moves later, but the old-data hold deadline also moves later.

    Setup

    Hold

    Data reference edge

    Next capture edge (T later)

    Same capture edge

    Path delay used

    Maximum (slowest)

    Minimum (fastest)

    Effect of positive skew (capture later)

    Helps (more time)

    Hurts (data must stay away longer)

    Effect of larger T

    Helps

    None

    Corner intuition (not a signoff restriction)

    Slow data often limits; check all required views

    Fast data often limits; check all required views

    Slack is the margin to the requirement. Positive slack means met with room, zero means just met, and negative means a violation by that amount.

    The tool reports the worst slack per endpoint.

    Try it: move the numbers

    The calculator starts on the check-yourself path below (T = 2.0 ns, clock-to-Q 0.35 ns, logic 1.45 ns, setup 0.12 ns): setup slack +0.08 ns. Change one value at a time and watch which slack moves.

    Slack calculator

    Loading slack calculator…

    Setup uses the next capture edge and the longest path; hold uses the same edge and the shortest path. Both are drawn from the launch edge at 0 ns.
    • Raise the logic delay to 1.65 ns: setup fails by 0.12 ns. Now set skew to +0.30 ns and it passes with +0.18 ns.

    • Set skew to +0.38 ns: hold fails by 0.04 ns. Lengthening the period does nothing for it; raising the minimum logic delay to 0.25 ns gives +0.16 ns.

    • Watch the fastest-clock readout: it is the clock-to-Q, logic and setup added up, minus the skew.

    Common mistakes

    Tip

    Memorise the sign of skew: a later capture clock gives setup extra time (+skew in the setup formula) and takes hold time away (positive skew reduces hold slack). That one fact explains why useful skew can break hold.

    Check yourself For T = 2.0, t_cq = 0.35, t_logic,max = 1.45, t_su = 0.12, no skew and no uncertainty, what is the setup slack?

    Required = 2.0 − 0.12 = 1.88. Arrival = 0.35 + 1.45 = 1.80. Slack = +0.08 ns (met).

    Remember

    • Setup checks the next edge with the late (max) data delay. Hold checks the same edge with the early (min) data delay.

    • A later capture clock gives setup more time and hold less.

    • Slack is the margin to the requirement: positive means met, zero just met, negative a violation by that amount.

    Rule of thumb: positive skew helps setup and reduces hold slack.

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Interpretation shortcut

    Previous

    121 / 350

    Next: Interpretation Shortcut

    Up next

    Up nextInterpretation Shortcut

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Worked Numeric Examples
    • Example 1: Setup Failure
    • Example 2: Hold Failure