Fixed-Point Support for MATLAB System Objects

Get Information About Fixed-Point System Objects

System objects that support fixed-point data processing have fixed-point properties, which you can display for a particular object by typing dsp.<ObjectName>.helpFixedPoint at the command line. See Display Fixed-Point Properties for System Objects to set the display of System object™ fixed-point properties.

The following signal processing System objects support fixed-point data processing.

 DSP System Toolbox System Objects that Support Fixed Point

Display Fixed-Point Properties for System Objects

You can control whether the software displays fixed-point properties with either of the following commands:

  • matlab.system.showFixedPointProperties

  • matlab.system.hideFixedPointProperties

at the MATLAB® command line. These commands set the Show fixed-point properties display option. You can also set the display option directly via the MATLAB preferences dialog box. Click Preferences on the MATLAB Toolstrip. The Preferences dialog box opens. Scroll down and select System Objects. Finally, select or deselect Show fixed-point properties.

If an object supports fixed-point data processing, its fixed-point properties are active regardless of whether they are displayed or not.

Set System Object Fixed-Point Properties

A number of properties affect the fixed-point data processing used by a System object. Objects perform fixed-point processing and use the current fixed-point property settings when they receive fixed-point input.

You change the values of fixed-point properties in the same way as you change any System object property value. See Configure Components for Your System. You also use the Fixed-Point Designer™ numerictype object to specify the desired data type as fixed-point, the signedness, and the word- and fraction-lengths. System objects support these values of DataTypeMode: Boolean, Double, Single, and Fixed-point: binary point scaling.

In the same way as for blocks, the data type properties of many System objects can set the appropriate word lengths and scalings automatically by using full precision. System objects assume that the target specified on the Configuration Parameters Hardware Implementation target is ASIC/FPGA.

If you have not set the property that activates a dependent property and you attempt to change that dependent property, a warning message displays. For example, for the dsp.FFT object, before you set CustomOutputDataType to numerictype(1,32,30) you must set OutputDataType to 'Custom'.

    Note:   System objects do not support fixed-point word lengths greater than 128 bits.

    For any System object provided in the Toolbox, the fimath settings for any fimath attached to a fi input or a fi property are ignored. Outputs from a System object never have an attached fimath.

Full Precision for Fixed-Point System Objects

FullPrecisionOverride is a convenience property that, when you set to true, automatically sets the appropriate properties for an object to use full-precision to process fixed-point input. For System objects, full precision, fixed-point operation refers to growing just enough additional bits to compute the ideal full precision result. This operation has no minimum or maximum range overflow nor any precision loss due to rounding or underflow. It is also independent of any hardware-specific settings. The data types chosen are based only on known data type ranges and not on actual numeric values. Unlike full precision for dfilt objects, full precision for System objects does not optimize coefficient values.

When you set the FullPrecisionOverride property to true, the other fixed-point properties it controls no longer apply and any of their non-default values are ignored. These properties are also hidden. To specify individual fixed-point properties, you must first set FullPrecisionOverride to false.

Was this topic helpful?