Operator to represent Bitwise and Logical Operator blocks
Specify operator type in generated code
Since R2020a
Model Configuration Pane: Code Generation / Optimization
Description
The Operator to represent Bitwise and Logical Operator blocks optimizes the generated code with Logical or Bitwise operators or a combination of both. The supported data type is Boolean.
Settings
Same as modeled
(default) | Logical Operator
| Bitwise Operator
Same as modeled
Generate code with operators as modeled in Simulink. Generates code with a combination of Bitwise and Logical operators if the model contains both Logical and Bitwise blocks.
Logical Operator
Generate code with Logical operators. Converts Bitwise operator blocks in the model to Logical operators in the generated code.
Bitwise Operator
Generate code with Bitwise operators. Converts Logical operators blocks in the model to Bitwise operators in the generated code. Selecting this option may improve ROM efficiency when the code contains Bitwise operators.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | Bitwise operator (ROM efficiency) |
Safety precaution | No impact |
Programmatic Use
Parameter: BitwiseOrLogicalOp |
Type: character vector |
Value: 'Same as modeled' | 'Logical operator' | 'Bitwise operator' |
Default: 'Same as modeled' |
Version History
Introduced in R2020a