Skip to Main Content Skip to Search
Product Documentation

Prepare for Data Typing and Scaling

Prepare for Data Typing and Scaling Overview

Configure blocks with data type inheritance or constraints to avoid data type propagation errors.

Description

The block settings from this folder simplifies the initial scaling. The optimal block configuration is achieved in later stages. The tasks in this folder are preparation for scaling, not actual scaling.

Tips

Block output and parameter minimum and maximum values can be specified in this step.

See Also

Review locked data type settings

Review blocks that currently have their scaling locked down and will be excluded from autoscaling.

Description

When blocks have their scaling locked, the Fixed-Point Advisor excludes them from autoscaling. This task identifies blocks that have locked scaling so that you can unlock them.

Results and Recommended Actions

ConditionsRecommended Action
Blocks have locked scaling.Unlock scaling on blocks that currently have locked scaling.

Action Results

Clicking Modify All unlocks scaling on blocks that currently have locked scaling.

Remove output data type inheritance

Identify blocks with an inherited output signal data type.

Description

Inherited data types might lead to data type propagation errors.

For floating-point inheritance blocks with floating-point inputs or outputs, the Fixed-Point Advisor replaces the inheritance with the fixed-point data type specified by the user. For floating-point inheritance blocks with fixed-point output and other Simulink and DSP System Toolbox and Communications System Toolbox™ blocks, the Fixed-Point Advisor now detects inheritance and replaces it with the compiled data type.

 What are Floating-Point Inheritance Blocks?

Input Parameters

Data type for blocks with floating-point inheritance

Enter a default fixed-point data type to use for floating-point inheritance blocks, or select one from the list:

undefined
int8
uint8
int16
uint16
int32
uint32
fixdt(1,16,4)

Results and Recommended Actions

ConditionsRecommended Action
An input parameter is invalid.Enter or select a valid value for the Data type for blocks with floating-point inheritance input parameter.
The system or subsystems contain floating-point inheritance blocks that have floating-point inputs.Set the block output data type to the recommended data type. Remove floating-point inheritance for these blocks by explicitly configuring the Output data type or Output data type mode parameter to the recommended value where possible.
Blocks or Stateflow output data in the current system or subsystems have inherited output data types.Remove output data type inheritance for blocks by explicitly configuring the Output data type or Output data type mode parameter to the recommended value where possible.
Remove output data type inheritance for Logical Operator blocks by clearing the Require all inputs and outputs to have the same data type parameter parameter.
Remove Stateflow output data type inheritance by explicitly configuring the output data Type property.

Action Results

Clicking Modify All explicitly configures the output data types to the recommended values where possible. Tables list the previous and current data types for the reconfigured blocks.

Relax input data type settings

Identify blocks with input data type constraints.

Description

Blocks that have input data type constraints might lead to data type propagation errors.

Results and Recommended Actions

ConditionsRecommended Action
The input data types of blocks or Stateflow charts in the current system or subsystems have constraints.Explicitly configure flexible input data types for blocks by setting the InputSameDT parameter to off where possible.
Explicitly configure Logical Operator blocks to have flexible input data types by setting the AllPortsSameDT parameter to off.
Explicitly configure flexible Stateflow chart input data types by setting the Type method to Inherited.
Select the Use Strong Data Typing with Simulink I/O chart property.

Action Results

Clicking Modify All explicitly configures the specified settings to the recommended value where possible. A table lists the previous and current settings for the reconfigured blocks.

Tip

Removing unnecessary data setting restrictions makes it more likely that the Propose data types task will succeed downstream.

Verify Stateflow charts have strong data typing with Simulink

Verify all Stateflow charts are configured to have strong data typing with Simulink I/O.

Description

Identify mismatches between input or output fixed-point data in Stateflow charts and their counterparts in Simulink models.

Results and Recommended Actions

ConditionsRecommended Action
Stateflow charts do not have strong data typing with Simulink I/O.Select the Use Strong Data Typing with Simulink I/O check box in the chart properties dialog.

Action Results

Clicking Modify All configures all Stateflow charts to have strong data typing with Simulink I/O.

Remove redundant specification between signal objects and blocks

Identify and remove redundant data type specification originating from blocks and Simulink signal objects.

Description

This task prepares your model for scaling by identifying and removing redundant data type specification originating from blocks and Simulink signal objects.

Input Parameters

Remove redundant specification from

Select from the list:

Blocks
Identify and remove redundant data type specification from blocks.
Signal objects
Identify and remove redundant data type specification from Simulink signal objects.

Results and Recommended Actions

ConditionsRecommended Action
Blocks associated with Simulink signal objects do not have their data type specification set to a passive mode.Set the data type specification of these blocks to a passive mode, such as Inherit via back propagation.
Simulink signal objects associated with blocks do not have their data type specification set to a passive mode. Set the data type specification of these Simulink signal objects to Auto.

Action Results

Clicking Modify All explicitly configures the properties of the blocks or Simulink signal objects to the recommended value where possible. A table displays the current and previous settings.

Verify hardware selection

Verify target hardware setting.

Description

Review the hardware device settings and verify they are the settings you intend to use.

Input Parameters

Default type of all floating-point signals

Enter a default fixed-point data type to use for all floating-point signals, or select one from the list. For FPGA/ASIC targets, specify the type explicitly.

Remain floating-point
Use this setting if you are converting only part of the model to fixed point and want to leave the rest of the model as floating point.
Same as embedded hardware integer
Use this setting if the hardware device specified is a microprocessor.
int8
int16
int32
fixdt(1,16,4)

Results and Recommended Actions

ConditionsRecommended Action
The model's Configuration Parameters > Hardware Implementation device parameters are not specified.Provide values for the Configuration Parameters > Hardware Implementation > Device vendor and Device type parameters.
Default data type of all floating-point signals is set to Remain floating-pointFor microprocessors, set to Same as embedded hardware integer. For FPGA/ASIC, set the data type explicitly. The Fixed-Point Advisor uses the sign and word length of this data type.

See Also

Specify block minimum and maximum values

Specify block output and parameter minimum and maximum values.

Description

Block output and parameter minimum and maximum values are used for fixed-point scaling in other tasks. Typically, they are determined during the design process based on the system you are creating.

Results and Recommended Actions

ConditionsRecommended Action
Minimum and maximum values are not specified for Inport blocks.Specify minimum and maximum values for Inport blocks.
Warning if no simulation minimum or maximum for any signals.If you are using simulation minimum and maximum data, return to "Create simulation reference data" to set up signal logging.

Tips

See Also

Batch-Fixing Warnings or Failures in the Simulink documentation.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS