VLSI DV Interview Puzzles · All levels

Fork Join Puzzles

These puzzles test process-lifetime reasoning under real simulator scheduling. You need to predict when parent code resumes, which child threads keep running, and exactly what scope `disable fork` can terminate.

About this puzzle set

These puzzles test process-lifetime reasoning under real simulator scheduling. You need to predict when parent code resumes, which child threads keep running, and exactly what scope `disable fork` can terminate.

Puzzles in this topic

diagram
1. join vs join_any vs join_none  [Easy]
2. Loop Variable Capture in Detached Threads  [Medium]
3. wait fork Synchronization Point  [Easy]
4. disable Named Fork Scope  [Hard]
5. join_any Without Cleanup  [Medium]
6. Inner disable fork Does Not Kill Outer Sibling  [Hard]

Work each puzzle before reading the solution: predict the exact output or answer, name the rule that governs it, then check yourself.

SV scheduling regions at puzzle scale

diagram
SYSTEMVERILOG EVENT REGIONS (SIMPLIFIED ORDER)

time slot T
   |
   +--> ACTIVE   : blocking statements, RHS sampling
   +--> INACTIVE : #0 queued work
   +--> NBA      : non-blocking LHS updates commit
   +--> OBSERVED : assertions sample stable design values
   +--> REACTIVE : testbench/program reaction code

If behavior looks impossible, ask: "Which region saw which value?"

Related topics