Subject: Re: [sv-cc] DPI context - setting/preserving&resetting a scope
From: Francoise Martinolle (fm@cadence.com)
Date: Mon Mar 17 2003 - 06:13:26 PST
At 11:10 PM 3/13/2003 +0100, Michael Rohleder wrote:
>Hello Andrzej,
>
>thanks a lot for bringing this up. My comments are interspersed.
>
>-Michael
>
>Andrzej Litwiniuk wrote:
>
> > Joao,
> >
> > Consider the folowing sequence of DPI calls (interleaved context and
> > non-context functions):
> > SV --> context_cfunc1 --> SV --> non_context_cfunc2 --> SV
> >
> > The scope set at the call of context_cfunc1 is preserved and that way
> > still avaialble while non_context_cfunc2 is executed; we don't want
> > to do anything with a scope (overhead!) for non-context calls, do we?
>
>I don't think it makes sense to dive into such details. I would simply 
>stay with banning calling SV functions from non-context
>functions.
>
>Calling SV from a non-context function is considered illegal and the 
>result is therefore undefined. This should be also true, when
>the context might be set by other means. Make it simple for users: if you 
>call SV from a non-context function, you do something
>illegal - that's it.
>
> > I have no problem with such a scenario; I don't want to prohibit it.
> > It simply makes the description of semantics more complicated.
> > Because what's weird in this scenario, is that non-context function
> > called from SV may successfully call an exported SV function.
> > Of course, this could be viewed in a different way, too: a context function
> > is allowed to call SV also indirectly, regardless whether a call chain goes
> > thru SV functions and non-context functions, or not:
> >         SV --> context_cfunc1 -->       .......         --> SV
> >                                 [transparent call chain]
>
>Of course this is just true, if a context function is called at an earlier 
>point in time. You can not control this, another user
>might instantiate the corresponding SV function and call the DPI function 
>without a context set. This would be a real problem and
>hard to identify. At the end, it would compromise reuse. Not nice.
>
>--
>
>NOTE: The content of this message may contain personal views
>       which are not neccessarily the views of Motorola, unless 
> specifically stated.
>
>          ___________________________________________________
>         |                                                   |
>       _ | Michael Rohleder            Tel: +49-89-92103-259 | _
>      / )| Software Technologist       Fax: +49-89-92103-680 |( \
>     / / | Motorola, Semiconductor Products, System Design   | \ \
>   _( (_ |  _   Schatzbogen 7, D-81829 Munich, Germany    _  | _) )_
>  (((\ \>|_/ >                                           < \_|</ /)))
>  (\\\\ \_/ /    mailto:Michael.Rohleder@motorola.com     \ \_/ ////)
>   \       /_______________________________________________\       /
>    \    _/                                                 \_    /
>    /   /                                                     \   \
>
>The information contained in this email has been classified as:
>Motorola General Business Information (x)
>Motorola Internal Use Only            ( )
>Motorola Confidential Proprietary     ( )
>
>
>*** This note may contain Motorola Confidential Proprietary or
>     Motorola Internal Use Only Information and is intended to be
>     reviewed by only the individual or organization named above.
>     If you are not the intended recipient or an authorized representative
>     of the intended recipient, you are hereby notified that any review,
>     dissemination or copying of this email and its attachments, if any,
>     or the information contained herein is prohibited. If you have received
>     this email in error, please immediately notify the sender by
>     return email and delete this email from your system.
>     Thank you! ***
>
This archive was generated by hypermail 2b28 : Mon Mar 17 2003 - 06:14:48 PST