The MATLAB functions and language syntax supported for HDL code generation are available from this page. If your MATLAB algorithm uses an unsupported function, you can generate code by replacing the function with a lookup table approximation. See Replacing Functions Using Lookup Table Approximations.
Replace a Custom Function with a Lookup Table
With HDL Coder™, you can generate lookup table approximations for functions that do not support fixed-point types, and replace your own functions.
Replace the exp Function with a Lookup Table
With HDL Coder, you can handle functions that are not supported for fixed point and replace your own functions.
Load constants from a MAT-File
Use the coder.load function to load constants from a MAT-file.
Functions Supported for HDL Code Generation — Alphabetical List
You can generate efficient HDL code for a subset of MATLAB built-in functions and toolbox functions that you call from MATLAB code.
Functions Supported for HDL Code Generation — Categorical List
You can generate efficient HDL code for a subset of MATLAB built-in functions and toolbox functions that you call from MATLAB code.
MATLAB data type and scope support for HDL code generation
MATLAB operator language support for HDL code generation
MATLAB control flow statement language support for HDL code generation
MATLAB persistent variable language support for HDL code generation
MATLAB persistent array variable language support for HDL code generation
Describes how complex signals and operations in MATLAB code map to generated HDL code
Generating HDL code for MATLAB fixed-point bitwise functions
Fixed-Point Run-Time Library Functions
Fixed-point run-time library function language support for HDL code generation
Replacing Functions Using Lookup Table Approximations
The Fixed-Point Designer™ MATLAB Coder™ software provides an option to generate lookup table approximations for continuous and stateless single-input, single-output functions in your original MATLAB code.