Subject: Re: issue 1.4: No clear relationship to other APIs
From: Michael McNamara (mac@verisity.com)
Date: Thu Nov 07 2002 - 08:33:54 PST
Michael Rohleder writes:
> * I want not to prohibit PLI/VPI calls in DirectC functions.
-> This demands that the DirectC function calling a PLI function must
set up (or arrange to be set up) the complete call environment
expected by a PLI or VPI function.
(FYI, a PLI function is only passed a minimal set of information
about its calling environment, and can (must) make a set of
subsequent calls to determine how many arguments were passed to it,
what hierarchical path it was called from, et cetera. These calls
are satisfied by the simulators's examining a table of information
(let us call it the Environment Table) the simulator sets up before
it calls any user function.)
I see three ways of doing this:
1) require simulators to provide a routine that a DirectC programmer
can call that will set up this Environment Table.
2) define the Environment Table's format in the standard, and require
DirectC programmers to update the table directly before calling
PLI functions.
3) when passing control to DirectC, the simulator shall set the
Environment Table to values that result in no core dumps, but
provide minimal functionality for all possible subsequent PLI
calls by the DirectC routine that is called.
The first two paths make it difficult for DirectC routines to call
PLI routines simply and robustly. [Asking programmers to remember to
do someting is asking for trouble]. The third alternative adds
weight to all DirectC calls, and makes any such PLI calls from
DirectC less useful, but perhaps useful enough for your purpose)
-mac
This archive was generated by hypermail 2b28 : Thu Nov 07 2002 - 08:34:21 PST