RE: [sv-ec] opinions on $exit

From: Steven Sharp <sharp_at_.....>
Date: Wed Mar 15 2006 - 16:58:39 PST
>From: "Rich, Dave" <Dave_Rich@mentor.com>

>It is legal for a program to call a function or task that is not defined
>in a program. I think the term "design module" should be replaced with
>"outside a program block" since you can have task defined in an
>interface, a package, or $unit.

Yes, I understand this.


>The LRM or BNF never explicitly limited $exit to be inside program
>blocks. It only loosely defined their behavior when call from a program
>block.

I understand this also.  However, I tend to agree with Arturo that
they should only be allowed in programs.


>Anyway, the new proposal should hopefully clarify a few of those issues.

I see two reasonable approaches:

1. Allow $exit to be called outside program blocks, and define their
   behavior when called from a thread that does not come from a program
   block.  This could be a no-op, as you suggested.
   
2. Only allow $exit to be called from a program block.  In this case
   there is no need to define their behavior when called from a thread
   that does not come from a program block, since it cannot happen.
   
Neither approach requires any special cases for tasks declared in
packages.  With approach 1, $exit can be called from anywhere, so there
is no special case for packages.  With approach 2, $exit can be called
only from a program block.  A task in a package is either a program task
or it isn't, so there is still no special case for it.

I prefer approach 2, as I think it is cleaner.

Steven Sharp
sharp@cadence.com
Received on Wed Mar 15 16:58:45 2006

This archive was generated by hypermail 2.1.8 : Wed Mar 15 2006 - 16:59:06 PST