Stateflow |
 |
Overflow Detection for Fixed-Point Types
Overflow occurs when the magnitude of a result assigned to a data exceeds the numeric capacity of that data. You enable Stateflow to detect overflow of integer and fixed-point operations during simulation with the following steps:
- For the simulation target of your model, open the Code Generation Options dialog.
- See Accessing the Target Builder Dialog for a Target for instructions on how to access this dialog.
- Select both the Enable debugging/animation and Enable overflow detection (for debugging) options.
- For descriptions of these options, see Specifying Code Generation Options.
- Build the simulation target.
- See Starting a Simulation Target Build for instructions.
- Open the Debugger window and select the Data Range check box.
- See Error Checking Options for a description of this option.
- Begin simulation.
Simulation breaks execution when an overflow occurs.
| Assignment (=, :=) and Cast Operations | | Sharing Fixed-Point Data with Simulink |  |