Re: FW: [sv-bc] parameterized structures

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Mon Jun 19 2006 - 17:04:01 PDT
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.com
Received on Mon Jun 19 17:04:10 2006

This archive was generated by hypermail 2.1.8 : Mon Jun 19 2006 - 17:04:15 PDT