Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Matlab and Modelsim Cosimulation

Status
Not open for further replies.

sameh_yassin99

Member level 3
Joined
Feb 7, 2010
Messages
60
Helped
13
Reputation
26
Reaction score
8
Trophy points
1,288
Location
Egypt
Activity points
1,741
Hello everyone,
I need to run the following Mathworks tutorial.
Simulink and ModelSim Tutorial :: Linking Simulink to ModelSim (Link for ModelSim)
The tutorial is simple. It simulates an inverter written in vhdl and compiled by modelsim, and the test patterns are generated using simulink.

Most of the tutorial is easy except the part of making "socket" connection between matlab and simulink.
I have the following error
HDL Cosimulation Block Error
Error reported by S-function 'shdlcosim' in 'DFE_Channel/HDL Cosimulation/S-Function':
Handshaking with the server failed - Server was NOT an 'HDL Link' server, change the port.

Please, I need to know how to solve this error if anyone faced it before.

regards,
S. Yassin
 

first of all, you need at least the PE version of modelsim.

Secondly, you have to start the simulation using the vsimulink command in modesim, instead of vsim.
 

Hello,

I solved the problem. I had the error because I didn't start the Modelsim simulation in the right way. I selected the following menu:
simulation-> start simulation
instead I used exactly what is written in the matlab help
Code:
 ModelSim>vsimulink work.inverter

Thats all. By the way I'm using modelsim SE 6.3c and Matlab 2011a.

Thanks
 
thats is a very old version of modelsim. You can get updates for free.
 

Hello TrickyDicky,
I'm using ModelSim 10.0c usually. However, I had an error stating that I should use one of ModeSim versions 6.3 or 6.4 or 6.5 only.
 

Hello,

I will try to use ModelSim 10.0 again. When I used Modelsim 10.0c it was the free student version. The error was something talking about "case statement" inside one m-file simulink.
I entered the m-file and I found something like
Code:
case(6.3) 
{....}
case(6.4) 
{.....}
case (6.5)
{.....}
Therefore I used the older Modelsim and now it is working fine :)

thanks
 

Hello everyone,

I need to run the same tutorial of inverter but I could not solve it because the "vsimulink" command is invalid.
I have the following error
# invalid command name "vsimulink"
In other side, "vsim" command is valid but I hadn't obtained a result and the following message of error will be appeared:
Error reported by S-function 'shdlcosim' in 'inverter/inverter/S-Function':
Handshaking with the server failed - Server was NOT an 'HDL Link' server, change the port
By the way I'm using modelsim PE Student Edition 10.3c and Matlab 2013a.
Please, I need to know how to solve this error if you faced it before.

regards,
Zou. Lil

Hello everyone,
I need to run the following Mathworks tutorial.
Simulink and ModelSim Tutorial :: Linking Simulink to ModelSim (Link for ModelSim)
The tutorial is simple. It simulates an inverter written in vhdl and compiled by modelsim, and the test patterns are generated using simulink.

Most of the tutorial is easy except the part of making "socket" connection between matlab and simulink.
I have the following error


Please, I need to know how to solve this error if anyone faced it before.

regards,
S. Yassin
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top