| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
| On this page… |
|---|
To optimize Real-Time Workshop code generation for your model, perform these steps:
In the Stateflow Editor, select Simulation > Configuration Parameters.
In the Configuration Parameters dialog box, select the Optimization pane.
In the Stateflow section of the Optimization pane, choose from these options:
Use bitsets for storing state configuration — Reduces the amount of memory that stores state configuration variables. However, it can increase the amount of memory that stores target code if the target processor does not include instructions for manipulating bitsets.
Use bitsets for storing Boolean data — Reduces the amount of memory that stores Boolean variables. However, it can increase the amount of memory that stores target code if the target processor does not include instructions for manipulating bitsets.
The following design tips can help optimize generated code.
Do not access machine-parented data in a graphical function
Be explicit about the inline option of a graphical function
Avoid using multiple edge-triggered events in Stateflow charts
Combine input signals of a chart into a single bus object
![]() | Procedures for Embeddable Code Generation | Using the Command-Line API to Set Parameters for Simulation and Embeddable Code Generation | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |