Convert to Fixed Point

Propose data types for objects in your model

After collecting idealized simulation ranges, derived ranges or both as described in Collect Ranges, propose data types for objects in your model based on the collected ideal ranges.

Functions

fxpoptOptimize data types of a system

Classes

DataTypeWorkflow.ConverterCreate fixed-point converter object
DataTypeWorkflow.findDecoupledSubsystemsGet a list of subsystems to replace with an approximation
DataTypeWorkflow.ProposalSettingsProposal settings object for data type proposals
fxpOptimizationOptionsSpecify options for data type optimization
OptimizationSolutionOptimized fixed-point implementation of system
OptimizationResult Result after optimizing fixed-point system

Topics

Convert Using the Fixed-Point Tool

Data Type Conversion Overview

Convert data types in your model to fixed point in one of three ways.

Autoscaling Using the Fixed-Point Tool

Use the Fixed-Pint Tool to convert a system from floating point to fixed point.

Convert Data Types

Third step in autoscaling workflow.

Convert Floating-Point Model to Fixed Point

Use the Fixed-Point Tool to convert a floating-point model to fixed point.

Rescale a Fixed-Point Model

Use the Fixed-Point Tool to scale fixed-point data types in a feedback model.

How the Fixed-Point Tool Proposes Data Types

The Fixed-Point Tool proposes data types based on collected ranges and proposal settings.

How Hardware Implementation Settings Affect Data Type Proposals

This example shows how to use the Fixed-Point Tool to propose word lengths for a model that implements a simple moving average algorithm.

Propose Data Types For Merged Simulation Ranges

Use the Fixed-Point Tool to merge results from multiple simulations, and propose data types based on the merged results.

Get Proposals for Results with Inherited Types

Blocks can inherit data types from a variety of sources. You can get data type proposals for blocks that use inherited output data types using the Fixed-Point Tool.

Convert to Fixed Point Programmatically

The Command-Line Interface for the Fixed-Point Tool

Highlight the differences between the command-line interface workflow and the Fixed-Point Tool workflow

Convert a Model to Fixed Point Using the Command Line

Use the command line interface of the Fixed-Point Tool to autoscale a model.

Optimize Fixed-Point Data Types for a System

Optimize data types in a system based on specified tolerances.

Optimize Data Types Using Multiple Simulation Scenarios

Define multiple simulation scenarios for range collection and verification.

Conversion of Model Objects

Convert a Referenced Model to Fixed Point

The Fixed-Point Tool logs simulation minimum and maximum values for referenced models and proposes data types based on a union of the collected ranges.

Autoscaling Data Objects Using the Fixed-Point Tool

Use the Fixed-Point Tool to convert a model that uses data objects for data type specification to fixed point.

Convert MATLAB Function Block to Fixed Point

Use the Fixed-Point Tool to convert a MATLAB® Function block to fixed-point.

Replace Functions in a MATLAB Function Block with a Lookup Table

Automatically replace functions in a MATLAB Function Block with a lookup table replacement.

Troubleshooting

Troubleshooting Data Type Optimization

Investigate errors thrown during data type optimization using the fxpopt function.

Models That Might Cause Data Type Propagation Errors

Overview of modeling practices that could cause data type propagation errors after autoscaling.

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.

Why Did The Fixed-Point Tool Not Propose Data Types?

This section explains what to do when the Fixed-Point Tool does not propose any data types.

Data Type Mismatch and Structure Initial Conditions

This example shows how to replace a structure initial condition with a Simulink.Parameter object.

Featured Examples