Generate Component and Testbench
If you have not yet done so, finish selecting the TLM generation options and click OK to save your changes and exit the TLM Generation options panes.
Generate code. Select one of the following ways:
Press Ctrl-B (full model).
Right-click the subsystem and select C/C++ Code > Build This Subsystem.
In the Simulink® toolstrip, select the C Code tab, and click Generate Code (this option builds the full model).
Note
Generate the component and testbench on the architecture you plan to use for running the SystemC simulation.
Go to Run TLM Component Testbench (optional).
For more about using the generated TLM component, see Export TLM Component.