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

From: Surya Pratik Saha <spsaha_at_.....>
Date: Thu Jan 31 2008 - 02:43:14 PST
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.
>
>   




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


attached mail follows:


Hi,
Is base class of a class declaration allowed to be forward referenced? 
Is the following case valid?

module top;
typedef class bas;
class der extends bas;
endclass
class bas;
endclass
endmodule

Most of the simulators fail for that. But I did not see any restriction 
inside LRM. If it is allowed, then I am little bit curious on the 
following case:

module top;
chandle x;
typedef class bas;
class der extends bas;
   function new;
       x = 1;
   endfunction
endclass
class bas;
   int x;
endclass
endmodule

What 'x' will be referred for function 'new', is it 'chandle' or 'int'?

-- 
Regards
Surya





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jan 31 02:45:07 2008

This archive was generated by hypermail 2.1.8 : Thu Jan 31 2008 - 02:45:27 PST