What is the reason for 6.9 "Type compatibility"'s "The scope of a data type identifier shall include the hierarchical instance scope. In other words, each instance with a user-defined type declared inside the instance creates a unique type."? What would happen if the "scope of a data type" would include only the scope hierarchy inside the innermost instantiated entity (module/interface/program/etc.) and would ignore the path leading to the instance itself? Won't the life be just easier for everyone? --Yulik. -----Original Message----- From: owner-sv-bc@server.eda-stds.org [mailto:owner-sv-bc@server.eda-stds.org] On Behalf Of Brad Pierce Sent: Tuesday, June 20, 2006 3:04 AM To: sv-bc@server.eda-stds.org Subject: Re: FW: [sv-bc] parameterized structures Some of theses issues were resolved by http://www.eda-stds.org/svdb/bug_view_page.php?bug_id=725 See also http://www.eda-stds.org/sv-ec/hm/2542.html http://www.eda-stds.org/sv-ec/hm/2557.html -- Brad -----Original Message----- From: owner-sv-bc@eda-stds.org [mailto:owner-sv-bc@eda-stds.org] On Behalf Of Gordon Vreugdenhil Sent: Monday, June 19, 2006 4:52 PM To: Greg Jaxon Cc: sv-bc@verilog.org Subject: Re: FW: [sv-bc] parameterized structures Greg Jaxon wrote: > Gordon Vreugdenhil wrote: > >> Greg, >> >> I'm not sure I understand the issue here. >> >> Let's stick with the process/scope case for a moment. >> >> module top; >> class C #(int p = 1); >> static int x; >> endclass >> >> always @(clk) begin >> C#(2) c_obj = new; >> c_obj.x++; >> end >> >> always @(clk) begin >> C#(2) c_obj = new; >> c_obj.x++; >> end >> endmodule >> >> >> Are we in agreement that there is only one "x" here and that >> it is the one that is the member of the specialized type C#(2)? > > > That is also what I'd like to see the LRM specify. However, I will > note that the generic class has been declared in two different scopes, > neither of which is in a package context, so according the quote (see > below) > I might expect them to be different types. I don't see this at all. It is clear that each C#(2) is a *specialization*. There is only one declaration of the parameterized class C -- the one in top. C#(2) isn't a *declaration* of a class type at all; it is a specialization. Gord. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Tue Jun 20 02:01:54 2006
This archive was generated by hypermail 2.1.8 : Tue Jun 20 2006 - 02:02:31 PDT