SystemVerilog OOP Mastery · All levels

`super`, `super.new`, and Overriding Rules: Concept Explained

Concept Explained for `super`, `super.new`, and Overriding Rules.

Concept

In short: Use super.new for constructor chaining and super.method in overrides when base side effects must be retained; constructors are not polymorphic dispatch points.

super references the immediate parent implementation. In constructors, calling super.new establishes base-class state before derived initialization. This is especially important in UVM components where parent constructors connect the object to hierarchy metadata and factory registration assumptions.

For method overrides, super.method is not automatically required by language rules, but it is often required by design contracts. Base methods may perform bookkeeping, objections, callbacks, or field automation that child classes must preserve before adding specialization.

Remember that constructor selection is based on the class being instantiated, not base-handle dynamic dispatch. Runtime extension in UVM comes from overriding virtual methods such as phase methods and do_* hooks, not from expecting constructor polymorphism.

Related topics