| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Fixed Point |
| Contents | Index |
| On this page… |
|---|
Introduction to the Fixed-Point Tool Before Using the Fixed-Point Tool to Autoscale Your Simulink Model Best Practices for Using the Fixed-Point Tool to Autoscale Your Simulink Model |
The Fixed-Point Tool is a graphical user interface that automates the task of specifying scaling for fixed-point data types in a model. The tool collects range data for model objects, either from design minimum and maximum values that objects specify explicitly, or from logged minimum and maximum values that occur during simulation. Based on these values, the tool proposes fixed-point scaling that maximizes precision and covers the range. The tool allows you to review the scaling proposals and then apply them selectively to objects in your model.
Tip To prepare a model for conversion and obtain an initial scaling, first use the Fixed-Point Advisor. Then use the Fixed-Point Tool to refine the model scaling. |
Before using the Fixed-Point Tool to autoscale your Simulink model, consider how autoscaling affects your model:
The Fixed-Point Tool proposes new scaling for the fixed-point data types in your model. If you choose to apply the proposed autoscaling, the Fixed-Point Tool changes the data types in your model. To ensure you can recover your original data type settings, back up your model before using the Fixed-Point Tool.
For more information about backing up your model and other best practices for using the Fixed-Point Tool, see Best Practices for Using the Fixed-Point Tool to Autoscale Your Simulink Model.
Ensure that you can update diagram successfully. Sometimes, changing the data types in your model results in subsequent update diagram errors. It is good practice to test update diagram immediately after applying autoscaling proposals. This practice enables you to fix any errors before making further modifications to your model.
For more information, see Updating a Block Diagram in the Simulink documentation.
The Fixed-Point Tool alerts you to potential scaling issues for each object in your model:
If the Fixed-Point Tool detects that the proposed scaling will introduce data type errors if applied to an object, it marks the object with a red X. You must inspect this proposal and fix the problem in the Simulink model. After fixing the problem, rerun the simulation and generate a proposal again to confirm that you have resolved the issue.
For more information about reviewing proposals and resolving conflicts, see Examining Results to Resolve Conflicts.
If the Fixed-Point Tool detects that the proposed scaling poses potential issues for an object, it marks the object with a yellow caution. You should review the proposal before accepting it.
If the Fixed-Point Tool detects that the proposed scaling poses no issues for an object, it marks the object with a green check.
Caution The Fixed-Point Tool is not aware of all potential scaling issues. Even if the Fixed-Point Tool detects no scaling issues for your model, subsequent data type propagation issues might occur. For more information, see Models That Might Cause Data Type Propagation Errors. |
Check that update diagram succeeds for your model before you begin autoscaling. (To update diagram, press Ctrl+D.) If update diagram fails, fix the failure in your model so that update diagram is successful before autoscaling.
Always back up your Simulink model before using the Fixed-Point Tool.
This practice provides a fallback in case of error and a baseline for testing and validation.
Start small and convert individual subsystems in your model one at a time. This practice facilitates debugging by isolating the source of fixed-point issues.
If you encounter data type propagation issues with a particular subsystem, isolate this subsystem by placing Data Type Conversion blocks on the inputs and outputs of the system. The Data Type Conversion block converts an input signal of any Simulink data type to the data type and scaling you specify for its Output data type parameter. This practice enables you to continue autoscaling the rest of your model.
Test update diagram immediately after applying autoscaling proposals. If update diagram fails, take one of the following actions:
Use the failure information to fix the errors in your model. After fixing the errors, test update diagram again.
If you are unable to fix the errors, restore your backed up model.
You can prevent the Fixed-Point Tool replacing the current data type. Use the Lock output data type setting against changes by the fixed-point tools parameter available on many blocks. The default setting allows replacement. Use this setting when:
You already know the fixed-point data types you want to use for a particular block.
For example, the block is modeling a real-world component. Set up the block to allow for known hardware limitations, such as restricting outputs to integer values.
Specify the output data type of the block explicitly and select Lock output data type setting against changes by the fixed-point tools.
You are debugging a model and know that a particular block accepts only certain input signal data types.
Specify the output data type of upstream blocks explicitly and select Lock output data type setting against changes by the fixed-point tools on these blocks.
If your model contains Simulink signal objects and you accept proposed data types, the Fixed-Point Tool applies the changes to the signal objects automatically. However, the Fixed-Point Tool does not automatically save changes it makes to Simulink signal objects. To preserve changes, save the Simulink signal objects in your workspace and model before closing the model.
When the Fixed-Point Tool proposes changes to the data types in your model, it alerts you to potential scaling issues for objects in the model. If the Fixed-Point Tool alerts you to data type errors, you must diagnose the errors and fix the problems. For more information, see Examining Results to Resolve Conflicts.
The Fixed-Point Tool is not aware of all potential scaling issues. Therefore, even when the Fixed-Point Tool does not report any scaling issues, accepting the proposed data types might cause data type propagation errors. To ensure that you can recover your original data type settings, back up your model before using the Fixed-Point Tool. For more information about backing up your model and other best practices for using the Fixed-Point Tool, see Best Practices for Using the Fixed-Point Tool to Autoscale Your Simulink Model.
The following models are likely to cause data type propagation issues:
| Model Uses... | Fixed-Point Tool Behavior | Data Type Propagation Issue |
|---|---|---|
| Buses | Not aware of the minimum, maximum, data type, and initial value information for bus objects and does not include them in autoscaling. | Fixed-Point Tool might propose data types that are inconsistent with the data types for the bus object or generate proposals that cause overflows. |
| Simulink parameter objects | Does not consider any data type information for Simulink parameter objects and does not include them in autoscaling. | Fixed-Point Tool might propose data types that are inconsistent with the data types for the parameter object or generate proposals that cause overflows. |
| User-defined S-functions | Not aware of the operation of user-defined S-functions. |
|
| User-defined masked subsystems | Has no knowledge of the masked subsystem workspace and therefore cannot take this subsystem into account when autoscaling. | Fixed-Point Tool might propose data types that are inconsistent with the requirements of the masked subsystem, particularly if the subsystem uses mask initialization. The proposed data types might cause data type mismatch errors or overflows. |
| Linked subsystems | Does not include linked subsystems in autoscaling. | Data type mismatch errors might occur at the linked subsystem boundaries. |
| Embedded MATLAB Function blocks | Does not propose data types for Embedded MATLAB Function blocks. | Fixed-Point Tool might propose data types that are inconsistent with the requirements of the Embedded MATLAB Function blocks. The proposed data types might cause data type mismatch errors or overflows. |
| Model reference | Does not propose data types for referenced models. | Data type propagation errors might occur at the referenced model's boundaries. |
Use any of the following methods to open the Fixed-Point Tool:
From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool.
From a model's context (right-click) menu, select Fixed-Point Tool.
From a subsystem's context (right-click) menu, select Fixed-Point > Fixed-Point Tool.
Alternatively, you can use the fxptdlg function to open the tool programmatically.
When you first open the Fixed-Point Tool, it appears as shown here.

The Fixed-Point Tool contains the following components:
Model Hierarchy pane — Displays a tree-structured view of the Simulink model hierarchy (see Model Hierarchy Pane).
Contents pane — Displays a tabular view of objects that log fixed-point data in a system or subsystem (see Contents Pane).
Dialog pane — Displays parameters for specifying particular attributes of a system or subsystem, such as its data type override and fixed-point instrumentation mode (see Dialog Pane).
Main toolbar — Provides buttons that execute commonly used Fixed-Point Tool commands (see Main Toolbar).
![]() | Fixed-Point Tool | Working with the Fixed-Point Tool | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |