Hi There,
Using DPI I am able to call a function defined in SV from C code.
Is calling a SV function from SystemC code any different then calling SV function from C code?
If yes whats the difference?
Thanks,
Sunil.
Hi There,
Using DPI I am able to call a function defined in SV from C code.
Is calling a SV function from SystemC code any different then calling SV function from C code?
If yes whats the difference?
Thanks,
Sunil.
In reply to KumarSunilB:
Unfortunately there’s no standard for interoperability between standards. You are constrained by what your tool vendor supports. The current SystemVerilog DPI-C standard only defines calling SV from C code that has been called from SV. That’s because SystemVerilog has all kinds of context information like scope, simulation-time, scheduling event region. that does not exist in C. So the DPI uses the context of entry into C code as the same context when C calls SV. SystemC code is not “called” from SystemVerilog.
There have been a number of attempts to define a DPI-SC layer, as well as some open source packages that allow transaction based communication between the languages.