User guide

19-22
Using the VCS / SystemC Cosimulation Interface
extern "C" bool hdl_elaboration_only()
Both will be set/yield true only during this extra execution of simv
during step 1.
For example, guard statements like this:
module constructor:
if (! hdl_elaboration_only()) {
... open log file for coverage data ...
} module destructor:
if (! hdl_elaboration_only()) {
... close log file for covergae data ...
}
Considerations for Export DPI Tasks
When you want to call export "DPI" tasks from the SystemC side of
the design you need todo either one of the following two steps.
Use syscan -export_DPI <function-name>
Register the name of all export DPI functions and tasks prior to the
final syscsim call. You need to call syscan in the following way:
syscan -export_DPI <function-name1> [<function-name2> ...]
This is necessary for each export DPI task or function that is used by
SystemC or C code. Only the name of function must be specified,
formal arguments are neither needed nor allowed. Multiple space-
separated function names can be specified in one call of syscan -
export_DPI. It is allowed to call syscan -export_DPI any
number of times. A function name can be specified multiple times.