Forum Discussion
Altera_Forum
Honored Contributor
18 years agoHelp! Implenting a Cmex S-functions into your FPGA
Hello all I was wondering if any one has managed to get Signal compiler in simulink to actually compile and convert your S-function to VHDl. I have completely hit a dead end and cant find ...
Altera_Forum
Honored Contributor
18 years agoFirstly you don't mention it, but I assume you're talking about DSP Builder. Secondly it isn't possible to convert your s-function to VHDL since that would require a C to HDL tool with specific knowledge of simulink/matlab.
On the other hand you can create a "blackbox" subsystem containing your s-function and tell DSP Builder to use your own HDL file when it tries to generate the system. To do this you create a subsystem with HDL Input blocks directly connected to the inputs of the subsystem and HDL Output blocks connected to the outputs. You then create an HDL Entity block which will point to HDL File. You need to name HDL Input and Output blocks according to the port names in your HDL entity. Then when you simulate, it will use your s-function but compilation will use your VHDL file.