RE: [sv-cc] DPI context - setting/preserving&resetting a scope


Subject: RE: [sv-cc] DPI context - setting/preserving&resetting a scope
From: Warmke, Doug (doug_warmke@mentorg.com)
Date: Fri Mar 14 2003 - 14:55:51 PST


Andrzej, John,

I think it's OK to have the behavior specified by Andrzej
for non-context external functions. It's even OK if the user
enters their C code by some other means, say a PLI callback.
All Andrzej is saying is that you can't count on the default
scope being set if you didn't follow the rules.

More important to me is that we don't make it illegal to call
an SV export function from non-context C code. That would have
lots of consequences on users, and no benefits for implementors.
(Drat, Andrzej! :) ) Here, John's example of explicitly setting
scope and then making the call is reasonable and should be
quite useful in practice.

Thanks and regards,
Doug

> -----Original Message-----
> From: Andrzej Litwiniuk [mailto:Andrzej.Litwiniuk@synopsys.com]
> Sent: Friday, March 14, 2003 2:44 PM
> To: Stickley, John
> Cc: sv-cc@server.eda.org
> Subject: Re: [sv-cc] DPI context -
> setting/preserving&resetting a scope
>
>
> > johnS:
> > Most likely it will be safer however, if the current
> context is set to
> > NULL by the infrastructure whenever a non-context function
> is called.
>
> John,
>
> this is exactly what I want to avoid!
> I don't want =any= overhead on simple calls of non-context
> functions. The implementation that I had in mind would
> instrument only the calls of context functions.
>
> My take on this is that an overhead is acceptable if it buys
> you something important and useful. I don't think that the
> rule "NULL if called directly from non-context" is worth the price.
>
> It shouldn't happen that we carelessly and without due
> diligence specify a functionality of a function, and then all
> simulators will have to bear
> an overhead in order to be compliant with a standard.
> I may be wrong whether a specific rule is needed or not, or
> whether the price
> overweights the benefits, but it's my job to figure out the
> consequences from
> compiler's perspective. As you see, I'm a little biased :-)
>
> Regards,
> Andrzej
>
>



This archive was generated by hypermail 2b28 : Fri Mar 14 2003 - 14:56:49 PST