Main Content

Functions Supported for HDL and HLS Code Generation

You can generate efficient code for a subset of MATLAB® built-in functions and toolbox functions that you call from MATLAB code.

Supported MATLAB and Fixed Point Runtime Library Functions

The supported functions for HDL and HLS code generation are listed in the following tables. In these tables, a Extended capabilities warning icon. icon before the name of a function indicates that there are specific usage notes and limitations related to HDL and HLS code generation for that function. To view these usage notes and limitations, in the corresponding reference page, scroll down to the Extended Capabilities section at the bottom and expand the HDL Code Generation section.

The table shows HDL and HLS code generation support for both MATLAB and fixed-point run-time library functions from the Fixed-Point Designer™ functions.

HDL and HLS code generation support for the functions is summarized in the following tables.

Fixed-Point Function Limitations

In addition to function-specific limitations listed in the table, the following general limitations apply to the use of Fixed-Point Designer functions in generated HDL and HLS code:

  • fipref and quantizer objects are not supported.

  • Slope and bias scaling are not supported.

  • Dot notation is only supported for getting the values of fimath and numerictype properties. Dot notation is not supported for fi objects, and it is not supported for setting properties.

  • You cannot change the fimath or numerictype of a given variable after that variable has been created.

  • The boolean and ScaledDouble values of the DataTypeMode and DataType properties are not supported.

  • For all SumMode property settings other than FullPrecision, the CastBeforeSum property must be set to true.

  • The numel function returns the number of elements of fi objects in the generated code.

  • General limitations of C/C++ code generated from MATLAB apply. See MATLAB Language Features That Code Generation Does Not Support.

See Also

|

Related Topics