Main Content

Use bitsets for storing state configuration

Description

Use bitsets to reduce the amount of memory required to store state configuration variables.

Category: Optimization

Settings

Default: Off

On

Stores state configuration variables in bitsets. Potentially reduces the amount of memory required to store the variables. Potentially requires more instructions to access state configuration, which can result in less optimal code.

Off

Stores state configuration variables in unsigned bytes. Potentially increases the amount of memory required to store the variables. Potentially requires fewer instructions to access state configuration, which can result in more optimal code.

Tips

  • Selecting this check box 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.

  • Select this check box for Stateflow® charts that have a large number of sibling states at a given level of the hierarchy.

  • Clear this check box for Stateflow charts with a small number of sibling states at a given level of the hierarchy.

Dependency

This parameter requires a Simulink® Coder™ license.

Command-Line Information

Parameter: StateBitsets
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityOff
EfficiencyOff (execution, ROM), On (RAM)
Safety precautionNo impact

Related Topics