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
      • Taxonomy and Intent
      • Multicycle Setup and Hold Pairing
      • RTL Pattern That Often Needs MCP
      • False Paths and Case Analysis
    • Clock Gating
    • RTL for Timing
    • Clock Architecture
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Timing Exceptions
  1. Topics
  2. RTL Design
  3. Timing & Clocking
  4. Timing Exceptions
  5. Multicycle Setup and Hold Pairing

Part 5 · Timing & Clocking · Intermediate

Multicycle Setup and Hold Pairing

How setup N moves the hold check, the matching hold exception, and simulation results.

On this page

    Why this matters

    A -setup 3 exception alone also moves the hold check two edges later, so the tool demands data stay stable for periods you never need. And a 3-cycle exception hides a real violation if the capture phase gives only one period.

    After this lesson you can: move the setup and hold edges for a multicycle path, write the matching -hold N-1 exception, and show why capture frequency alone does not prove N cycles.

    Setup and hold edges

    The following table assumes matching rising-edge clock waveforms, one period T apart, with setup moved relative to capture and the hold adjustment restoring the original same-edge relationship. For divided, phase-shifted or unequal-frequency clocks, list actual launch/capture times, choose whether -start shifts launch-clock cycles or -end shifts capture-clock cycles, and inspect both setup and hold reports before approving an exception.

    Data launched on edge n must arrive before edge n+1 for setup. It must not arrive before edge n has finished capturing, which is the hold requirement.

    Capturing only every N cycles moves the setup check to edge n+N. By default the hold check moves to edge n+N−1 as well, so a second exception moves it back.

    Check

    Default (1 cycle)

    After -setup N

    After -hold N-1 as well

    Setup edge

    n + 1

    n + N

    n + N

    Hold edge

    n

    n + N − 1

    n

    slacksetup,N​=N⋅T+skew−tsu​−us​−(tcq​+tlogic,max​)
    N = 3: data launches at edge n. The setup check moves from n+1 to n+3, the hold check slides from n to n+2, and the second exception puts it back at n.

    Read each row left to right: the arrow is the setup check from the launch edge n to the capture edge it is measured against, and the dot is the edge the hold check uses.

    • Only the arrow moves in the first change: setup gets 3 periods instead of 1.

    • The dot moves too, to n+2, because the tool keeps the hold edge one period before the setup edge unless told otherwise.

    • That moved hold check would demand the data stay put for two extra periods, which is almost never real, so the second exception pulls it back to n.

    Diagram
    set_multicycle_path 2 -setup -from $launch -to $capture
    set_multicycle_path 1 -hold  -from $launch -to $capture     # N-1 = 1

    Cadence alone is insufficient

    Illustrative edge

    Launch enable

    Capture enable

    Actual interval

    E0 (0 ns)

    1

    0

    Operands launch

    E1 (1 ns)

    0

    1

    Only 1 ns since E0

    E2 (2 ns)

    0

    0

    Source holds

    E3 (3 ns)

    1

    0

    Next launch

    E4 (4 ns)

    0

    1

    Again only 1 ns since launch

    Both enables repeat every three edges, but their phase gives only one period, not three. A 3-cycle exception would hide a real violation. The multiplier below instead launches at E0 and captures at E3. Its finite checker observes that interval; the delay model below checks setup only and cannot validate the SDC hold pairing.

    Simulation of five paths

    Five versions of a 1.0 ns clock launch and capture at different cadences. Each capture checks both the value launched K cycles earlier and the setup window. Setup slack uses K cycles of budget.

    Case

    Logic

    Launch / capture

    Intended cycles K

    Slack with K cycles

    Result

    0

    1.4 ns

    every 2nd cycle

    2

    +0.13 ns

    0 wrong captures

    1

    1.4 ns

    every cycle

    1

    −0.87 ns

    every capture wrong

    2

    2.4 ns

    every 2nd cycle

    2

    −0.87 ns

    every capture wrong

    3

    2.4 ns

    every 3rd cycle

    3

    +0.13 ns

    0 wrong captures

    4

    1.6 ns

    every 2nd cycle

    2

    -0.07 ns

    Value arrives before capture but inside the 0.12 ns setup window

    Cases 0 and 1 use the same 1.4 ns logic and differ only in cadence. A path is only too slow relative to how often it is captured, and the exception records that RTL property without making hardware faster.

    Common mistakes

    Common pitfall

    Declaring a 2-cycle path for case 2 (2.4 ns of logic) would pass nothing in reality: with K = 2 the slack is −0.87 ns. A multicycle number must be large enough, and the RTL cadence must actually be at least that long.

    Tip

    In practice the RTL gives the number: a state machine that waits three cycles gives N = 3 (as in the multi-cycle multiplier of the next lesson). If you cannot read N from the RTL, you do not yet have a legal multicycle path.

    Check yourself With -setup 3, where does the default hold check move to, and which exception restores it?

    To edge n + 2 (N − 1). set_multicycle_path 2 -hold moves it back to edge n.

    Testbench

    The five path variants plus a directed setup-boundary regression. Case 4 must have zero value mismatches and nonzero setup violations: checking only the sampled value would miss it. This model does not check hold or replace STA.

    mcp_path.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    `timescale 1ns/1ps
    
    // Launch a new counter value every LAUNCH_EVERY cycles through a path with delay LOGIC.
    // The capture register samples every CAP_EVERY cycles and is EXPECTED to see the value launched K cycles earlier.
    module mcp_path #(parameter real LOGIC = 1.4, parameter int LAUNCH_EVERY = 2, CAP_EVERY = 2, K = 2) (
      input  logic clk,
      output int   mismatches, captures, setup_viol,
      output real  slack_k_cycles
    );
      localparam real TCQ = 0.35, TSU = 0.12, T = 1.0;
      int e = 0;                                   // edge counter
      logic [7:0] q1, d2, q2;
      logic [7:0] launched [0:255];
      logic [7:0] value = 0;
      realtime t_d = -100.0;
      initial begin mismatches = 0; captures = 0; setup_viol = 0; q1 = 0; end
    
      assign #(LOGIC) d2 = q1;                     // the combinational path
      always @(d2) t_d = $realtime;
    
      always @(posedge clk) begin
        e++;
        if (e % LAUNCH_EVERY == 0) begin           // launch: a new value leaves the launch register TCQ after the edge
          value = value + 1;
          q1 <= #TCQ value;
        end
        launched[e] = value;                       // what the launch register holds, logically, after edge e
    
        if (e % CAP_EVERY == 0 && e > 10) begin    // capture: sample whatever has arrived at the capture register
          if ($realtime - t_d < TSU) begin
            setup_viol++;
            q2 <= 'x;
          end else q2 <= d2;
          captures++;
          if (d2 !== launched[e - K]) mismatches++;
        end
      end
    
      assign slack_k_cycles = K * T - TSU - TCQ - LOGIC;     // setup slack if the path is given K cycles
    endmodule
    

    Remember

    • -setup N moves the setup edge to n+N. The hold edge follows to n+N-1, and -hold N-1 puts it back at n.

    • The cadence must give at least N periods between launch and capture. Both enables repeating every three edges is not enough if their phase gives one.

    • The number N comes from the RTL. If you cannot read N from it, you do not have a legal multicycle path.

    Rule of thumb: a multicycle number must be large enough for the logic and true in the RTL cadence.

    How this was checked

    The five-path simulation (1.0 ns clock, cases 0 to 4) checks captured values and the setup window. The delay model checks setup only and cannot validate the SDC hold pairing. The N and N-1 recipe assumes matching same-clock waveforms.

    Keep going

    • Code lab: Timing exception path

    • Interview: run a mock interview on this topic

    Related topics

    • RTL pattern that needs MCP

    Previous

    133 / 350

    Next: RTL Pattern That Often Needs MCP

    Up next

    Up nextRTL Pattern That Often Needs MCP

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • False Paths and Case Analysis