参数化类
class stack #(type T=int);
local T item[];
task push(T a);... endtask
task pop(ref T a);... endtask
endclass
stack#(real) rs;
class D1 #(type P=real) extends stack; // D1 includes 2 parameterized types: P, T. T is int,P is real by default.
class D1 #(type P=real) extends stack #(bit); // T is bit
class D1 #(type P=real) extends stack #(P); // T is P
 
                    
                 
                
            
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号