Using Blocks that Don’t Support Fixed-Point Data Types

Find Blocks That Support Fixed-Point Data Types

The Simulink Block Data Type Support table summarizes characteristics of blocks in the Simulink® block library, including whether or not they support fixed-point data types.

To view the table, enter the following command at the MATLAB® command line:


What to Do When a Block Is Not Supported For Fixed-Point Conversion

Isolate the Block

If you encounter a block that is not supported for fixed-point conversion, you can isolate the block by decoupling it with a Data Type Conversion block. This workaround is useful when you do not intend to use the unsupported block on an embedded processor. One example of this is using the Chirp Signal block, which does not support fixed-point outputs, to generate a signal for simulation data.

The subsystem shown is designed for use on an embedded processor and must be converted to fixed point. The Chirp Signal block creates simulation data. The Chirp Signal block supports only floating-point double outputs. However, if you decouple the Chirp Signal from the rest of the model by inserting a data type conversion block after the Chirp Signal block, you can use the Fixed-Point Tool to continue converting the subsystem to fixed point.

Lookup Table Block Implementation

Many blocks that are not supported by the Fixed-Point Tool can be approximated with a lookup table block. Design an efficient fixed-point implementation of an unsupported block by using the fixpt_look1_func_approx and fixpt_look1_func_plot functions. For an example, see Approximate the Square Root Function.

User-Authored Blocks

You can create your own block which is supported by the Fixed-Point Tool from one of the blocks in the User-Defined Functions Library.