VLSI DV Interview Puzzles · All levels
String and Casting Puzzles
This set combines string API edge cases with runtime typing semantics. Interviewers use these to test whether you understand index-based string operations, conversion methods, and the exact success/failure behavior of `$cast`.
About this puzzle set
This set combines string API edge cases with runtime typing semantics. Interviewers use these to test whether you understand index-based string operations, conversion methods, and the exact success/failure behavior of `$cast`.
Puzzles in this topic
diagram
1. String Substr with Runtime Class Cast [Easy]
2. putc/getc Index Semantics [Medium]
3. Case-Sensitive vs Case-Insensitive Compare [Easy]
4. Enum Safety with $cast [Medium]
5. Failed Class Cast Leaves Old Handle [Hard]
6. String Number Parsing Stops Early [Medium]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?"