You can generate efficient HDL code for a subset of MATLAB® built-in functions and toolbox functions that you call from MATLAB code. These functions appear in alphabetical order in the following table.
To find supported functions by MATLAB category or toolbox, see Functions Supported for HDL Code Generation — Categorical List.
Name | Product | Remarks and Limitations |
---|---|---|
abs | Fixed-Point Designer™ | Double and complex data types not supported. |
add | Fixed-Point Designer | — |
all | Fixed-Point Designer | Double data type not supported. |
and | MATLAB | — |
any | Fixed-Point Designer | Double data type not supported. |
bitand | MATLAB | — |
bitand | Fixed-Point Designer | — |
bitandreduce | Fixed-Point Designer | — |
bitcmp | MATLAB | — |
bitcmp | Fixed-Point Designer | — |
bitconcat | Fixed-Point Designer | — |
bitget | MATLAB | — |
bitget | Fixed-Point Designer | — |
bitor | MATLAB | — |
bitor | Fixed-Point Designer | — |
bitorreduce | Fixed-Point Designer | — |
bitreplicate | Fixed-Point Designer | — |
bitrol | Fixed-Point Designer | — |
bitror | Fixed-Point Designer | — |
bitset | MATLAB | — |
bitset | Fixed-Point Designer | — |
bitshift | MATLAB | For efficient HDL code generation, use the Fixed-Point Designer functions |
bitshift | Fixed-Point Designer | — |
bitsliceget | Fixed-Point Designer | — |
bitsll | Fixed-Point Designer | — |
bitsra | Fixed-Point Designer | — |
bitsrl | Fixed-Point Designer | — |
bitxor | MATLAB | — |
bitxor | Fixed-Point Designer | — |
bitxorreduce | Fixed-Point Designer | — |
ceil | Fixed-Point Designer | — |
complex | MATLAB | — |
complex | Fixed-Point Designer | — |
conj | Fixed-Point Designer | — |
convergent | Fixed-Point Designer | — |
ctranspose | MATLAB | — |
ctranspose | Fixed-Point Designer | — |
divide | Fixed-Point Designer |
|
end | Fixed-Point Designer | — |
eps | Fixed-Point Designer |
|
eq | MATLAB | — |
eq | Fixed-Point Designer | — |
fi | Fixed-Point Designer | — |
fimath | Fixed-Point Designer | — |
fix | Fixed-Point Designer | — |
floor | Fixed-Point Designer | — |
for | MATLAB | Do not use Do not use the HDL Coder™ does
not support nonscalar expressions in the conditions of |
ge | MATLAB | — |
ge | Fixed-Point Designer | — |
getlsb | Fixed-Point Designer | — |
getmsb | Fixed-Point Designer | — |
gt | MATLAB | — |
gt | Fixed-Point Designer | — |
horzcat | Fixed-Point Designer | — |
if | MATLAB | Do not use the HDL Coder
does not support nonscalar expressions in the conditions of |
imag | MATLAB | — |
imag | Fixed-Point Designer | — |
int8 , int16 , int32 | Fixed-Point Designer | — |
iscolumn | Fixed-Point Designer | — |
isempty | Fixed-Point Designer | — |
isequal | Fixed-Point Designer | — |
isfi | Fixed-Point Designer | — |
isfimath | Fixed-Point Designer | — |
isfimathlocal | Fixed-Point Designer | — |
isfinite | Fixed-Point Designer | — |
isinf | Fixed-Point Designer | — |
isnan | Fixed-Point Designer | — |
isnumeric | Fixed-Point Designer | — |
isnumerictype | Fixed-Point Designer | — |
isreal | Fixed-Point Designer | — |
isrow | Fixed-Point Designer | — |
isscalar | Fixed-Point Designer | — |
issigned | Fixed-Point Designer | — |
isvector | Fixed-Point Designer | — |
le | MATLAB | — |
le | Fixed-Point Designer | — |
length | Fixed-Point Designer | — |
logical | Fixed-Point Designer | — |
lowerbound | Fixed-Point Designer | — |
lsb | Fixed-Point Designer | — |
lt | MATLAB | — |
lt | Fixed-Point Designer | — |
max | Fixed-Point Designer | — |
min | Fixed-Point Designer | — |
minus | Fixed-Point Designer | — |
mpower | MATLAB | Both inputs must be scalar, and the exponent input, |
mpower | Fixed-Point Designer | Both inputs must be scalar, and the exponent input, |
mtimes(A,B) | MATLAB | — |
mtimes | Fixed-Point Designer | — |
ndims | Fixed-Point Designer | — |
ne | MATLAB | — |
ne | Fixed-Point Designer | — |
nearest | Fixed-Point Designer | — |
not | MATLAB | — |
numberofelements | Fixed-Point Designer | — |
numerictype | Fixed-Point Designer | — |
ones | MATLAB | Dimensions must be real, nonnegative integers. |
or | MATLAB | — |
plus | MATLAB | Inputs cannot be data type logical . |
plus | Fixed-Point Designer | Inputs cannot be data type logical . |
power | MATLAB | Both inputs must be scalar, and the exponent input, |
power | Fixed-Point Designer | Both inputs must be scalar, and the exponent input, |
range | Fixed-Point Designer | — |
real | MATLAB | — |
real | Fixed-Point Designer | — |
realmax | Fixed-Point Designer | — |
realmin | Fixed-Point Designer | — |
reinterpretcast | Fixed-Point Designer | — |
repmat | Fixed-Point Designer | — |
rescale | Fixed-Point Designer | — |
reshape | Fixed-Point Designer | — |
round | Fixed-Point Designer | — |
sfi | Fixed-Point Designer | — |
sign | Fixed-Point Designer | — |
size | Fixed-Point Designer | — |
sqrt | Fixed-Point Designer | — |
sub | Fixed-Point Designer | — |
subsasgn | Fixed-Point Designer | Supported data types for HDL code generation are listed in Supported Data Types. |
subsref | Fixed-Point Designer | Supported data types for HDL code generation are listed in Supported Data Types. |
sum | Fixed-Point Designer | — |
switch | MATLAB | The conditional expression in a
If multiple |
times | MATLAB | Inputs cannot be data type logical . |
times | Fixed-Point Designer | Inputs cannot be data type logical . |
transpose | MATLAB | — |
transpose | Fixed-Point Designer | — |
ufi | Fixed-Point Designer | — |
uint8 , uint16 , uint32 | Fixed-Point Designer | — |
uminus | Fixed-Point Designer | — |
uplus | Fixed-Point Designer | Inputs cannot be data type logical . |
upperbound | Fixed-Point Designer | — |
vertcat | Fixed-Point Designer | — |
xor | MATLAB | — |
zeros | MATLAB | Dimensions must be real, nonnegative integers. |