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
    • Skew and Variation
    • Timing Exceptions
    • Clock Gating
    • RTL for Timing
      • Practice
      • Fanout
      • Patterns
      • RTL Hooks
      • Checklist
      • Cutting Logic Depth: a Timing-Closure Story
      • Mini Project: Close Timing on a FIR Filter
    • Clock Architecture
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹RTL for Timing
  1. Topics
  2. RTL Design
  3. Timing & Clocking
  4. RTL for Timing
  5. Practice

Part 5 · Timing & Clocking · Intermediate

Practice

A depth budget from the clock period and the design rules that keep paths within it.

On this page

    Why this matters

    At 2.0 ns, clock-to-Q, setup and margin leave 1.38 ns for logic, which is roughly 13 gate levels. A 16-bit adder at 31 levels and a 32-bit comparator at 20 levels will not fit, and you can see this before you run synthesis.

    After this lesson you can: turn a clock period into a logic depth budget, compare an operation against it, and apply the seven design rules.

    Depth budget

    The clock period minus fixed costs leaves the budget for logic and wire. Dividing by a typical gate delay gives a depth budget for writing RTL.

    Item

    Example

    Clock period

    2.0 ns (500 MHz)

    Clock-to-Q + setup

    0.35 + 0.12 = 0.47 ns

    Uncertainty and skew margin

    0.15 ns

    Left for logic and wire

    2.0 − 0.47 − 0.15 = 1.38 ns

    Typical gate + wire delay

    0.10 ns (illustrative)

    Depth budget

    ≈ 13 levels

    The 2.0 ns period split into clock-to-Q, logic and wire, setup and margin. Each tick in the logic segment is one 0.10 ns gate level.

    Read the bar from left to right: one clock period from the launch edge to the capture edge.

    • The fixed costs (clock-to-Q, setup and margin) take 0.62 ns before any logic is placed.

    • The highlighted segment is all the logic and wire gets: 1.38 ns.

    • Thirteen 0.10 ns levels fit inside it; a fourteenth would need 1.40 ns and fail.

    The second table compares earlier mapping examples with the illustrative 13-level estimate. Gate levels are not equal delays: calibrate against the target library, synthesis flow, corner, load, slew and wire estimates before choosing an architecture. These counts are not measured timing for your target.

    Operation (earlier measurement)

    Levels

    Fits 13?

    8-bit adder

    15

    Above estimate; inspect mapped delay before choosing a fix

    32-bit comparator

    20

    No: restructure or pipeline

    16-bit adder

    31

    No: prefix adder or two stages

    8×8 multiplier

    30

    No: multi-cycle or pipeline

    Design rules

    Seven rules help allocate the budget; registered boundaries still require setup/hold, input/output delays, slew/load and clock relationship constraints.

    1. Budget and register the interfaces where appropriate. Registers isolate internal logic from boundary paths; they do not remove pin-to-register or register-to-pin timing budgets, and extra ranks change consumer latency.

    2. Know your longest paths from the architecture, before synthesis: wide add, multiply, compare, priority, mux trees.

    3. Avoid long chains of dependent operators in one expression (a + b + c + d as a chain; wide if/else if ladders).

    4. Put late-arriving signals last in a logic expression: a late select drives the final mux, not the first.

    5. Limit fanout: a control signal that goes to hundreds of flops needs a duplicated driver.

    6. Make the number of pipeline stages a parameter when the path is uncertain.

    7. Don't share a slow resource across critical paths in a way that adds muxes in front.

    Tip

    Use paper levels (two-input gate levels) as structural estimates: an ideal AND-OR select is 2 levels, a 4:1 mux 2, a tree comparator roughly log₂ N + 2, a ripple adder roughly 2N (N carry stages). Mapping and fan-in change those counts; plain + does not require a ripple implementation. Confirm target delays before inserting registers.

    When splitting an operation, pipeline operands, carry/partial results, valid and side data for the same transaction. Check both setup and hold on every new stage.

    Related topics

    • Registered boundary budgets

    • Architecture and mapped depth

    Common mistakes

    Common pitfall

    Don't spend effort making logic faster than the clock needs. Over-optimising a path that already meets timing costs area and power for no benefit.

    Use the budget to decide, not to chase the minimum.

    Check yourself A block has a 1.25 ns clock, 0.45 ns of clock-to-Q plus setup, and 0.10 ns of margin. How many 0.1 ns levels fit?

    1.25 − 0.45 − 0.10 = 0.70 ns, so about 7 levels.

    Remember

    • Depth budget = (period - clock-to-Q - setup - margin) / gate-plus-wire delay.

    • Register interfaces where appropriate, put late signals last, limit fanout, and make pipeline stages a parameter when the path is uncertain.

    • Gate levels are not equal delays. Check the target library, corner, load and wire before you choose an architecture.

    Rule of thumb: use the budget to decide, not to chase the minimum.

    How this was checked

    The 0.10 ns gate-plus-wire delay and the 13-level budget are teaching numbers. The level counts come from earlier mapping examples and are not measured timing for your target.

    Keep going

    • Practice: Pipelined arbiter for timing closure

    • Interview: run a mock interview on this topic

    Related topics

    • Fanout

    Previous

    141 / 350

    Next: Fanout

    Up next

    Up nextFanout

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Patterns
    • RTL Hooks
    • Checklist