Subject: RE: [sv-cc] Updated extern/exports proposal
From: Joao Geada (Joao.Geada@synopsys.com)
Date: Wed Mar 12 2003 - 09:01:34 PST
John,
remember that any/all calls to a pure extern function may be optimized out if
the compiler determines that the result is never used. If you were relying on
the side effect of your extern function leaving some file open you'd get an
unpleasant surprise.
However, it is legitimate to open a file, read data & close the file before
returning. Remember that the intent is that the "system state" before and after
a pure call remains unchanged (strictly no visible side-effects anywhere)
Joao
==============================================================================
Joao Geada, PhD Principal Engineer Verif Tech Group
Synopsys, Inc TEL: (508) 263-8083
344 Simarano Drive, Suite 300, FAX: (508) 263-8069
Marlboro, MA 01752, USA
==============================================================================
-----Original Message-----
From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org]On Behalf Of
Amouroux, John
Sent: Wednesday, March 12, 2003 11:46 AM
To: sv-cc
Subject: RE: [sv-cc] Updated extern/exports proposal
Hi Joao,
This is excellent. I have two small comments.
1. Maybe I missed this before, but why cannot pure functions open and close
files? I don't see how this can have any side-effect that could affect a
simulator implementation. Though, I can possibly understand this with
stdout/err.
2. Just as svSetScope returns the current scope, it would be nice to have
svSetUserData also return the current user data setting in a similar manner.
Actually, maybe you meant this, but the return type is missing from your
definition. Of course, in my request the return value of NULL could have
two meanings; namely, that the function is a non-context function or that
the user data actually is NULL. This is not the best thing. I'm just
bugged that these svSet/Get functions are not similar.
-- John A.
> -----Original Message-----
> From: Joao Geada [mailto:Joao.Geada@synopsys.com]
> Sent: Tuesday, March 11, 2003 7:35 PM
> To: sv-cc
> Subject: [sv-cc] Updated extern/exports proposal
>
>
> Attached as an HTML file.
> I believe I have accounted for all the required clarifications and
> corrections.
> There is now a lot more detail about the behavior of pure and context
> functions,
> description of the context manipulation APIs, examples of context,
> descriptions
> of the capabilities and limitations of extern and exported functions,
> listing
> of issues that are deferred with current "workarounds".
> In addition, I have also permitted multiple externs to exist in 1 scope
> IFF
> all the externs define exactly the same type signature and all agree
> exactly
> on the names of formals (as requested by Michael). Note that in addition,
> the
> workaround section suggests a few better ways to address this issue.
>
> Joao
> ==========================================================================
> ====
> Joao Geada, PhD Principal Engineer Verif Tech
> Group
> Synopsys, Inc TEL: (508) 263-
> 8083
> 344 Simarano Drive, Suite 300, FAX: (508) 263-
> 8069
> Marlboro, MA 01752, USA
> ==========================================================================
> ====
This archive was generated by hypermail 2b28 : Wed Mar 12 2003 - 09:02:57 PST