[sv-bc] RE: [sv-ec] Is void function not implicitly declared inside the function

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Tue Jan 15 2008 - 04:03:40 PST
I'll ask a reverse question.
 
Is it legal to assign a value to the function variable within a void
function? If so, what is the variable's type?
Is it legal to hierarchically access the function variable of a void
function?
Is it legal to have a return statement with a value within a void
function?
 
And in any function, does a return statement with a value assign that
value to the function variable? The LRM implies not, but does not say so
explicitly.
 
Thanks,
Shalom


________________________________

	From: owner-sv-ec@server.eda.org
[mailto:owner-sv-ec@server.eda.org] On Behalf Of Surya Pratik Saha
	Sent: Tuesday, January 15, 2008 12:30 PM
	To: sv-bc@server.eda.org; sv-ec@server.eda.org
	Subject: [sv-ec] Is void function not implicitly declared inside
the function
	
	
	Hi,
	As per V2K LRM (10.4.2 Returning a value from a function):
	The function definition shall implicitly declare a variable,
internal to the function, with the same name as the function.
	
	Is it changed when the function is declared with void return
type?
	Is the following case legal?
	
	module a;
	  function void fnc;
	    input x;
	    //integer fnc;
	    fnc  : assert(0 == 1);
	  endfunction
	endmodule
	
	Some simulators pass if the function is declared inside class
only. I did not see anything mentioned in SV LRM.
	
	-- 
	Regards
	Surya

	-- 
	This message has been scanned for viruses and 
	dangerous content by MailScanner <http://www.mailscanner.info/>
, and is 
	believed to be clean. 

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jan 15 04:04:43 2008

This archive was generated by hypermail 2.1.8 : Tue Jan 15 2008 - 04:06:26 PST