Subject: [sv-ec] fork..join_none/join_any and automatic variables
From: Jamie LaFlamme (jamiel@Model.com)
Date: Mon May 19 2003 - 13:06:30 PDT
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 : Mon May 19 2003 - 13:09:33 PDT