SystemVerilog OOP Mastery · All levels
Handles, new(), and Construction Patterns: Interview Questions
Interview Questions for Handles, new(), and Construction Patterns.
Interview questions
Q1. Why can queueing the same transaction handle break end-to-end checking?
Answer: Because later producer edits mutate the same object referenced by queued entries, so historical expected data is no longer stable unless cloned.
Q2. What should a constructor do in verification classes?
Answer: Initialize identity and invariants so the object is valid right after new(), reducing hidden setup requirements and null-sensitive paths.
Q3. How do you decide between eager and lazy construction?
Answer: Use eager construction when dependency is mandatory and cheap; use lazy construction for optional/heavy objects but centralize null-safe creation logic.