Main Content

Pack Boolean data into bitfields

Control storing Boolean signals

Model Configuration Pane: Code Generation / Optimization

Description

The Pack Boolean data into bitfields parameter specifies whether Boolean signals are stored as one–bit bitfields or as a Boolean data type.

Note

You cannot use this optimization when you generate code for a target that specifies an explicit structure alignment.

Settings

off (default) | on
On

Stores Boolean signals into one–bit bitfields in global block I/O structures or DWork vectors. This will reduce RAM, but might cause more executable code.

Off

Stores Boolean signals as a Boolean data type in global block I/O structures or DWork vectors.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff (execution, ROM), On (RAM)
Safety precautionNo impact

Programmatic Use

Parameter: BooleansAsBitfields
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2009b