I've been gone for a week and in looking through my backlog of email, I haven't seen a response to this, so I'll take a shot at this one. I consider this example to be illegal. "T" in the "extends T#(3)" is the **type** parameter to C. There is no way to have a pass an unspecialized parameterized class reference as a type parameter -- any type reference to a parameterized class denotes a specialized type. So "T#(3)" here is illegal since "T" can't denote a parameterized class. You could have: class C#(parameter type T = int) extends T; endclass and then your example would be valid. Given: C #( D #(2)) x = new; the type parameter "T" of C binds to the type specialized from D#(2) so the effective type could be thought of as having: class C extends D#(2); typedef D#(2) T; .... endclass This of course isn't exactly what happens, but it is a reasonable approximation of what results for this particular specialization of C. Other specializations of C with different type bindings for "T" would produce other class derivations. Gord. Alok Kumar Sinha wrote: > Hi > > Consider the scenario : > module top; > class C #(parameter type T = int) extends T #(3); > endclass > class D #(parameter p = 1); > endclass > > C #( D #(2)) x = new; > > endmodule > > If this case is syntactically and semantically correct then what > parameter value should be propagated to the class 'D'. > Whether it should be '2' from 'D #(2)' or '3' from 'T #(3)' ? > > Regards > Alok > > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Feb 13 10:54:33 2008
This archive was generated by hypermail 2.1.8 : Wed Feb 13 2008 - 10:56:35 PST