I want to clarify what is essential about the DPI-OO proposal (Mantis item 3087).
In particular, the following elements of the proposal are secondary:
-- The format of different kinds of argument values (has to be agreed on, but is secondary)
-- The syntax in SystemVerilog for indicating export and import elements (has to be agreed on, but is secondary)
-- Support for dynamic arrays (useful but secondary)
-- Support for the copy strategy (important for performance reasons, but still secondary)
Also, to further clarify, DPI-OO is not any of the following:
-- An extension of the existing DPI-C for use in C++. svdpi.h makes this unnecessary because it already includes "extern "C" brackets" conditionalized by "#ifdef __cplusplus".
-- An extension of DPI-C to include C++ objects.
-- A direct interface between SystemVerilog and a C++ application. The C++ application, like applications in other languages, must interface to SystemVerilog through a common channel, which is represented as a set of C++ constructs in a separate namespace named "DPI_OO".
-- An interface that can replace DPI-C for existing applications. With rare exceptions, a user who wants to use DPI-OO instead of DPI-C for an existing application will have to restructure the application. (For example, all DPI-OO constructs used by SystemVerilog have to be declared in packages or compilation units, and do not retain "context.")
So what _is_ the essence of DPI-OO?
In its stripped down essence, DPI-OO allows references to class instances, and methods that access them, to be used among multiple languages without losing their identity. This essence is illustrated by the following scenario:
-- Language A creates a class instance X and registers it in a central registry. Language A then passes a reference to X to language B (in possibly a modified form, but still connected with the central registry). Language B in turn passes the reference to language C, which then passes it back to language A -- and language A recognizes this as a reference to the same class instance X that it had passed to language B.
The references to X from all three languages refer to the same class instance in the exporting language, so that the class instance is a "single copy of the truth". A modification made via a method call from any of the three languages modifies this single copy, so that any of the three languages can reference that single change via additional method calls.
This is, as I understand it, the real essence of the DPI-OO proposal. We can tinker with the syntax and with the secondary features, but without this essence we have a far different proposal for a purpose yet to be defined.
Regards,
Jim Vellenga
Jim Vellenga | Member of Consulting Staff | Cadence
P: 978.262.6015 F: 978.262.6636 www.cadence.com<http://www.cadence.com>
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
This archive was generated by hypermail 2.1.8 : Fri Aug 12 2011 - 06:12:13 PDT