Select TLM Processing Options
To execute your TLM model, choose between a SystemC thread, a callback function or a time-periodic thread in your generated TLM component.
SystemC Thread — The algorithm executes in its own independent SystemC thread. When the input buffers are full or when you write a command in the command and status register, an event is triggered. The system scheduler then picks up and executes that function. This option typically results in more realistic simulations but slower execution times.
Callback Function — The algorithm executes in a callback function called from the interface. When the input buffers are full or when you write a specific command in the command and status register, the function is called directly. This option results in faster execution but could be less realistic because the callback method does not process events in the same order as they would occur in a real world scenario.
Periodic SystemC Thread — A time-periodic thread executes the behavior of the algorithm. The period of the thread is derived from the Simulink block base sample rate.
In the Algorithm step function timing (ns) parameter, enter the time in nanoseconds. a wait() task counts the algorithm timing.
Select Create an interrupt request port on the generated TLM component to create an interrupt request port. This interrupt triggers every time a set of inputs is processed.