MATLAB: Does Simulink HDL coder support MEX block

HDL Codermex file

Hallo Everyone
I am looking for a list of blocks supported by the Simulink HDL coder, does the HDL coder support blocks generated by the MEX files?
What is the way to generate a Simulink block from an MEX file? do i need to use the Level-1 S function block for that?

Best Answer

No, HDL Coder does not support MEX blocks. For custom code you can use the MATLAB Function or MATLAB System blocks. Please note that there are documented restrictions on the MATLAB functions that may be called from custom code.