Main Content

Remove code that protects against division arithmetic exceptions

Description

Specify whether to generate code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data.

Category: Optimization

Settings

Default: Off

On

Does not generate code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data. To retain bit-true agreement between simulation results and results from generated code, check that your model does not produce division by zero or INT_MIN/-1 operations, where the quotient cannot be represented in the data type.

Off

Generates code that guards against division by zero and INT_MIN/-1 operations for integers and fixed-point data.

Dependencies

  • This parameter appears only for ERT-based targets.

  • This parameter requires a Embedded Coder® license when generating code.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn (execution, ROM)
Safety precautionOff

Related Topics