Subject: RE: DirectC: C layer
From: Joao Geada (joao@synopsys.com)
Date: Tue Dec 17 2002 - 08:34:01 PST
Francoise:
You said
> A direct memory interface may also restrict the optimizations on the SV
side
> since it reveals the internal memory layout which will need to stay
stable.
Please note that, with the proposed interface no such thing is required. It
is *permitted*, not *required*.
For output/inout ports passed by "reference", an implementation is free to
choose whether it is providing
pointers to datastructures inside the simulator or pointers to some
temporaries. In either case the implementation
has to propagate any changes made by the user into the simulator (for a
direct pointer implementation this
is "merely" invoking the propagation functions of the necessary signals, for
an indirect pointer implementation,
this means first copying out the new data and then propagating)
As I have stated before, you are free to implement this whichever way you
choose. It is even legitimate for
an implementation to use both approaches for different types of data or in
different usage modes. Note also
that a user application really has no means of identifying which
implementation approach is being used (other
than perhaps by benchmarking).
This works because, semantically, the interface relies on the following:
1- user must *never* write to input ports (ie input ports are "const")
2- propagation occurs *only* when a DirectC call returns
These items ensure that, from the SV side, a DirectC call behaves the same
as a SV function call
(ie as-if pass-by-value had occurred).
Joao
============================================================================
==
Joao Geada, PhD Principal Engineer Verif Tech
Group
Synopsys, Inc TEL: (508)
263-8083
344 Simarano Drive, Suite 300, FAX: (508)
263-8069
Marlboro, MA 01752, USA
============================================================================
==
This archive was generated by hypermail 2b28 : Tue Dec 17 2002 - 09:02:47 PST