SystemVerilog · Topic
SystemVerilog OOP — Classes, Inheritance & Polymorphism
Classes, handles, constructors, inheritance, virtual methods and parameterised classes — the object model every UVM testbench is built on.
SystemVerilog's class system exists because a testbench is not a circuit. Stimulus, transactions and checkers are data that come and go during a run, and the language needed a way to describe things with a lifetime rather than a fixed set of wires. The consequence engineers meet first is handles: a class variable holds a reference, not an object, so assignment copies the handle and two variables end up naming the same object. Almost every early class-based bug is that distinction, and the copy/clone machinery exists to resolve it.
Lessons in this topic(16)
Start hereIntroduction to OOP in SystemVerilogIntroduction to OOP in SystemVerilog- 2Classes & Objects — Basics
- 3Properties & Methods
- 4Constructors & new()
- 5Encapsulation — public, protected, local
- 6The this Keyword
- 7Static Properties & Methods
- 8Inheritance & extends
- 9The super Keyword
- 10Polymorphism & Virtual Methods
- 11Abstract Classes & Pure Virtual Methods
- 12Parameterised Classes
- 13Nested Classes
- 14Handles — Shallow Copy, Deep Copy, Comparison
- 15typedef class — Forward Declarations
- 16Class Scope Resolution (::)