Real-Time Workshop |
 |
Nonvirtual Subsystem Code Generation
Real-Time Workshop allows you to control how code is generated for any nonvirtual subsystem. The categories of nonvirtual subsystems are:
- Conditionally executed subsystems: execution depends upon a control signal or control block. These include triggered subsystems, enabled subsystems, action and iterator subsystems, subsystems that are both triggered and enabled, and function call subsystems. See Using Simulink for information on conditionally executed subsystems.
- Atomic subsystems: Any virtual subsystem can be declared atomic (and therefore nonvirtual) via the Treat as atomic unit option in the Block Parameters dialog.
See Using Simulink, and run the sl_subsys_semantics demo for further information on nonvirtual subsystems and atomic subsystems.
You can control the code generated from nonvirtual subsystems as follows:
- You can instruct Real-Time Workshop to generate separate functions, within separate code files, for selected nonvirtual systems. You can control both the names of the functions and of the code files generated from nonvirtual subsystems.
- You can cause multiple instances of a subsystem to generate reusable code, that is, as a single re-entrant function, instead of replicating the code for each instance of a subsystem or each time it is called.
- You can generate inlined code from selected nonvirtual subsystems within your model. When you inline a nonvirtual subsystem, a separate function call is not generated for the subsystem.
| Building Subsystems | | Nonvirtual Subsystem Code Generation Options |  |