Subject: Re: [sv-ec] Comments on Chapter 9
From: Kevin Cameron x3251 (Kevin.Cameron@nsc.com)
Date: Mon Jan 27 2003 - 17:16:04 PST
I was wondering if we could also consider "endfork" instead of "join none" - seems
more like Verilog :-)
Also, while I like the idea of getting all the process handles back from fork I
think it might be a bit unwieldy from user perspective, I would still like to be
able to use the process methods on a block name or fork label, e.g.:
f0: fork
p1();
p2();
p3();
endfork
....
join(f0); // wait for all processes under f0
It might also be useful to create an signal that can be used in regular wait
statements to track the spawned threads e.g. <fork label>.children:
@(f0.children == 0 or reset); // single wait statement
if (reset) f0.terminate();
Otherwise you have to do another fork/join to handle the reset and wait in
parallel:
f1: fork
begin join(f0) ; disable f1; end
begin @reset; f0.terminate(f0) ; end
join
- which I think is harder to read.
Regards,
Kev.
This archive was generated by hypermail 2b28 : Mon Jan 27 2003 - 17:16:46 PST