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

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
    • Event Scheduling Puzzles
    • Race Condition Puzzles
    • Clocking Block Puzzles
      • Why First Sample Sees Old grant
      • Interpreting |=> ##1 in Clocking Domain
      • output #1step Misses Current Edge
      • input #0 vs input #1step Snapshot
      • Raw @posedge Monitor vs @(cb) Monitor
      • Mixing Direct Drive and cb Drive
    • Semaphore & Mailbox Puzzles
    • Concurrency & Timing Puzzles: Tricky Q&A
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Clocking Block Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Concurrency & Timing Puzzles
  4. Clocking Block Puzzles
  5. output #1step Misses Current Edge

VLSI DV Interview Puzzles · All levels

output #1step Misses Current Edge

When does seen_req become 1 if req is driven via clocking block output #1step at first cb event?

On this page

    Puzzle

    Difficulty: Medium · Puzzle 3 of 6 · Topic: Clocking Block Puzzles

    When does seen_req become 1 if req is driven via clocking block output #1step at first cb event?

    Code

    ifc.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
    interface ifc(input bit clk);
      logic req;
      clocking drv_cb @(posedge clk);
        default output #1step;
        output req;
      endclocking
    endinterface
    
    module tb;
      bit clk = 0;
      ifc vif(clk);
      bit seen_req = 0;
      always #5 clk = ~clk;
    
      always @(posedge clk)
        seen_req <= vif.req;
    
      initial begin
        @(vif.drv_cb);
        vif.drv_cb.req <= 1;
        @(posedge clk); $display("[%0t] seen_req=%0b", $time, seen_req);
        @(posedge clk); $display("[%0t] seen_req=%0b", $time, seen_req);
        $finish;
      end
    endmodule

    Hint

    output #1step drives just after the edge, too late for same-edge sequential sampling.

    Step-by-step solution

    Diagram
    1) Drive at first cb event occurs one step after t=5 edge.
    2) Sequential always @(posedge clk) at t=5 already sampled old req=0.
    3) seen_req remains 0 at t=15 sample print.
    4) It becomes 1 on next edge and is visible at t=25 print.

    Answer

    Answer: seen_req updates one clock later than many expect: old at t=15 print, new at t=25 print.

    Why candidates get it wrong

    Assuming output #1step behaves like output #0 hides one-cycle slips.

    Interviewer follow-up

    What skew would you choose for same-edge DUT sampling intent?

    Related topics

    • Back to Clocking Block Puzzles

    • Concurrency & Timing Puzzles section

    Previous

    69 / 210

    Next: input #0 vs input #1step Snapshot

    Up next

    Up nextinput #0 vs input #1step Snapshot

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why First Sample Sees Old grant
    • Raw @posedge Monitor vs @(cb) Monitor
    • Mixing Direct Drive and cb Drive