How do I setup Link for ModelSim to work off a network installation of ModelSim?

3 views (last 30 days)
When I run SETUPMODELSIM, I get the following error messages:
???Error using setupmodelsim
Could not open file for writing: $MODELSIM/../tcl/vsim/tclIndex.
where ($MODELSIM) is the location of ModelSim binaries.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
SETUPMODELSIM is strictly a convenience and is not required to use Link for ModelSim. The basic requirement is to start ModelSim by using the VSIM command in MATLAB. SETUPMODELSIM alters the ModelSim installation, so you must have write permission to the ModelSim installation files to use SETUPMODELSIM.
Details:
ModelSim must be configured to work with Link for ModelSim. For example, the Link for ModelSim commands MATLABTB, MATLABTBEVAL, etc., must be registered with ModelSim. If ModelSim is not configured, you will not have access to these commands.
This configuration can be performed in two ways.
1) When you start ModelSim from within MATLAB using the VSIM command, the VSIM command configures that invocation of ModelSim.
2) Running SETUPMODELSIM alters the ModelSim installation so that every invocation of ModelSim will be configured regardless of how you start ModelSim. You no longer have to use MATLAB VSIM to configure ModelSim. If you do use MATLAB VSIM to start ModelSim, the parameters you specify with VSIM override the default configuration created by SETUPMODELSIM.
If MATLAB and ModelSim are not installed on the same system, use the following steps to configure ModelSim:
1. Identify a valid and available socket port on the system that is running ModelSim.
2. Execute the VSIM command in MATLAB with the 'startupfile' option to generate a DO file for ModelSim and the 'StartGUI' option set to 'no', e.g.:
vsim('startupfile','filename.do','StartGUI','no','socketsimulink','tcp_spec');
where 'tcp_spec' specifies a socket port, a TCP/IP socket port number, or service name identified in step 1. For more information about the VSIM command, type
doc vsim
at the MATLAB command prompt.
3. Start ModelSim with the generated DO file by using the VSIM command at the operating system command prompt:
vsim -do filename.do
4. Now call VSIMULINK from ModelSim. Note that this will generate an error because MATLAB and ModelSim are not installed on the same system:
# Loading D:/Applications/MATLABR14SP2/toolbox/modelsim/win32/simulinklink.dll
# ** Error: (vsim-3193) Load of "D:/Applications/MATLABR14SP2/toolbox/modelsim/win32/simulinklink.dll" failed: File not found.
# ** Error: (vsim-FLI-3160) Failed to load FLI object file "D:/Applications/MATLABR14SP2/toolbox/modelsim/win32/simulinklink.dll".
You must copy the simulinklink.dll file from the host computer to the computer where ModelSim is installed and recreate the same directory tree or change the DO file manually.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!