Generate separate internal data per entry-point function
Whether to place variables representing signals and states operated on at same rate in same data structure
Since R2021a
Model Configuration Pane: Code Generation / Interface
Description
The Generate separate internal data per entry-point function parameter specifies whether to place the variables that represent model signals (block I/O data) and discrete states (DWork data) that are operated on at the same rate into the same data structure. If you configure a model to place the data associated with different rates in different structures, the code generator includes prefixes FuncInternalData0
, FunctionInternalData1
, and so on in the structure names.
Dependency
To enable this parameter, select the Combine signal/state structures parameter.
Settings
Off
(default) | On
- On
Enables generation of code for storing global block signal data (block I/O) and global state data (DWork vectors) that are operated on at the same rate in one data structure.
- Off
Disables generation of code for storing global block signal data and global state data that are operated on at the same rate in one data structure.
Examples
Tips
Selecting this parameter improves cache performance when deploying a model to a multicore hardware environment that meets these requirements:
The model has multiple rates and the Treat each discrete rate as a separate task parameter is selected.
The model contains multiple exported functions that run at different rates.
The previous models have separate entry-point functions that different cores can call. A core has its own data cache. Placing data for a single entry-point function in the same core data cache improves execution efficiency because the cache accesses are contiguous rather than spread out over multiple cores.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter: GroupInternalDataByFunction |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2021a