jc_0642: Integer rounding mode setting
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
MATLABVersions
All
Rule
Sub ID a
When block parameterInteger rounding modeis set toSimplest
, configuration parameterProduction hardware signed integer division rounds toshall be set toFloor
orZero
.
Not Applicable
Block parameterInteger rounding modeis set toSimplest
and configuration parameterProduction hardware signed integer division rounds tois set toZero
.
Configuration parameterProduction hardware signed integer division rounds tois set toUndefined
when block parameterInteger rounding modeis set toSimplest
.
Rationale
Sub ID a:
Prevents unintended rounding of divided signed integers.
Verification
Model Advisor check:Check Signed Integer Division Rounding mode(Simulink Check)
Last Changed
R2020a
See Also
Sub ID a, see MISRA AC SLSF 008B
JMAAB guideline jc_0642, which is available inControl Algorithm Modeling Guidelines UsingMATLAB,金宝app, andStateflowon the MathWorks®website.