I believe that the LRM says that this situation of parameters getting their types from the value assigned only applies to integral and real types. Parameters of any other type must be explicitly declared. So this would not be a partial declaration, it would be a full declaration. Therefore, the element type would be using the "or_implicit" part of "datatype_or_implicit", and would default to logic.
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Daniel Mlynek
Sent: Wednesday, August 31, 2011 4:04 AM
To: sv-bc@eda.org
Subject: [sv-bc] Fwd: RE: 6.20.2 Value parameters - partially defined type - unpacked array
In chapter 6.20.2 LRM defines how should be the type parameter if its type is not fully defined.
This description misses the unpacked array type parameters.
Lets assume situation where there is only unpacked dimension defined - like below how it shuld behave. IMHO LRM should add description for such cases and similar cases ie only singes and unpacked dim defined, only packed range and unpacked dimension defined etc...
typedef shortint T[2];
module name;
parameter p[2]=T'{1,2}; //LRM do not describe how this case should work while BNF allows such code.
initial $display("%p", p);
initial $display("%b", p[0], p[1]);
endmodule
module top;
parameter int tp[2]= '{1,-1};
name #(tp)uut2();
endmodule
DANiel
-- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Aug 31 10:43:29 2011
This archive was generated by hypermail 2.1.8 : Wed Aug 31 2011 - 10:43:36 PDT