Main Content

Check usage of fixed-point data type with non-zero bias

Check ID: mathworks.jmaab.jc_0643

Guideline: jc_0643: Fixed-point setting

Description

Identifies blocks with fixed-point output signal data type and non-zero bias.

For blocks that have a fixed-point data type for their output signals, check that block parameter Bias is set to 0.

In edit-time,

  • During pre-compilation, it instantly flags blocks with explicitly defined data types.

  • On post-compilation, flags blocks with inherited data types.

When you run Model Advisor, it flags all the blocks that violate the guideline

This check requires a Simulink® Check™ license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline provides only one sub ID.

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action

In the Data Type Assistant, Mode is set to Fixed Point but the value for Bias is not 0.

Change the block parameter Bias to 0.

Capabilities and Limitations

  • Does not run on library models.

  • Supports exclusions.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • For fixed-point data type signals, the bias is automatically set to zero when the data type is explicitly defined. However, this fix does not apply to signals with propagated data types, which require manual adjustment to ensure compliance.

Edit-Time Checking

This check is supported by edit-time checking.