Wrap on overflow
Diagnostic action to take if signal value overflows data type value range
Model Configuration Pane: Diagnostics / Data Validity
Description
The Wrap on overflow parameter specifies the diagnostic action to take if the value of a signal overflows and wraps around the range of values for the signal data type. This parameter applies only to overflows that wrap for integer and fixed-point data types. This parameter also detects division by zero for all data types, including floating-point data types.
To check for floating-point overflows, such as Inf
or NaN
values for signals that have the double
or single
data type, use the Inf or NaN block output parameter.
The software ignores values other than None
for this parameter in model references that simulate in accelerator mode.
Settings
warning
(default) | error
| none
warning
The software issues a warning if the value of a signal overflows the range of values for its data type.
error
The software issues an error and terminates simulation if the value of a signal overflows the range of values for its data type.
During code generation, the software might simulate one or more blocks in the model for optimization purposes. If the value of a signal overflows the range of values for its data type in this process, the software issues an error and terminates code generation.
none
The software does not issue a diagnostic if the value of a signal overflows the range of values for its data type.
Tips
To ensure that simulation results match the results of generated code, disable the Remove code from floating-point to integer conversions that wraps out-of-range values (Simulink Coder) parameter if a floating-point to integer or floating-point to fixed-point overflow occurs.
To identify model references that simulate in accelerator mode for which the software changes configuration parameter settings, use the Model Advisor.
In the Simulink® Toolstrip, on the Modeling tab, click Model Advisor.
Click OK.
In the Model Advisor, click the arrow to expand the By Task list. Then, click the arrow to expand the Model Referencing list.
Select and run the Check diagnostic settings ignored during accelerated model reference simulation check.
Recommended Settings
Application | Setting |
---|---|
Debugging | warning |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | error |
Programmatic Use
Parameter: IntegerOverflowMsg |
Type: string | character vector |
Value: "none" | "warning" | "error" |
Default: "warning" |
Version History
Introduced before R2006a