Subject: Re: [sv-ec] Re: Draft 3 - 9.9 wait/disable fork
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Sat Mar 01 2003 - 11:54:17 PST
> Are you saying "disable fork" is not the same as "disable <fork label>" for a given
> fork statement?
Yes. "disable fork" terminates all processes started by the calling process. What
you suggest is a change in the semantics of "disable <fork_label>".
Arturo
----- Original Message -----
From: "Kevin Cameron" <sv-xx@grfx.com>
To: <sv-ec@eda.org>
Cc: <Arturo.Salz@synopsys.COM>
Sent: Saturday, March 01, 2003 11:22 AM
Subject: Re: [sv-ec] Re: Draft 3 - 9.9 wait/disable fork
> From: "Arturo Salz" <Arturo.Salz@synopsys.com>
>
> Kevin,
>
> Waiting for a particular process is not part of the spec. The current constructs
> allow you to wait or terminate all processes created by the calling process.
> Verilog-2001 already allows disabling a process using "disable <label>", but
> it can't differentiate between the various processes created at that label. To
> accomplish that level of fine-grain process control we'll have to introduce new
> functionality. That's the reason we retained the "process" keyword so that in
> we can use it to implement fine-grain process control.
Are you saying "disable fork" is not the same as "disable <fork label>" for a given
fork statement? What happens with:
begin : b1
fork
proc1(); proc2();
join_none
end
...
disable b1; // do the detached threads get killed?
If the fork statements are nested does the disable refer to the inner or outer
fork:
fork : f1
begin
fork : f2
proc() ;
begin
...
disable fork; // f1, f2 or both?
end
join_none
end
begin
...
end
join
- I think "disable <label>" would be somewhat clearer to users (presuming it
just kills all the threads spawned under the named block). Doesn't seem like
much new functionality to me, and it's not new syntax.
> $suspend_thread is functionally identical to #0. The only reason its existence
> is documentation.
Why add it? - "#0; // yield" is fewer characters and is self explanatory.
Kev.
> I think "yield" might be a better name only when you
> consider that processes execute in a single processor, hence the process yields
> the CPU.
>
> Arturo
>
> ----- Original Message -----
> From: "Kevin Cameron" <Kevin.Cameron@nsc.com>
> To: <sv-ec@eda.org>
> Sent: Friday, February 28, 2003 5:06 PM
> Subject: [sv-ec] Re: Draft 3 - 9.9 wait/disable fork
>
>
>
> Shouldn't the syntax for wait/disable on a fork be:
>
> wait|disable <fork label>
>
> - with the current syntax you can't differentiate between multiple fork
> statements. I think it's desirable to be able to do this:
>
> fork : p1 proc_1() ; join_none;
> fork : p2 proc_2() ; join_none;
>
> wait p1;
> disable p2;
>
> Also, the description of $suspend_thread does not say that it is identical to a #0
> (would you need it if it was?), but it doesn't say when exactly in the simulation
> cycle the thread starts again - same delta, next delta or next time slot?
> $yield might be a better name since "suspend" usually implies a thread sleeps
> until some external event wakes it.
>
> Regards,
> Kev.
>
> --
> National Semiconductor, Tel: (408) 721 3251
> 2900 Semiconductor Drive, Mail Stop D3-500, Santa Clara, CA 95052-8090
>
>
>
>
This archive was generated by hypermail 2b28 : Sat Mar 01 2003 - 11:51:52 PST