+ Post New Thread

Results 1 to 8 of 8

- 31st October 2011, 16:50 #1
## Matlab and Modelsim Cosimulation

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.

regards,

S. Yassin

- 31st October 2011, 16:50

- 31st October 2011, 20:01 #2

- Join Date
- Jun 2010
- Posts
- 5,766
- Helped
- 1679 / 1679
- Points
- 31,325
- Level
- 43

## Re: Matlab and Modelsim Cosimulation

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.

- 31st October 2011, 20:01

- 1st November 2011, 09:01 #3
## Re: Matlab and Modelsim Cosimulation

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

Code:ModelSim>vsimulink work.inverter

Thanks

1 members found this post helpful.

- 1st November 2011, 09:01

- 1st November 2011, 09:25 #4

- Join Date
- Jun 2010
- Posts
- 5,766
- Helped
- 1679 / 1679
- Points
- 31,325
- Level
- 43

## Re: Matlab and Modelsim Cosimulation

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

- 1st November 2011, 11:16 #5
## Re: Matlab and Modelsim Cosimulation

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.

- 1st November 2011, 11:24 #6

- Join Date
- Jun 2010
- Posts
- 5,766
- Helped
- 1679 / 1679
- Points
- 31,325
- Level
- 43

## Re: Matlab and Modelsim Cosimulation

I have used 2011a with Modelsim 10.0b and 6.6c without any problems.

1 members found this post helpful.

- 1st November 2011, 15:20 #7
## Re: Matlab and Modelsim Cosimulation

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) {.....}

thanks

- 16th September 2014, 10:07 #8

- Join Date
- Sep 2014
- Posts
- 1
- Helped
- 0 / 0
- Points
- 13
- Level
- 1

## Re: Matlab and Modelsim Cosimulation

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"

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

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

regards,

Zou. Lil

+ Post New Thread

Please login