Subject: RE: [sv-ec] fork..join_none/join_any and automatic variables
From: Jamie LaFlamme (jamiel@Model.com)
Date: Tue May 20 2003 - 09:34:52 PDT
Hi Arturo,
I was specifically talking about the SV extension to allow automatic
variables within named blocks that are not part of a task or function. The
Verilog 2001 restrctions only talk about hierarchical references to
automatic task and function items.
Regards,
-Jamie
-----Original Message-----
From: Arturo Salz [mailto:Arturo.Salz@synopsys.com]
Sent: Monday, May 19, 2003 5:46 PM
To: Jamie LaFlamme; sv-ec@eda.org
Subject: Re: [sv-ec] fork..join_none/join_any and automatic variables
Jamie,
Automatic variables were introduced into Verilog 2001. Accordingly,
limitations on the usage of automatic variables are listed in IEEE-1364 LRM.
I've reproduced the relevant section below:
In Section 10.2.3
Because variables declared in automatic tasks are deallocated at the end of
the task invocation, they shall not be used in certain constructs that might
refer to them after that point.
They shall not be assigned values using non blocking assignments or
procedural continuous assignments.
They shall not be referenced by procedural continuous assignments or
procedural force statements.
They shall not be referenced in intra-assignment event controls of non
blocking assignments.
They shall not be traced with system tasks such as $monitor and
$dumpvars.
In Section 10.3.1
Automatic function items can not be accessed by hierarchical references.
Automatic functions can be invoked through the use of their hierarchical
name.
Arturo
----- Original Message -----
From: Jamie LaFlamme <mailto:jamiel@Model.com>
To: 'sv-ec@eda.org' <mailto:'sv-ec@eda.org'>
Sent: Monday, May 19, 2003 1:06 PM
Subject: [sv-ec] fork..join_none/join_any and automatic variables
Has there been any discussion about what the expected behavior should be
when automatic variables are used within a fork..join_none or fork..join_any
block?
For example:
task automatic auto_fork(output a, output b);
fork
#10 a = 1; // argument 'a' updates after auto_fork() task
exits???
#20 b = 1;
join_none
endtask
Should references to automatic variables declared in a parent block of a
fork be disallowed from within the fork (at least for join_none and
join_any)? Is there some other way to address this issue?
Related to this, I noticed that the end of section 5.5 includes the
following restriction: "automatic or dynamic variables cannot be used to
trigger an event expression". This restriction doesn't exist in the
1364-2001 LRM - was the change intentional? If any forked processes are
allowed to access automatic variables declared in an enclosing block then it
seems like triggering off an automatic variable should be allowed.
Personally I'd rather just prohibit access to automatic variables in parent
blocks from ALL forks in both SV and 1364...
Also, the ballot draft doesn't explicitly prohibit hierarchical references
to automatic variables in a named block like:
initial
begin : init1
automatic int count;
...
end
initial init1.count++;
Should this be added to the spec?
Thanks,
-Jamie LaFlamme
This archive was generated by hypermail 2b28 : Tue May 20 2003 - 09:50:17 PDT