Signal storage reuse
Reuse signal memory
Model Configuration Pane: Code Generation / Optimization
Description
The Signal storage reuse parameter instructs the code generator to reuse buffers allocated to store block input and output signals whenever possible.
Dependencies
This parameter enables:
If you have an Embedded Coder® license, this parameter enables:
Optimize global data access (Embedded Coder)
Perform in-place updates for Assignment and Bus Assignment blocks (Embedded Coder)
Reuse global block outputs (Embedded Coder)
Optimize block operation order in generated code (Embedded Coder)
Reuse buffers for Data Store Read and Data Store Write blocks (Embedded Coder)
Reuse output buffers of Model blocks (Embedded Coder)
Settings
on
(default) | off
- On
Simulink® software reuses memory buffers allocated to store block input and output signals, reducing the memory requirement of your real-time program.
- Off
Simulink software allocates a separate memory buffer for each block's outputs. This makes all block outputs global and unique, which in many cases significantly increases RAM and ROM usage.
Tips
Signal storage reuse can occur only among signals that have the same data type.
Clearing this option can substantially increase the amount of memory required to simulate large models.
Clear this option if you need to:
Debug a C-MEX S-function
Use a Floating Scope or a Floating Scope block with the Floating display option selected to inspect signals in a model that you are debugging
Simulink software opens an error dialog if Signal storage reuse is enabled and you attempt to use a Floating Scope or floating Display block to display a signal whose buffer has been reused.
Recommended Settings
Application | Setting |
---|---|
Debugging | Off |
Traceability | Off |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter:OptimizeBlockIOStorage |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Version History
Introduced in R2007a