MATLAB >> problem in running simulating modelsim with simulink

by srinivas » Tue, 20 Feb 2007 00:47:57 GMT

I am trying to simulate vhdl code in simulink with the help of
Modelsim, that is made possible by using cosimulation block. I having
two problems.

- I have invoked modelsim from matlab using command
vsim('socketsimulink', 4449)

And then i used 'vsimulink' command to simulate that vhdl code. Iam
sending a sampled signal the cosimulation block. When i started to
run the simulation from simulaink, i am finding the following error.
Here iam using internal clock that is fixed at 10 ns period that we
cannot change. the error iam getting is

"Explicit Simulink clocks require a minimum model step time of at
least 2".

The another problem (this is different from above) iam finding is
iam unable to run the simulation continuously means it is just
simulating the first sample and not simulating for the rest of
samples when iam trying to give external clock to cosimulation block.

Similar Threads

1. problem in running modelsim with simulink - MATLAB

2. Matlab core dump when I run link for modelsim in R14

Hi,
   When I run matlab link for modelsim, I found that Matlab will dump
but modelsim still running. Does anybody have this experience and how
to si=olve it? I use LINUX 2.4.9. Your response is greatly
appreciated.

Thanks

3. Simulink and ModelSim automation - MATLAB

4. simulink modelsim cosimulation


Hi..

	i tried to establish link between simulink and modelsim, but i couldn... i tried all the options

	Softwares which i used are,

		1. modelsim 5.7g
		2. MATLAB 7.0.4


	A. if i configure the link in tcp/ip mode 

		0. first of all i get confused with this tcp/ip mode of communication. ie. at each time i get different port value.. i don know whether 
			this as wrong or right, in some places i found like matlab has one port value but modelsim hav different port vaule.. they hav shown like this
			in diagram itself. 

		1. if i invoke modelsim from matlab as vsim('socketsimulink', 1034), modelsim get opened, i created library and compiled the code, 
			to simulate the code i issued the command vsimulink work.inverter ... but no use i got the following warning and error messages


			--------------------------------------------------------------------------------------------
			# vsim -foreign {simlinkserver C:/Program Files/MATLAB704/toolbox/modelsim/win32/simulinklink.dll ; -socket 1034} work.inverter 
			# Loading C:/MODELTECH_5.7G/WIN32/../std.standard
			# Loading C:/MODELTECH_5.7G/WIN32/../ieee.std_logic_1164(body)
			# Loading work.inverter(behavioral)
			# ** Warning: (vsim-FLI-3162) Ignoring extra files in foreign attribute "simlinkserver C:/Program Files/MATLAB7043/toolbox/modelsim/win32/simulinklink.dll ; -socket 1034".
			# Loading C:/Program
			# ** Error: (vsim-3193) Load of "C:/Program" failed: File not found.
			# ** Error: (vsim-FLI-3160) Failed to load FLI object file "C:/Program".
			--------------------------------------------------------------------------------------------

		2. if i run the matlab model it shows the error like

			--------------------------------------------------------------------------------------------
			Error in 'ml_ms/VHDL Cosimulation': Initialization commands cannot be evaluated.  MATLAB error message: Error using ==> set_param
			Error reported by S-function 'smtifli' in 'ml_ms/VHDL Cosimulation':
			Socket connection was closed by the other side
			The communications link to ModelSim failed.
			Launch Modelsim using the MATLAB command: 'vsim'.
			Make sure the connection settings in the block are valid.
			Load the desired VHDL model using the vsimulink command in ModelSim.
			--------------------------------------------------------------------------------------------

	B. I tried in shared memory mode too.. 

		1. i got the same loading error in modelsim, 

		2. but in matlab model i got error like 

			--------------------------------------------------------------------------------------------
			Error in 'ml_ms/VHDL Cosimulation': Initialization commands cannot be evaluated.  MATLAB error message: Error using ==> set_param
			Error reported by S-function 'smtifli' in 'ml_ms/VHDL Cosimulation':
			Failed to connect to server.  Make sure the loaded ModelSim model is using shared memory.
			--------------------------------------------------------------------------------------------

			but i don know how to configure the modelsim to work using shared memory..

		
	but for the message.. i used modelsim as a cracked version jus pasting licence.dat, mgs, dll file in modelsim\win32 folder.. i don know whether this link
	work with cracked version...

	how to solve this problem....?



Thanks in advance
Mubu

5. Simulink & Link for ModelSim - MATLAB

6. Simulink Link to ModelSim HELP!

Hi,
I am trying to co-simulate with simulink and modelsim. I followed all
the steps in the tutorial but it doesn't work well.

My hdl code is in verilog, does the Link to Modelsim support Verilog
or just vhdl?

For some reason, the simulink gives me an error saying the port names
don't exist in my modelsim hdl code.

For example, in verilog, I have a module top_1 with a pin "input".

Then in the simulink modelsim block, i put /top_1/input. Did I do
something wrong? Why the simulink keep saying the port name doesnt
exist? Please help. I have spent the whole night trying to solve this
single problem!

Thanks in advance!
Jeff

7. Unable to link simulink to modelsim - MATLAB

8. multiple modelsim-cosimulations handshaking in simulink

Hello everyone,

I'm using up to four modelsim links in a simulink design (one *.mdl file) and they are all properly connected through different sockets. The componets are built in a cain scheme, each componet has a source and a sink. The simulation works fine, but not in detail. There are handshaking signals between the different componets and there ist the problem.

The acknowledge signal takes time to get to its destination component (back in the cain), which should not be. If I use the componets in a toplevel hdl file, there isn't this behavior. But I want to do this multiple component co-simulation to compare the results after each step with the expected results. How can I reduce this "propagation time" or do I have to ajust the sample times in the design? Or anything else...? :)

Thanks for your help,
Andreas