[sv-bc] RE: [sv-ec] Is interface ref variable automatic?

From: Mark Hartoog <Mark.Hartoog_at_.....>
Date: Wed Dec 12 2007 - 12:00:10 PST
This example is legal. Section 12.4.2 is talking about ref arguments
to tasks and functions. In your example you have a ref port on an
interface. You cannot attach a automatic variable to a ref port of
a module, interface or program, so no such restriction exists for
ref ports. 

> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On 
> Behalf Of Surya Pratik Saha
> Sent: Wednesday, December 12, 2007 12:43 AM
> To: sv-bc@eda.org; sv-ec@eda.org
> Cc: Adhip Das
> Subject: [sv-ec] Is interface ref variable automatic?
> 
> Hi,
> 
> Consider the following testcase,
> 
> interface intf (ref bit [3:0] ba);
> endinterface
> 
> module named1 ();
>    bit [3:0] ba;
>    assign o1 =  i2.ba;
>    intf i2 (ba);
> endmodule
> 
> As per systemverilog LRM 1800-2005, section 12.4.2 Pass by reference:
> 
> "Because a variable passed by reference may be an automatic 
> variable, a ref argument shall not be used in any context 
> forbidden for automatic variables."
> 
> Could you please tell me whether the above testcase is 
> erroneous or not?
> I guess, it is erroneous because ref variable(which should be 
> treated as automatic variable) is hierarchically referred(i2.ba).
> 
> --
> Regards
> Surya
> 
> 
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, 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 Dec 12 12:13:21 2007

This archive was generated by hypermail 2.1.8 : Wed Dec 12 2007 - 12:13:50 PST