Documentation

Optimization Pane: General

The Optimization > General 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

Application lifespan (days)

Specify how long (in days) an application that contains blocks depending on elapsed or absolute time should be able to execute before timer overflow.

Use division for fixed-point net slope computation

The Fixed-Point Designer™ software performs net slope computation using division to handle net slopes when simplicity and accuracy conditions are met.

Use floating-point multiplication to handle net slope corrections

The Fixed-Point Designer software uses floating-point multiplication to perform net slope correction for floating-point to fixed-point casts.

Default for underspecified data type

Specify the default data type to use for inherited data types if Simulink software could not infer the data type of a signal during data type propagation.

Optimize using the specified minimum and maximum values

Optimize generated code using the specified minimum and maximum values for signals and parameters in the model.

Remove root level I/O zero initialization

Specify whether to generate initialization code for root-level inports and outports set to zero.

Remove internal data zero initialization

Specify whether to generate initialization code for internal work structures, such as block states and block outputs, to zero.

Remove code from floating-point to integer conversions that wraps out-of-range values

Remove wrapping code that handles out-of-range floating-point to integer conversion results.

Remove code that protects against division arithmetic exceptions

Specify whether to generate code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data.

These configuration parameters are in the Advanced parameters section.

ParameterDescription

Remove code from floating-point to integer conversions with saturation that maps NaN to zero

Remove code that handles floating-point to integer conversion results for NaN values.

Compiler optimization level

Sets the degree of optimization used by the compiler when generating code for acceleration.

Verbose accelerator builds

Select the amount of information displayed during code generation for Simulink Accelerator mode, referenced model Accelerator mode, and Rapid Accelerator mode.

Implement logic signals as Boolean data (vs. double)

Controls the output data type of blocks that generate logic signals.

Block reduction

Reduce execution time by collapsing or removing groups of blocks.

Conditional input branch execution

Improve model execution when the model contains Switch and Multiport Switch blocks.

Use memset to initialize floats and doubles to 0.0

Specify whether to generate code that explicitly initializes floating-point data to 0.0.

Signal storage reuse

Reuse signal memory.

Evaluated application lifespan

Evaluated version of the Application lifespan (days) parameter. This parameter is read-only.

Disable incompatible optimizations

Specify whether to disable optimizations that are incompatible with Simulink Code Inspector.

Was this topic helpful?