LRM: >"A specialization is the combination of a specific generic class with a unique set of parameters. Two sets of parameters shall be unique unless all parameters are the same as defined by the following >rules: >a) A parameter is a type parameter and the two types are matching types. >b) A parameter is a value parameter and both their type and their value are the same." I've doubts about above : A) so for matching types like int and bit signed [31:0] I should have the same static variables? B) - the only way when type may be taken into account is case when in parameter declaration type is not explicitly defined? So in case below o and o1 should have the static variable and o2 should have differen one class A#( p = 0) ; static int my_static_member; endclass module top; parameter some_stuff = 1; A #(1) o; A #(some_stuff) o1; A #(1'b1) o2; initial begin o.my_static_member++; $display(o.my_static_member); $display(o1.my_static_member); $display(o2.my_static_member); o1.my_static_member++; $display(o.my_static_member); $display(o1.my_static_member); $display(o2.my_static_member); o2.my_static_member++; $display(o.my_static_member); $display(o1.my_static_member); $display(o2.my_static_member); end Endmodule Prpoer result????? KERNEL: 1 KERNEL: 1 KERNEL: 1 KERNEL: 2 KERNEL: 2 KERNEL: 0 KERNEL: 2 KERNEL: 2 KERNEL: 1 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Jul 9 05:23:32 2008
This archive was generated by hypermail 2.1.8 : Wed Jul 09 2008 - 05:24:20 PDT