Re: [sv-ec] Re: [sv-bc] Forward typedef of parameterized class

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu Jan 31 2008 - 07:45:32 PST
Surya Pratik Saha wrote:
> Hi Gordon,
> The Mantis says about the types referred by class resolution operator. 
> But what about class object declaration and normal identifier (variable, 
> function etc.) reference by forward typedef'd class declaration. Is it 
> legal or not?

Since 2211 talks about cases in which special action is needed (i.e. you
must do a typedef in order to get access), the implication is that
no special action is needed in other cases.  So a non-type access has
no special restrictions and should be legal, assuming of course that
the target of such a reference is a static property or method.

This entire area has been subject to a great deal of discussion and
it wouldn't be surprising to have inconsistencies among vendors
at this point.

Gord.

> 
> Regards
> Surya
> 
> 
> 
> -------- Original Message  --------
> Subject: Re:[sv-ec] Re: [sv-bc] Forward typedef of parameterized class
> From: Gordon Vreugdenhil <gordonv@model.com>
> To: Surya Pratik Saha <spsaha@cal.interrasystems.com>
> Cc: shweta@mirafra.com, sv-bc@eda.org, sv-ec@eda.org
> Date: Thursday, January 31, 2008 8:48:48 PM
>> Mantis 2211 deals with this issue directly.  Please take
>> a look at it.
>>
>> Gord.
>>
>> Surya Pratik Saha wrote:
>>> Hi,
>>> Continuing on Shweta's query, is the following forward typedef usage 
>>> of class allowed:
>>> module top;
>>>    typedef C;
>>>    typedef C::p mydef;
>>>    class C;
>>>        typedef int p;
>>>    endclass
>>> endmodule
>>>
>>> Most of the simulators fail. But some pass too. I think LRM should be 
>>> clear enough how much flexibility to be provided for forward typedef 
>>> reference of class.
>>>
>>> Regards
>>> Surya
>>>
>>>
>>>
>>> -------- Original Message  --------
>>> Subject: Re:[sv-bc] Forward typedef of parameterized class
>>> From: shweta@mirafra.com
>>> To: Surya Pratik Saha <spsaha@cal.interrasystems.com>
>>> Cc: sv-bc@eda.org
>>> Date: Thursday, January 31, 2008 4:22:26 PM
>>>> Hi Surya,
>>>>
>>>> My question is specific about forward typedef of parameterized class.
>>>> The LRM says nothing about it.
>>>>
>>>> Regards,
>>>> Shweta.
>>>>
>>>>  
>>>>> Hi Shweta,
>>>>> I already asked it (the mail is attached). But I did not get any reply
>>>>> on that.
>>>>>
>>>>> Regards
>>>>> Surya
>>>>>
>>>>>
>>>>>
>>>>> -------- Original Message  --------
>>>>> Subject: [sv-bc] Forward typedef of parameterized class
>>>>> From: shweta@mirafra.com
>>>>> To: sv-bc@eda.org
>>>>> Date: Thursday, January 31, 2008 3:39:25 PM
>>>>>  
>>>>>> Hi All,
>>>>>>
>>>>>> Is foward typedef of parameterized class allowed?
>>>>>>
>>>>>> For the following testcase :
>>>>>>
>>>>>> package pkg;
>>>>>>     typedef B;
>>>>>>     class A #(parameter int p1 = 1);
>>>>>>         B b1;
>>>>>>     endclass
>>>>>>     class B #(parameter int p1 = 1);
>>>>>>             A #(p1) a1;
>>>>>>     endclass
>>>>>> endpackage
>>>>>>
>>>>>> MTI gives following error :
>>>>>> ** Error: test1.sv(2): Forward typedef for parameterized class 'B' 
>>>>>> not
>>>>>> allowed
>>>>>>
>>>>>> Regards,
>>>>>> Shweta.
>>>>>>
>>>>>>
>>>>>>       
>>>>>
>>>>>
>>>>>     
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>   
>>>
>>>
>>>
>>>
>>>
>>
> 
> 
> 
> 
> 

-- 
--------------------------------------------------------------------
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 Thu Jan 31 07:46:03 2008

This archive was generated by hypermail 2.1.8 : Thu Jan 31 2008 - 07:46:24 PST