regarding problem while generating vhdl code from simulink

16 views (last 30 days)
Hello,
I have generated simulink blocks from verilog files by using "cosimWizard". Now after connection I am trying to generate vhdl/verilog code via hdl coder. But while simulating I get follwing error
HDL Cosimulation Block Error
Error reported by S-function 'shdlcosim' in 'PingPong/PingPong/VGA_Controller/S-Function':
Failed to connect to server. Make sure the loaded HDL simulator library is using shared memory
Error reported by S-function 'shdlcosim' in 'PingPong/PingPong/VGA_Controller/S-Function':
Failed to connect to server. Make sure the loaded HDL simulator library is using shared memory
and while using fixed point solver I get
Error reported by S-function 'shdlcosim' in ' PingPong/PingPong/VGA_Controller/S-Function ':
Handshaking with the server failed - Server was NOT an 'HDL Link' server, change the port
also while generating code from hdl coder I get
Error reported by S-function 'shdlcosim' in 'PingPong/PingPong/VGA_Controller/S-Function': Failed to connect to server. Make sure the loaded HDL simulator library is using shared memory
I am using shared memory option in for the connection
Please let me know what can I do to solve it.
thanks in advance

Accepted Answer

Tim McBrayer
Tim McBrayer on 8 Apr 2016
You cannot generate code from a Cosimulation block. The purpose of this block is to take existing HDL code and simulate it with the rest of you Simulink model. You have the HDL code, sitting on disk; there is no need to generate anything. If you are trying to incorporate it into a larger design, you will need to make sure that ModelSim is loaded with the compiled code, is up and running, and is the only instance of ModelSim running. Otherwise, Simulink may not be able to communicate with your instance.
For more information, please see the HDL Verifier and HDL Coder documentation.
  1 Comment
Mohammed Shameem Hussain
Mohammed Shameem Hussain on 9 Apr 2016
My objective is to use hdl coder for standalone fpga programming (rapid prototyping with matlab). But I have some code in Verilog and some in matlab Simulink. Please suggest how can I combine both and do direct flashing from matlab (standalone)

Sign in to comment.

More Answers (0)

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!