feedback for Kevin C proposal


Subject: feedback for Kevin C proposal
From: Stickley, John (john_stickley@mentorg.com)
Date: Mon Dec 09 2002 - 10:51:00 PST


Kevin,

After reading your latest proposal and thinking more about
it, it occurs to me why I don't think we should have dynamic binding
support at all for SV-to-C calls. The reason is that all of the stuff
you've outlined in your proposal, is conceptually similar to the
existing VPI, ACC, and TF interfaces for user defined system tasks.
In fact, in cases where dynamic binding is required, it is probably
just better to use the existing interfaces. There are not a lot of
differences between the information that is provided in your svcContext
struct and information accessible via the VPI. Dynamically bound functions
as you've proposed them are essentially the equivalent of a calltf
function.

With static binding we provide a very simple, API-less use model to
the user:

Define a C function
Call it from SV.

OR

Define an SV function.
Call it from C.

Anything beyond that should be deferred to existing mechanisms supported
by the VPI.

One other thing that I wanted to mention is that the danger of dynamic
binding is that there is no good way to verify that the function profile
of the provided function is correct. With static binding it is possible
for the SV compiler to create a header file that the user can use to
get natural type checking of the function arguments. With dynamic binding,
this is not the case. It was not clear to me from your proposal how this
is addressed.

-- johnS
                                                            __
                        ______ | \
______________________/ \__ / \
                                 \ H Dome ___/ |
John Stickley E | a __ ___/ / \____
Principal Engineer l | l | \ /
Verification Solutions Group | f | \/ ____
Mentor Graphics Corp. - MED C \ -- / /
17 E. Cedar Place a \ __/ / /
Ramsey, NJ 07446 p | / ___/
                                  | / /
mailto:John_Stickley@mentor.com \ /
Phone: (201)818-2585 \ /
                                    ---------



This archive was generated by hypermail 2b28 : Mon Dec 09 2002 - 10:54:18 PST