To automatically generate C code for your design, and execute
on an SoC device, use the SoC Builder tool. See Generate SoC Design. You must have an Embedded Coder® license to generate and execute C code for your SoC device.
Embedded Coder generates event-driven code for this block. This
diagram shows a generalized representation of the generated code implementation.

Note
Timing measurements from generated code might vary within the execution of a task
instance compared to the timing of tasks in simulation. You can configure your model to
use data caching in task signals to reach improved agreement between the simulation and
generated code. For more information, see Value and Caching of Task
Subsystem Signals.