Re: issue 1.4: No clear relationship to other APIs


Subject: Re: issue 1.4: No clear relationship to other APIs
From: Andrzej Litwiniuk (Andrzej.Litwiniuk@synopsys.com)
Date: Wed Nov 06 2002 - 17:24:35 PST


Francoise wrote:

> It is technically possible to call VPI and PLI from inside
> a directC function.
> It is also technically possible to prevent such VPI and PLI calls to have
> any effect. The SV engine can remember that it is calling a directC function
> can make the VPI nd PLI functions have no efffect other than may be giving a
> warning message.

Many of PLI functions refer to the current instance or current task/function.
In order for them to work, compiler must set some variables before
the call. Roughly speaking, all $pli calls are instrumented somehow.
Similar instrumentation would be needed for DirectC calls if PLI/VPI
could be safely called from inside of a C function, otherwise PLI function
would simply crash.

Yes, "SV engine can remember that it is calling a directC function"
but this will involve some overhead, perhaps small, yet an overhead
totally undue for simple C calls.

> While looking back at the original goals of the directC interface, I read
> that we want to design a simple, easy to use, fast performance, limited
> functionality C interface which directly access simulation objects.
>
> Francoise

Exactly!
Either generality or simplicity with performance, I'm afraid.

Adding more and more capabilities to DirectC calls seem to defy
the original requirements and brings DirectC dangerously close to PLI.
So, why not to stick with PLI for more sophistaicated needs and
spare (leave intact!) the simple DirectC for simple needs?

Thanks,
Andrzej



This archive was generated by hypermail 2b28 : Wed Nov 06 2002 - 17:25:00 PST