Unrecognized function or variable 'vsim'.

i am getting this error i am working with matlab 2020 a and i instaled modelsim student edition and 11.1 with license . can anyone help me ?

5 comentarios

Walter Roberson
Walter Roberson el 30 de Jul. de 2021
I notice that you mention "student" . If you are using a MATLAB Student license, then you do not have access to the HDL Verifier product that is needed to use vsim .
However, if you are using a MATLAB license provided by your university then that would probably be either a Campas Wide License (new name) or Total Academic Headcount (old name) license, and those licenses are potentially eligible to use HDL Verifier (if the university purchased rights for that.)
samira sorayaasa
samira sorayaasa el 30 de Jul. de 2021
i have the code verifier license.
Bharath Venkataraman
Bharath Venkataraman el 30 de Jul. de 2021
vsim ships with the HDL Verifier product.
Could you please send the output of ver in MATLAB so we can confirm you have HDL Verifier in your installation?
Please also send the output from running "which vsim" on the MATLAB command prompt.
samira sorayaasa
samira sorayaasa el 1 de Ag. de 2021
>> ver
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.8 (R2020a)
Simulink Version 10.1 (R2020a)
Aerospace Blockset Version 4.3 (R2020a)
Aerospace Toolbox Version 3.3 (R2020a)
Control System Toolbox Version 10.8 (R2020a)
Curve Fitting Toolbox Version 3.5.11 (R2020a)
DSP System Toolbox Version 9.10 (R2020a)
Data Acquisition Toolbox Version 4.1 (R2020a)
Deep Learning Toolbox Version 14.0 (R2020a)
Embedded Coder Version 7.4 (R2020a)
Fixed-Point Designer Version 7.0 (R2020a)
Fuzzy Logic Toolbox Version 2.7 (R2020a)
Global Optimization Toolbox Version 4.3 (R2020a)
HDL Coder Version 3.16 (R2020a)
HDL Verifier Version 6.1 (R2020a)
Image Processing Toolbox Version 11.1 (R2020a)
Instrument Control Toolbox Version 4.2 (R2020a)
MATLAB Coder Version 5.0 (R2020a)
Mapping Toolbox Version 4.10 (R2020a)
Optimization Toolbox Version 8.5 (R2020a)
Partial Differential Equation Toolbox Version 3.4 (R2020a)
Robust Control Toolbox Version 6.8 (R2020a)
Signal Processing Toolbox Version 8.4 (R2020a)
Simscape Version 4.8 (R2020a)
Simscape Driveline Version 3.1 (R2020a)
Simscape Electrical Version 7.3 (R2020a)
Simscape Fluids Version 3.0 (R2020a)
Simulink Coder Version 9.3 (R2020a)
Simulink Control Design Version 5.5 (R2020a)
Simulink Desktop Real-Time Version 5.10 (R2020a)
Simulink Real-Time Version 6.12 (R2020a)
Stateflow Version 10.2 (R2020a)
Statistics and Machine Learning Toolbox Version 11.7 (R2020a)
Symbolic Math Toolbox Version 8.5 (R2020a)
System Identification Toolbox Version 9.12 (R2020a)
>> vich vsim
Unrecognized function or variable 'vich'.
>> which vsim
'vsim' not found.
The Block/HDLImplementation pair: ('built-in/Reference', 'Module') is not registered in the implementation database.
Component:HDLCoder | Category:HDL error
Hello Samira, I use Matlab with Academic Lisence.
Seems Kiran Kintali answer is nonsense and isn't useful.
Could I ask you please, did you find the solution for this issue?

Iniciar sesión para comentar.

 Respuesta aceptada

Kiran Kintali
Kiran Kintali el 2 de Ag. de 2021

0 votos

Based on your snapshot of ver command above it looks like you do have access to HDL Verifier.
Try using one of the following commands in MATLAB (depending on whether you have Modelsim or Questasim installed on your machine)
>> !modelsim
or
>> !questasim
If you have modelsim or questasim and set them up correctly, they should open.
This is to test whether you have modelsim or questasim, installed correctly, and MATLAB is also seeing the tool.
we do not have your exact error message you were getting here. However, if MATLAB finds modelsim or questasim after doing the above test. The next issue might be because your system environment variables are set in such a way that by default other applications, like MATLAB, or if you run modelsim/questasim from Windows command window, will pick the student version of the modelsim/questasim. Those versions will not work for HDL Verifier cosimulation.
To make sure MATLAB (or any other application in your PC for that matter) to open the licensed version of your modelsim/questasim you must make sure you have set the correct license variable name with right path in your environment variables and make sure the 'Path' has the path to your licensed executable version.
This is expected setup
(Note: blocked out irrelevant paths in black in the snapshot above)
license variable above is MGLS_LICENSE_FIL (your license path might be a path to a license server, my own local license path as you see above). In 'Path' variable you might have path to executable of many applications.
Windows has a priority scheme in reading the ‘Path’ variable, meaning, if you have path to two versions of modelsim or questasim executables in your 'Path' variable definition, Windows will pick one of them.
Hope some of this helps.

Más respuestas (3)

Kiran Kintali
Kiran Kintali el 30 de Jul. de 2021
Editada: Kiran Kintali el 30 de Jul. de 2021
Possibly install issue. Do you have this file on your path?
>> help vsim
vsim Launch ModelSim for use with MATLAB and Simulink.
>> which vsim
<path_to_install_root>\matlab\toolbox\edalink\extensions\modelsim\modelsim\vsim.m

4 comentarios

samira sorayaasa
samira sorayaasa el 30 de Jul. de 2021
i dont know i should do this from matlab or from modelsim commands?
samira sorayaasa
samira sorayaasa el 30 de Jul. de 2021
# invalid command name "vsimmatlab"
this is the error when i want to link modelsim and matlab??
samira sorayaasa
samira sorayaasa el 30 de Jul. de 2021
i could not find the modsimrand.hdl and midsim_plot.m files ?how can i download them to do tutorial steps?
samira sorayaasa
samira sorayaasa el 1 de Ag. de 2021
neither help vsim nor which vsim
>> which vsim
'vsim' not found.

Iniciar sesión para comentar.

Kiran Kintali
Kiran Kintali el 1 de Ag. de 2021

0 votos

please reach out to support for this install question.
samira sorayaasa
samira sorayaasa el 4 de Ag. de 2021

0 votos

i belive the problem is (install package compiler)
https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler

Productos

Versión

R2020a

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by