Documentation

Optimization Pane: Signals and Parameters

The Optimization > Signals and Parameters pane includes parameters for improving the simulation speed of your models and improving the performance of the generated code. Model configuration parameters to improve the generated code require Simulink® Coder™ or Embedded Coder®.

ParameterDescription

Default parameter behavior

Transform numeric block parameters into constant inlined values in the generated code.

Inline invariant signals

Transform symbolic names of invariant signals into constant values.

Use memcpy for vector assignment

Optimize code generated for vector assignment by replacing for loops with memcpy.

Memcpy threshold (bytes)

Specify the minimum array size in bytes for which memcpy and memset function calls should replace for loops for vector assignments in the generated code.

Pack Boolean data into bitfields

Specify whether Boolean signals are stored as one–bit bitfields or as a Boolean data type.

Bitfield declarator type specifier

Specify the bitfield type when selecting configuration parameter Pack Boolean data into bitfields.

Loop unrolling threshold

Specify the minimum signal or parameter width for which a for loop is generated.

Maximum stack size (bytes)

Specify the maximum stack size in bytes for your model.

Pass reusable subsystem outputs as

Specify how a reusable subsystem passes outputs.

Parameter structure

Control how parameter data is generated for reusable subsystems.

These configuration parameters are in the Advanced parameters section.

ParameterDescription

Enable local block outputs

Specify whether block signals are declared locally or globally.

Reuse local block outputs

Specify whether Simulink Coder software reuses signal memory.

Eliminate superfluous local variables (Expression folding)

Collapse block computations into single expressions.

Reuse global block outputs

Reuse global memory for block outputs.

Optimize global data access

Select global variable optimization.

Simplify array indexing

Replace multiply operations in array indices when accessing arrays in a loop.

Perform inplace updates for Bus Assignment blocks

Reuse the input and output variables of Bus Assignment blocks if possible.

Reuse buffers for Data Store Read and Data Store Write blocks

Remove temporary buffers for Data Store Read and Data Store Write blocks. Use the Data Store Memory block directly if possible.

Optimize block operation order in the generated code

Reorder block operations in the generated code for improved code execution speed.

Reuse buffers of different sizes and dimensions

Reduce memory consumption by reusing buffers to store data of different sizes and dimensions.

Buffer for reusable subsystems

No further documentation is available for this parameter.

Maximum number of arguments for subsystem outputs

Set maximum number of subsystem outputs to pass individually.

Related Topics

Was this topic helpful?