HI,
You can write an example where your assertion is in a for loop and you are passing index of the for loop as one of the arguments to the subroutine call. The index of the loop can be automatic variable.
e.g.
always @(posedge clk)
begin
automatic int i;
for (i=0; i < 3; i++)
begin
assert property ((a, mytask(const'(i))));
end
end
Manisha
________________________________
From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Surya Pratik Saha
Sent: Monday, July 26, 2010 12:57 PM
To: sv-ac@server.eda.org
Subject: [sv-ac] Confusing text related to Mantis 2557
Hi,
In SV 2009 LRM section 16.11 it is mentioned:
An automatic variable shall not be passed as an argument to a subroutine call either as input or ref type. An automatic variable may be used as a constant input for a subroutine call from an assertion statement in procedural code (see 16.15.5).
Now as per Mantis 2557, proposed change will be:
An automatic variable may be passed as a constant input (see 6.24) for a subroutine call from an assertion statement in procedural code (see 16.15.6.1). An automatic variable shall not be passed by reference or passed as a non-constant input to a subroutine call from an assertion statement in procedural code.
But I could not write an example at all, where an automatic variable can be passed to the subroutine call (if I try to do so, hierarchical reference of automatic variable is required which is anyway not possible). Am I missing anything?
-- Regards Surya -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , 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 Mon Jul 26 01:13:05 2010
This archive was generated by hypermail 2.1.8 : Mon Jul 26 2010 - 01:13:18 PDT