User guide

19-38
Using the VCS / SystemC Cosimulation Interface
Note:
Do not manually modify the code generated by the TLI adapter.
Instead, override the debug functions in a derived class.
Instantiation and Binding
TLI adapters must always be instantiated in pairs, where each pair
forms a point-to-point connection from one language domain to the
other.
If multiple pairs of the same TLI adapter type are needed in the design,
you must instantiate the adapter multiple times in each domain. The
point-to-point connection must be set up by assigning a matching ID
value to the SystemVerilog interface or class, and the SystemC
module. The ID value is set for SystemC module and the
SystemVerilog class, if generated, as a constructor argument. In case
the SystemVerilog Adapter is generated as an interface, the ID is set
through a parameter.
The SystemVerilog TLI adapter (either as an interface or a class) can
be instantiated and used like any other SystemVerilog interface or
class. If you want to call an IMC of a SystemC interface you need to
call the corresponding member function/task of the TLI adapter.
The SystemC part of the TLI adapter is a plain SystemC module that
has a port p over the specified interface name
(sc_port if_name p). This module can be instantiated in the
systemC design hierarchy, where you can bind the port to the design
interface just like any other SystemC module.
As mentioned above, there is an optional constructor argument for
the point-to-point ID of type int that defaults to zero. There is a
second optional constructor argument of type int that specifies the