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. Chained #0 Delays vs Single NBA

VLSI DV Interview Puzzles · All levels

Chained #0 Delays vs Single NBA

Find final x at end of the time slot. Explain why two #0 assignments still lose to one NBA assignment.

On this page

    Puzzle

    Difficulty: Medium · Puzzle 3 of 6 · Topic: Event Scheduling Puzzles

    Find final x at end of the time slot. Explain why two #0 assignments still lose to one NBA assignment.

    Code

    tb.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    module tb;
      int x = 0;
      initial begin
        fork
          begin
            x = 1;
            #0 x = 2;
            #0 x = 4;
          end
          begin
            x <= 3;
          end
        join
        $strobe("[%0t] final x=%0d", $time, x);
      end
    endmodule

    Hint

    Iterative inactive regions still complete before NBA commit.

    Step-by-step solution

    Diagram
    1) Active region executes x=1 and schedules x<=3 for NBA.
    2) First #0 assigns x=2 in inactive.
    3) Second #0 assigns x=4 in another inactive iteration.
    4) After inactive queue drains, NBA commits x=3.
    5) Postponed $strobe prints final x=3.

    Answer

    Answer: Final printed value is x=3 at t=0. Repeated #0 updates do not outrun the pending NBA update in that slot.

    Why candidates get it wrong

    Candidates often assume more #0 hops can override NBA; scheduler order is fixed.

    Interviewer follow-up

    How would behavior change if the NBA were replaced with blocking x = 3?

    Related topics

    • Back to Event Scheduling Puzzles

    • Concurrency & Timing Puzzles section

    Previous

    57 / 210

    Next: Program Reactive Drive Lag

    Up next

    Up nextProgram Reactive Drive Lag

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Observed Assertion Sees Previous Cycle
    • Last NBA in a Process Wins
    • Assertion Action Block Cannot Rewind Edge