User guide

24-41
SystemVerilog Testbench Constructs
logic [7:0] log1;
} struct1;
struct1 mystruct;
typedef struct packed { int intt1; logic [31:0] logg1; }
pstruct1;
typedef union packed {
pstruct1 u_pstruct1;
} p_union1;
endclass
Creating an Instance (object) of a Class
A class declaration is the template from which objects are created.
When a class is constructed the object is built using all the properties
and methods from the class declaration.
To create an object (that is, an instance) of a declared class, there
are two steps. First, declare a handle to the class (a handle is a
reference to the class instance, or object):
class_name handle_name;
Then, call the new() class method:
handle_name = new();
The following example expands on the above example to show how
to create an instance of class “B.”
program P;
class B;
int q = 3;
function int send (int a);