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. Example 1: Setup Failure

Part 5 · Timing & Clocking · Intermediate

Example 1: Setup Failure

Four fixes for a path with negative 0.12 ns setup slack and their costs.

On this page

    Why this matters

    A path with 1.65 ns of logic in a 2 ns cycle misses setup by 0.12 ns. There are four ways to fix it, and each moves a cost somewhere else.

    After this lesson you 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.

    Failing path

    This illustrative path carries 1.65 ns of logic with no skew, for -0.12 ns setup slack. It is the unskewed counterpart of path 2; simulated path 1 uses 1.64 ns to avoid an event coincidence and therefore has -0.11 ns slack.

    Item

    Value

    Clock period T

    2.00 ns

    Clock-to-Q

    0.35 ns

    Logic + wires (max)

    1.65 ns

    Setup requirement

    0.12 ns

    Skew

    0.00 ns

    Setup slack

    2.00 − 0.12 − 0.35 − 1.65 = −0.12 ns

    Four fixes

    Each fix recomputes slack for the same path. Costs move elsewhere, so compare before choosing.

    Fix

    New slack

    Cost / side effect

    Cut logic from 1.65 to 1.50 ns (restructure, fewer levels)

    2.00 − 0.12 − 0.35 − 1.50 = +0.03 ns

    RTL effort; usually area increases

    Slow the clock to 2.20 ns

    2.20 − 0.12 − 0.35 − 1.65 = +0.08 ns

    500 → 454.55 MHz: 9.09 % lower frequency for a 10 % longer period. Improves this full-cycle path by 0.20 ns with fixed delays/skew; other constraints and remaining failures need rechecking. No same-edge hold benefit

    Useful skew: delay the capture clock by 0.30 ns

    2.00 + 0.30 − 0.12 − 0.35 − 1.65 = +0.18 ns

    The capture flop's outgoing paths lose 0.30 ns; hold slack on the incoming path drops by 0.30 ns

    Pipeline: split logic 0.85 + 0.80 ns with a new register

    Stage 1: 2.00 − 0.12 − 0.35 − 0.85 = +0.68 ns; stage 2: +0.73 ns

    One more cycle of latency and one more rank of registers; both stages have large margin

    Tip

    The pipeline option has the most slack, but it changes latency and may need control logic (valid bits, flush) to match. Prefer it when the whole design is already latency-tolerant, and prefer restructuring when slack is only slightly negative.

    Common mistakes

    Common pitfall

    “Add useful skew” sounds free but moves the problem. Always re-check the capture flop's outgoing setup paths and the incoming hold path. Implementation tools do this balancing automatically; do not rely on it in the RTL.

    Interview

    Asked “setup fails by 0.12 ns, what do you do?”, structure the answer as: look at the path report; if the path has many levels, restructure or pipeline; if it has a high-fanout net, duplicate or retime; as a last option relax the clock or exploit skew, and always re-check hold.

    Check yourself Compute the setup slack if both the logic is cut to 1.50 ns and the clock is relaxed to 2.20 ns.

    2.20 − 0.12 − 0.35 − 1.50 = +0.23 ns.

    Remember

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

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Example 2: hold failure

    Previous

    124 / 350

    Next: Example 2: Hold Failure

    Up next

    Up nextExample 2: Hold Failure

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Core Equations and Slack
    • Interpretation Shortcut
    • Fix Strategy: Setup vs Hold