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
      • Observed Assertion Sees Previous Cycle
      • Does #0 Beat NBA?
      • Chained #0 Delays vs Single NBA
      • Program Reactive Drive Lag
      • Last NBA in a Process Wins
      • Assertion Action Block Cannot Rewind Edge
    • Race Condition Puzzles
    • Clocking Block Puzzles
    • 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

‹Event Scheduling Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Concurrency & Timing Puzzles
  4. Event Scheduling Puzzles
  5. Program Reactive Drive Lag

VLSI DV Interview Puzzles · All levels

Program Reactive Drive Lag

Determine when ack becomes 1 and why the program drive appears one cycle late to DUT sequential logic.

On this page

    Puzzle

    Difficulty: Hard · Puzzle 4 of 6 · Topic: Event Scheduling Puzzles

    Determine when ack becomes 1 and why the program drive appears one cycle late to DUT sequential logic.

    Code

    dut.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    module dut(input bit clk, input bit req, output bit ack);
      always @(posedge clk) ack <= req;
    endmodule
    
    module top;
      bit clk = 0;
      bit req = 0;
      bit ack;
      dut u_dut(.clk(clk), .req(req), .ack(ack));
      always #5 clk = ~clk;
    
      program automatic tb;
        initial begin
          @(posedge clk);
          req = 1;
          $display("[%0t REACTIVE] drove req=1", $time);
          @(posedge clk);
          $display("[%0t REACTIVE] ack=%0b", $time, ack);
          $finish;
        end
      endprogram
    endmodule

    Hint

    Program blocks execute in reactive after module active/NBA.

    Step-by-step solution

    Diagram
    1) At t=5 posedge, DUT always executes before program and samples req=0.
    2) Program then drives req=1 in reactive at t=5.
    3) DUT cannot see that new req until next posedge at t=15.
    4) At t=15, DUT sets ack<=1, and program prints ack=1 in reactive.

    Answer

    Answer: ack becomes 1 at t=15, not t=5. The program drive occurs in reactive, after DUT sequential sampling for that edge.

    Why candidates get it wrong

    Assuming @posedge in module and program are equivalent timing domains causes off-by-one-cycle bugs.

    Interviewer follow-up

    Would a clocking block with output skew be a safer replacement than direct req assignment here?

    Related topics

    • Back to Event Scheduling Puzzles

    • Concurrency & Timing Puzzles section

    Previous

    58 / 210

    Next: Last NBA in a Process Wins

    Up next

    Up nextLast NBA in a Process Wins

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Observed Assertion Sees Previous Cycle
    • Does #0 Beat NBA?
    • Assertion Action Block Cannot Rewind Edge