Main Content

Pass reusable subsystem outputs as

Control how a reusable subsystem passes outputs

Model Configuration Pane: Code Generation / Optimization

Description

The Pass reusable subsystem outputs as parameter specifies how a reusable subsystem passes outputs.

Settings

Individual arguments (default) | Structure reference
Individual arguments

Passes each reusable subsystem output argument as an address of a local, instead of as a pointer to an area of global memory containing the output arguments. This option reduces global memory usage and eliminates copying local variables back to global block I/O structures. When the signals are allocated as local variables, there may be an increase in stack size. If the stack size increases beyond a level that you want, use the default setting. By default, the maximum number of output arguments passed individually is 12. To increase the number of arguments, increase the value of the Maximum number of arguments for subsystem outputs parameter.

Structure reference

Passes reusable subsystem outputs as a pointer to a structure stored in global memory.

Note

The default option is used for reusable subsystems that have signals with variable dimensions.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyIndividual arguments (execution, RAM), Structure reference (ROM)
Safety precautionNo impact

Programmatic Use

Parameter: PassReuseOutputArgsAs
Type: character vector
Value: 'Structure reference' | 'Individual arguments'
Default: 'Individual arguments'

Version History

Introduced in R2009a