Main Content

Data Type Propagation Errors After Applying Proposed Data Types

Under certain conditions, the Fixed-Point Tool may propose a data type that is not compatible with the model. The following topic outlines model configurations that may cause this issue, and how you can resolve the issue.

Tip

Before attempting to autoscale a model, always ensure that you can update diagram successfully without data type override turned on.

Shared Data Type Groups

View Shared Data Type Groups

Organizing Fixed-Point Tool results into groups that must share the same data type can aid in the debugging process.

To view the data type group that a result belongs to, add the DT Group column to the spreadsheet. Right-click any existing column header. Select DT Group in the menu.

Click the DT Group column header to sort the results by this column.

Locked data type in a shared group

When an object is locked against changes by the Fixed-Point Tool, the Fixed-Point Tool does not propose a new data type for the object. If one of the results in a group of results that must share the same data type is locked, the Fixed-Point Tool proposes data types for all other objects in the group except for the locked object. If the data type proposed for the group is not compatible with the locked data type, a propagation error results.

To avoid incompatible data type proposals, perform one of the following.

  • Lock all objects in the group against changes by the Fixed-Point Tool.

  • Unlock the object in the group with the locked data type.

The ProposedDT column of the Fixed-Point Tool displays locked for all results that are locked against changes by the Fixed-Point Tool.

Part of a Shared Data Type Group is Out of Scope

When results that are in a shared data type group share a data type from outside the scope of the system under design, the Fixed-Point Tool is not able to propose a data type.

To get a data type proposal, perform one of the following.

  • Ensure that objects inside the system under design do not share their output data type with an object outside the selected system. One way to ensure that objects inside your system under design do not share their data type with objects outside the system, is by inserting Data Type Conversion blocks at the system boundaries.

  • Ensure that all objects that must share a data type are within the scope of the system under design.

Model Reference Blocks

Systems that share data types across model reference boundaries may get data type propagation errors.

To avoid data type propagation errors, consider the following.

  • Do not use the same signal object across model reference boundaries.

  • Insert Data Type Conversion blocks at model reference boundaries.

Block Constraints

Certain blocks have constraints on which data types it can support. For example, the Merge block requires that all inputs use the same data type.

  • Certain blocks in the Communications Toolbox™, DSP System Toolbox™, and Computer Vision Toolbox™ libraries have data type constraints. The Fixed-Point Tool is not aware of this requirement and does not use it for automatic data typing. Therefore, the tool might propose a data type that is inconsistent with the block requirements. In this case, manually edit the proposed data type such that it complies with block constraints.

    Visit the individual block reference pages for more information on these constraints.

Internal Block Rules

Sum Blocks

Sum blocks have both an output data type as well as an accumulator data type. Under certain conditions, when the accumulator data type is set to Inherit: Inherit via internal rule, a data type propagation error can result.

To get a compatible data type proposal, perform one of the following.

  • Change the accumulator data type to something other than Inherit: Inherit via internal rule and repropose data types for your model to get compatible data type proposals.

  • Lock the block against changes by the fixed-point tools.

Related Topics