Borrar filtros
Borrar filtros

Trying simple tutorial for EDA Link between Simulink and Modelsim for MATLAB R2010a

6 visualizaciones (últimos 30 días)
When I get to the part of tutorial, "Loading Instances of the VHDL Entity for Cosimulation with Simulink" BUT the command
"vsimulink work.inverter" does not work. Modelsim says 'vsimulink' is an invalid command.
I can't really get passed that and its very frustrating.
  4 comentarios
Edward
Edward el 19 de Oct. de 2011
Is there a more basic simulation I should start with?
Edward
Edward el 20 de Oct. de 2011
Whenever I try typing the vsim commands in the MATLAB windows per the tutorial's directions I also get errors:
>> vsim('tclstart','vsimulink work.parse','socketsimulink','4449')
??? SWITCH expression must be a scalar or string constant.
Error in ==> hdlsim>l_GetModelSimLibInfo at 549
switch (lfmVer)
Error in ==> hdlsim at 113
case 'ModelSim', libInfo = l_GetModelSimLibInfo;
Error in ==> vsim at 101
hdlsim(pvpairs{:});
>> vsim('tclstart', 'vsimulink work.parse')
??? SWITCH expression must be a scalar or string constant.
Error in ==> hdlsim>l_GetModelSimLibInfo at 549
switch (lfmVer)
Error in ==> hdlsim at 113
case 'ModelSim', libInfo = l_GetModelSimLibInfo;
Error in ==> vsim at 101
hdlsim(pvpairs{:});

Iniciar sesión para comentar.

Respuestas (2)

Kaustubha Govind
Kaustubha Govind el 20 de Oct. de 2011
I think the issue may be that Modelsim is not on the system path, and MATLAB can't find it. For example, try the following from MATLAB:
>> !vsim -version
If this doesn't work, make sure that vsim.exe on the system path and restart MATLAB.
  3 comentarios
Edward
Edward el 7 de Nov. de 2011
What is the distinction between typing "vsim" in MATLAB vs. typing "!vsim" ?
What does the ! do? From my messages, it looks like it is working with ! but not without....why would that be?
Here is the two responses I get from MATLAB:
>> !vsim -version
Model Technology ModelSim PE vsim 10.0 Simulator 2010.12 Dec 4 2010
>> vsim
??? SWITCH expression must be a scalar or string constant.
Error in ==> hdlsim>l_GetModelSimLibInfo at 549
switch (lfmVer)
Error in ==> hdlsim at 113
case 'ModelSim', libInfo = l_GetModelSimLibInfo;
Error in ==> vsim at 101
hdlsim(pvpairs{:});
Kaustubha Govind
Kaustubha Govind el 8 de Nov. de 2011
"vsim" executes the vsim.m file that is part of the EDA Simulator Link product (type "which vsim" to see the full path to the file), whereas "!vsim" redirects the command to the system shell. So it is equivalent to opening a system command window and running "vsim".
It looks like vsim.exe is on your system path, but MATLAB has trouble parsing the command. It could be that ModelSim 10.0 is not supported with the version of MATLAB you have installed. Open your help window (type "doc") and navigate to EDA Simulator Link->Getting Started->Product Requirements->Supported EDA Tools to see the list of supported tools for your version.
Also, please consider contacting Tech Support if this doesn't help.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 7 de Nov. de 2011
Put a breakpoint in at hdlsim>l_GetModelSimLibInfo at 549 and examine lfmVer and see whether it is indeed a scalar or a string constant. If we knew the value that lfmVer had at that point, we might be able to get further.
Also, please look at the lines immediately after that and tell us what data type the switch() code is expecting to receive.
  1 comentario
Edward
Edward el 8 de Nov. de 2011
Wow... This helped me a great deal. When I trace the generation of this message I find the following code:
switch (lfmVer)
% when using the tmwgcc libs, we do NOT want to let MTI prepend to
% LD_LIBRARY_PATH.
case {'6.3', '6.4', '6.5'}
libInfo.letMtiPrependLdPath = false;
This seems to be telling me that MATLAB is expecting a version of Modelsim of 6.3, 6.4, or 6.5. But for whatever reason, Modelsim jumped up to 10.0 in its later releases and that is what I'm using.
I will try using an older version of Modelsim and see what happens.
Thanks.

Iniciar sesión para comentar.

Categorías

Más información sobre RF Blockset Models for Transceivers en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by