MATLAB: Calling/Conversion of image processing in M-file to Simulink

image processing m-file to simulinksimulink

Dear all expert,
For information, I purchased a Spartan6 LX9 FPGA Microboard and I found out that the 'system generator' software that come along with my product allow me to program the microboard with Simulink.
However, i can't convert or call the M-file that i wrote, into the simulink. So, i wish to ask how to convert the M-file to Simulink? Or, any other method to program my microboard with the existing M-file coding? Attachment of the tutorials with steps will be kindly appreciated. Thanks

Best Answer

As far as I know, the System Generator software can generate HDL code only from the Simulink blocks in their custom library. I'm sure you can find examples in their documentation, but since it is a product from Xilinx (and not MathWorks), you should find more information on the Xilinx support website.
However, if you have the Simulink HDL Coder product, you can bring your MATLAB code into Simulink using the (Embedded) MATLAB Function block and then generate code from it. Note however that you can only use functions that are supported for code generation.
Related Question