Unrecognized function or variable 'vsim'.
4 views (last 30 days)
Show older comments
samira sorayaasa
on 30 Jul 2021
Commented: Mahdi Naghshvarianjahromi
on 24 Jun 2022
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 Comments
Mahdi Naghshvarianjahromi
on 24 Jun 2022
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?
Accepted Answer
Kiran Kintali
on 2 Aug 2021
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.
0 Comments
More Answers (3)
Kiran Kintali
on 30 Jul 2021
Edited: Kiran Kintali
on 30 Jul 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 Comments
See Also
Categories
Find more on Hardware-in-the-Loop Simulation with Simulink Real-Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!