SV中的class通过new来创建实例,new函数可以传递多个参数;
packet P1; P1 = new;创建一个P1的对象;
P2 = P1;P2也指向同一个对象;
P2 = new P1;P2是P1的shadow copy,指针直接被copy。
对于参数化的class的new函数调用:new函数可以通过类操作符::来调用
class E#(type T = int) extends C;
T x;
function new(T x_init)
super.new();
x=x_init;
endfunction
endclass
initial begin
C = E#(.T(byte))::new(.x_init(5));
end
一个class中的static类型的property包括:static声明的变量,typedefs,enumeration,parameter,loca