| Stateflow User's Guide |
 |
Configuring Stateflow Blocks in Nonlibrary Models for Real-Time Workshop
For nonlibrary models, you configure the Stateflow blocks in your model to generate code for the RTW target in Simulink in the Configuration Parameters dialog with the following steps:
- In a Simulink window or a Stateflow diagram editor, from the Simulation menu, select Configuration Parameters.
- The Configuration Parameters dialog appears, as shown.

- Select the Optimization node, as shown.
- The Optimization configuration settings appear in the right pane, as shown.

- In the right pane, in the Stateflow section, select from the following options:
- Use bitsets for storing state configuration -- Enabling this option specifies that bitsets be used for storing state configuration variables. This can significantly reduce the amount of memory required to store the variables. However, it can increase the amount of memory required to store target code if the target processor does not include instructions for manipulating bitsets.
- Use bitsets for storing boolean data -- Enabling this option specifies that bitsets be used for storing Boolean data. This can significantly reduce the amount of memory required to store Boolean variables. However, it can increase the amount of memory required to store target code if the target processor does not include instructions for manipulating bitsets.
- Minimize array reads using temporary variables -- In certain microprocessors, global array read operations are more expensive than accessing a temporary variable on stack. Using this option minimizes array reads by using temporary variables when possible.
| Configuring Real-Time Workshop for Stateflow | | Configuring the Stateflow Blocks in Library Models for Real-Time Workshop |  |
© 1994-2005 The MathWorks, Inc.