Check data type of loop control variables
mathworks.hism.hisl_0102
Dependencies: Simulink® Check™
Usage: High-Integrity System Modeling
Guideline: hisl_0102: Data type of loop control variables to improve MISRA C:2012 compliance
Description
This check identifies loop control variables that use noninteger data types.
The check applies to:
For Iterator blocks.
For loops in MATLAB Function blocks.
Check Parameters
Use the Model Advisor Configuration Editor to define the scope of the analysis by specifying the input parameters.
Parameter | Description |
---|---|
Follow links | Verify and trace links within the Simulink model.
|
Look under masks | Specify whether to include masked model elements in the analysis.
|
Recommended Actions and Results
Review the violations that are flagged by the check and the recommended action for fixing the issue. After applying the changes, save the model and rerun the check analysis.
Modeling Condition | Recommended Action |
---|---|
For Iterator blocks are using a noninteger data type for loop control counter variable. | Set the data type of the loop control counter variable to an integer data type. |
For loops are using a noninteger data type for loop control counter variable in MATLAB Function blocks. | Set the data type of loop control counter variables to an integer data type. |
For Iterator or MATLAB Function blocks are using data types for loop control counter variables that cannot be determined. | Manually verify the data type of the variables. |
Capabilities and Limitations
Does not look at loop control variables inside Stateflow charts
Does not run on library models
Allows exclusions of blocks and charts
Flags undetermined data types as informational result
Analyzes only active variant choices
Performs model compilation
Version History
Introduced in R2018b
See Also
Topics
- Check Your Model Using the Model Advisor
- Address Model Check Results
- Save and View Model Advisor Check Reports
- Improve Simulation Performance Using Performance Advisor
- Upgrade Models Using Upgrade Advisor
- Use Model Advisor Configuration Editor to Customize Model Advisor
- Exclude Blocks from Model Advisor Check Analysis
- Justify Model Advisor Violations from Check Analysis
- Check Model Compliance Using Edit-Time Checking