User guide
19-36
Using the VCS / SystemC Cosimulation Interface
Generation of the TLI Adapters
The following command generates SystemVerilog and SystemC
source code for the TLI adapters from the specified interface definition
file:
syscan -tli_gen interface_definition_file
or
syscan -tli_gen_class interface_definition_file
The command generates SystemC and SystemVerilog files that
define the TLI adapters for each language domain. All generated files
can be compiled just like any other source file for the corresponding
domain. The files have to be generated again only when the content
of the interface definition file changes.
TLI adapters for the sv_calls_sc direction can be generated in two
different styles. The SystemC part of the generate adapter is the same
for both styles, however the SystemVerilog part is different. Option
-tli_gen creates a SystemVerilog "interface". Option
-tli_gen_class creates a SystemVerilog "class". Both styles have
benefits and penalties.
A class is generally easier to connect into the SystemVerilog source
code and there are situations where a SystemVerilog testbench
allows to instantiate a class but not an interface. However, if a class
is generated, then the TLI adapter can create only one connection of
this type between the SystemVerilog and SystemC side. If, on the
other hand, an interface is generated, then multiple connections can
be created (which are distinguished by the integer parameter of the
interface).