Detect overflow

Description

Specifies diagnostic action to take when a fixed-point constant overflow occurs during simulation.

Category: Diagnostics

Settings

Default: none

none

Simulink® software takes no action.

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • This diagnostic applies only to fixed-point constants (net slope and net bias).

  • Overflow occurs when the Simulink software converts a fixed-point constant to a data type whose range is not large enough to accommodate the ideal value of the constant. The ideal value is either too large or too small to be represented by the data type. For example, suppose that the ideal value is 200 and the converted data type is int8. Overflow occurs in this case because the maximum value that int8 can represent is 127.

  • Fixed-point constant overflow differs from fixed-point constant precision loss. Precision loss occurs when the ideal fixed-point constant value is within the range of the data type and scaling being used, but cannot be represented exactly.

Dependency

This parameter requires a Fixed-Point Designer™ license.

Command-Line Information

Parameter:FixptConstOverflowMsg
Value: 'none' | 'warning' | 'error'
Default: 'none'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics