Error running simulink with QuestaSim. Failed to connect to server. Make sure loaded HDL simulator library is using shared memory.

20 views (last 30 days)
I am trying to get the example FPGA-Based Beamforming in Simulink: Code Generation to simulate. I have Matlab version R2023a. Quartus Prime Pro 22.4 and QuestaIntel FPGA Edition 2022.1. I believe all these version should be compatible with eachother. I can open QuestaSim from Simulink and the log output has zero errors. Once I click run I get "Error reported by S-function 'shdlcosim' in 'gm_SimulinkBeamformingHDLWorkflowExample_mq/HDL Algorithm_mq/S-Function': Failed to connect to server. Make sure the loaded HDL simulator library is using shared memory" in simulink.
In QuestaSim the output log shows: "Error: (vsim-3193) Load of "C:/Program Files/MATLAB/R2023a/toolbox/edalink/extensions/modelsim/windows32/liblfmhdls_gcc421vc12.dll" failed: Bad DLL format."
What do I need to change?

Answers (2)

Marc Erickson
Marc Erickson on 6 Dec 2023
HDL Verifier cannot support the Intel FPGA Edition of ModelSim since that version of the simulator does not support PLI applications (i.e. use of the VPI/VHPI/FLI APIs). Our supported simulators are listed in our documentation.
Let me know if you have any further questions.

Kiran Kintali
Kiran Kintali on 6 Dec 2023
It looks like you are generating cosimulation model from HDL Coder.
The issues seems related to either installation of the HDL Simulator install or HDL Verifier.
Can you confirm if you are able to generate stand-alone test bench with HDL Coder and verify with Modelsim/Questasim? This would help isolate the problem.
  2 Comments
Nicole Dulieu
Nicole Dulieu on 6 Dec 2023
Thank you for your response. I tried this example https://www.mathworks.com/help/hdlcoder/gs/verify-and-simulate-generated-hdl-code-from-simulink-model.html and I ran the questa commands and I got the correct waveform output. I was able to generate the hdl files correctly so I don't think its an issue with my HDL Coder toolbox. I installed matlab R2023a with all the toolboxes at once.

Sign in to comment.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!