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

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

Part 5 · Timing & Clocking · Intermediate

Setup, Hold and Slack

Setup and hold checks, slack equations, and simulations that violate each one.

  • 6topics
  • 6lessons

Topics in this section

  1. 1Core Equations and Slack1 lesson
  2. 2Interpretation Shortcut1 lesson
  3. 3Worked Numeric Examples1 lesson
  4. 4Example 1: Setup Failure1 lesson
  5. 5Example 2: Hold Failure1 lesson
  6. 6Fix Strategy: Setup vs Hold1 lesson
On this page

    A flip-flop samples its D input at the clock edge. Data must be stable before the edge (setup) and after it (hold).

    Launch flip-flop, logic, capture flip-flop.
    A timing path: data leaves the launch flip-flop on one edge and must meet the capture flip-flop's window at the following edge (setup) without disturbing the current edge's window (hold).

    Check

    Question

    Depends on clock period?

    Fix by

    Setup

    Did the new data arrive early enough before the next edge?

    Yes

    Less logic, earlier launch branch or later capture branch, longer period

    Hold

    Did the new data stay away until after this edge's window closed?

    No

    Add delay on the data path, reduce skew

    Moving the capture clock earlier reduces setup slack; moving the launch clock earlier increases it. Useful skew means changing the specified branch relative to the other one. Recheck incoming hold and outgoing setup paths after any clock-tree change.

    Lessons in this topic

    6 lessons, about 23 min

    1. 1Core Equations and SlackYou 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.5 min
    2. 2Interpretation ShortcutYou can read a slack value by sign and size, tell setup from hold, and estimate a minimum period from the worst setup slack.4 min
    3. 3Worked Numeric ExamplesYou can compute setup and hold slack for six paths from logic delay and skew, and trace one launch to its capture edge.5 min
    4. 4Example 1: Setup FailureYou can recompute the slack of a failing setup path after each of four fixes, and choose between pipelining, restructuring, a faster cell and useful skew.3 min
    5. 5Example 2: Hold FailureYou can compute a hold slack for a short path, list the fixes that move it, and explain why slowing the clock does not.3 min
    6. 6Fix Strategy: Setup vs HoldYou can compare setup and hold violations side by side, and plan the order of fixes across constraints, RTL, clock tree and hold buffers.3 min
    Check yourself Slowing the clock by 10 % fixes a setup violation. Does it also fix a hold violation on another path?

    No. For a full-cycle, same-edge register path, hold is checked against the same clock edge, so the period does not appear in the hold equation. Only delay on the data path or skew changes can fix it.

    Interview

    “Which violation is worse, setup or hold?” Hold, because it cannot be fixed by slowing the clock and the chip may not work at any frequency. Setup failures can be mitigated by reducing the clock speed.

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    Core Equations and Slack

    • 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.

    Interpretation Shortcut

    • Setup scales with the clock period. Hold does not, and a hold violation is a short-path problem.

    • For a full-cycle same-clock path, minimum period is the target period minus the worst setup slack (2.0 ns with WNS -0.12 ns gives about 2.12 ns).

    • Do not compare slack across different constraint sets.

    Rule of thumb: split the path into clock-to-Q, logic, wire, setup and skew before choosing a fix.

    Worked Numeric Examples

    • The model uses 0.35 ns clock-to-Q, 0.12 ns setup and 0.06 ns hold.

    • Path 1 (1.64 ns of logic) fails setup, path 4 fails hold, and skew moves the slack of both checks in opposite directions.

    • A violated window drives the modelled output to X as a diagnostic. It does not predict silicon.

    Rule of thumb: compute the slack by hand, then see whether the model agrees.

    Example 1: Setup Failure

    • Each fix recomputes slack for the same path. Compare the side effects, not only the new slack.

    • Pipelining gives the most slack but changes latency and may need valid and flush control.

    • Useful skew moves the problem. Re-check the capture flop's outgoing setup paths and the incoming hold path.

    Rule of thumb: look at the path report first: many levels, restructure or pipeline; high fanout, duplicate or retime.

    Example 2: Hold Failure

    • New data takes 0.40 ns and the hold window ends 0.44 ns after the launch edge, so the path fails by 0.04 ns.

    • Only data-path delay or skew changes hold slack.

    • Clock tree synthesis and automatic hold fixing with delay cells handle most hold violations in the flow.

    Rule of thumb: fix hold after the clock tree is built, not before.

    Fix Strategy: Setup vs Hold

    • Fix setup first, structurally in RTL. Then build the clock tree and fix hold with delay cells.

    • Thousands of hold buffers hint at a skew or architecture problem.

    • Re-run both checks at all corners after each fix.

    Rule of thumb: never close timing by loosening constraints you do not understand.

    Practise it

    • Mini project: close timing on an 8-tap FIR filter

    • Interview: run a mock interview on this topic

    PreviousNext: Core Equations and Slack

    Up next

    Up nextCore Equations and Slack

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • STA Foundations
    • Skew and Variation
    • Timing Exceptions