User guide

24-62
SystemVerilog Testbench Constructs
This will pass 5 to the new() routine associated with “Packet”.
A more general approach is to use the super keyword to call the
superclass constructor.
function new();
super.new(5);
endfunction
If included, the call to super() must be the first executable statement
(that is, not a declaration) in the constructor.
Accessing Class Members
Properties
A property declaration may be preceded by one of these keywords:
•local
protected
The default protection level for class members is “public.” Global
access is permitted via class_name.member.
In contrast, a member designated as local is one that is only visible
from within the class itself.
A protected class property (or method) has all of the characteristics
of a local member, except that it can be inherited, and is visible to
subclasses.