SystemVerilog OOP Mastery · All levels
Type-Parameter Patterns for Reusable OOP Testbench Design: Interview Questions
Interview Questions for Type-Parameter Patterns for Reusable OOP Testbench Design.
Interview questions
Q1. When should you use a policy type parameter instead of subclassing?
Answer: Use policy parameters for orthogonal algorithm swaps (compare/hash/pack) that should vary independently from object hierarchy.
Q2. How do you keep type-parameterized code maintainable in large UVM environments?
Answer: Define a small set of approved typedef specializations, document type contracts, and avoid unnecessary parameter axes.
Q3. Why is type parameterization useful even with UVM factory overrides?
Answer: Factory controls runtime object substitution, while parameterization enforces compile/elaboration-time type correctness of APIs and storage.