| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → EDA Simulator Link |
| Contents | Index |
| Learn more about EDA Link Simulator |
EDA Simulator Link software provides a guided set-up script (syscheckmq) for configuring the MATLAB and Simulink connections to your simulator. This script works whether you have installed the link software and MATLAB on the same machine as the HDL simulator or installed them on different machines.
The setup script creates a configuration file containing the location of the appropriate EDA Simulator Link MATLAB and Simulink libraries. You can then include this configuration with any other calls you make using the command vsim from the HDL simulator. You only need to run this script once.
Note The EDA Simulator Link configuration and diagnostic script works only on UNIX and Linux. Windows users: please see instructions below. |
Refer to Using the EDA Simulator Link Libraries for the correct link application library for your platform. Then see Starting the HDL Simulator from MATLAB.
For assistance in performing cross-network cosimulation, see Performing Cross-Network Cosimulation.
After you have created your configuration files, see Starting the ModelSim Software from a Shell.
syscheckmq provides an easy way to configure your simulator setup to work with the EDA Simulator Link software.
The following is an example of running syscheckmq under the following conditions:
You have installed EDA Simulator Link on a Linux 64 machine.
You have moved the EDA Simulator Link libraries to a different location than where you first installed them (either to another directory or to another machine).
You want to test the TCP/IP connection.
Start syscheckmq:
% syscheckmq ******************************************************************************** Kernel name: Linux Kernel release: 2.6.22.8-mw017 Machine: x86_64 ********************************************************************************
The script first returns the location of the HDL simulator installation (vsim.exe). If it does not find an installation, you receive an error message. Either provide the path to the installation or quit the script and install the HDL simulator. You are then prompted to accept this installation or provide a path to another one, after which you receive a message confirming the HDL simulator installation:
Found /hub/share/apps/HDLTools/ModelSim/modelsim-6.4a-tmw-000/modeltech/bin/vsim
on the path.
Press Enter to use the path we found or enter another one:
********************************************************************************
/hub/share/apps/HDLTools/ModelSim/modelsim-6.4a-tmw-000/modeltech/bin/vsim -version
Model Technology ModelSim SE-64 vsim 6.4a Simulator 2008.08 Aug 28 2008
ModelSim mode: 32 bits
********************************************************************************
Next, the script needs to know where it can find the EDA Simulator Link libraries.
Select method to search for EDA Simulator Link libraries: 1. Use libraries in a MATLAB installation. 2. Prompt me to specify the direct path to the libraries. 2 Enter the path to liblfmhdlc_tmwgcc.so and liblfmhdls_tmwgcc.so: /tmp/extensions/modelsim/linux64 Found /tmp/extensions/modelsim/linux64/liblfmhdlc_tmwgcc.so and /tmp/extensions/modelsim/linux64/liblfmhdls_tmwgcc.so.
The script then runs a dependency checker to check for supporting libraries. If any of the libraries cannot be found, you probably need to append your environment path to find them.
********************************************************************************
Running dependency checker "ldd /tmp/extensions/modelsim/linux64/liblfmhdlc_tmwgcc.so".
Dependency checker passed.
Dependency status:
librt.so.1 => /lib/librt.so.1 (0x00002acfe566e000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002acfe5778000)
libm.so.6 => /lib/libm.so.6 (0x00002acfe5976000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002acfe5af8000)
libc.so.6 => /lib/libc.so.6 (0x00002acfe5c6000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
********************************************************************************
This next step loads the EDA Simulator Link libraries and compiles a test module to verify the libraries loaded correctly.
Press Enter to load EDA Simulator Link or enter 'n' to skip this test:
Reading /mathworks/hub/share/apps/HDLTools/ModelSim/modelsim-6.4a-tmw-000/se/modeltech/
linux_x86_64/../modelsim.ini "worklfx9019" maps to directory worklfx9019.
(Default mapping)
Model Technology ModelSim SE-64 vlog 6.4a Compiler 2008.08 Aug 28 2008
-- Compiling module d9019
Top level modules:
d9019
********************************************************************************
Reading /mathworks/hub/share/apps/HDLTools/ModelSim/modelsim-6.4a-tmw-000/se/modeltech/tcl
/vsim/pref.tcl
# 6.4a
# vsim -do exit -foreign {matlabclient /tmp/lfmconfig/linux64/liblfmhdlc_tmwgcc.so}
-noautoldlibpath -c worklfx9019.d9019
# // ModelSim SE-64 6.4a Aug 28 Linux 2.6.22.8-mw017
.
.
.
# Loading work.d9019
# Loading /tmp/lfmconfig/linux64/liblfmhdlc_tmwgcc.so
# exit
********************************************************************************
EDA Simulator Link libraries loaded successfully.
********************************************************************************
Next, the script checks a TCP connection. If you choose to skip this step, the configuration file specifies use of shared memory. Both shared memory and socket configurations are in the configuration file; depending on your choice, one configuration or the other is commented out.
Press Enter to check for TCP connection or enter 'n' to skip this test: Enter an available port [5001] Enter remote host [localhost] Press Enter to continue ttcp_glnx -t -p5001 localhost Connection successful
Lastly, the script creates the configuration file, unless for some reason you choose not to do so at this time.
******************************************************************************** Press Enter to Create Configuration files or 'n' to skip this step: ******************************************************************************** Created template files simulink9675.arg and matlab8675.arg. Inspect and modify if necessary. ******************************************************************************** Diagnosis Completed
The template file names, in this example simulink24255.arg and matlab24255.arg, have different names each time you run this script.
After the script is complete, you can leave the configuration files where they are or move them to wherever it is convenient.
syscheckmq does not run on Windows. However, you can use the configuration script on Windows by following these instructions:
Create a MATLAB configuration file. You may name it whatever you like; there are no file-naming restrictions. Enter the following text:
//Command file forEDA Simulator Link MATLAB library
//for use with Mentor Graphics ModelSim.
//Loading of foreign Library, usage example: vsim -f matlab14455.arg entity.
//You can manually change the following line to point to the correct library.
//The default location of the 32-bit Windows library is at
//MATLABROOT/toolbox/edalink/extensions/modelsim/windows32/liblfmhdlc_tmwvs.dll.
-foreign "matlabclient c:/path/liblfmhdlc_tmwvs.dll"where path is the path to the particular EDA Simulator Link shared library you want to invoke (in this example. See Using the EDA Simulator Link Libraries).
For more information on the -foreign option, refer to the ModelSim documentation.
The comments in the above text are optional.
Create a Simulink configuration file and name it. There are no file-naming restrictions. Enter the following text:
//Command file for EDA Simulator Link Simulink library //for use with Mentor Graphics ModelSim. //Loading of foreign Library, usage example: vsim -f simulink14455.arg entity. //You can manually change the following line to point to the correct library. //For example the default location of the 32-bit Windows library is at //MATLABROOT/toolbox/edalink/extensions/modelsim/windows32/liblfmhdls_tmwvs.dll. //For socket connection uncomment and modify the following line: -foreign "simlinkserver c:/path/liblfmhdls_tmwvs.dll ; -socket 5001" //For shared connection uncomment and modify the following line: //-foreign "simlinkserver c:/path/liblfmhdls_tmwvs.dll"
Where path is the path to the particular EDA Simulator Link shared library you want to invoke. See Using the EDA Simulator Link Libraries.
Note If you are going to use a TCP/IP socket connection, first confirm that you have an available port to put in this configuration file. Then, comment out whichever type of communication you will not be using. |
The comments in the above text are optional.
After you have finished creating the configuration files, you can leave the files where they are or move them to another location that is convenient.
![]() | Adding ADMS Support | Performing Cross-Network Cosimulation | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |