SystemVerilog OOP Mastery · All levels
Static Members and Static Methods in Class-Based Testbenches: Interview Questions
Interview Questions for Static Members and Static Methods in Class-Based Testbenches.
Interview questions
Q1. What is the lifetime of a static class property in simulation?
Answer: It exists for the simulation lifetime of that specialization unless explicitly reassigned or reset.
Q2. Can a static method reference non-static members directly?
Answer: No. It must use an explicit object handle argument to access instance members.
Q3. Why do static counters often break test reproducibility?
Answer: They retain state across object lifetimes and can persist across test phases unless reset, so behavior depends on previous activity.