| EDA Simulator Link™ IN | ![]() |
| On this page… |
|---|
Installing Related Application Software |
For details on how to install the EDA Simulator Link™ IN software, see the MATLAB™ installation instructions.
Based on your configuration decisions and the software required for your EDA Simulator Link IN application, identify software you need to install and where you need to install it. For example, if you need to run multiple instances of the link MATLAB server on different machines, you need to install MATLAB and any applicable toolbox software on multiple systems. Each instance of MATLAB can run only one instance of the server.
For details on how to install the HDL simulator, see the installation instructions for that product. For information on installing MathWorks™ products, see the MATLAB installation instructions.
EDA Simulator Link IN software provides a guided set-up script (syscheckin) for configuring 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 set-up script creates a configuration file containing the location of the appropriate EDA Simulator Link IN MATLAB and Simulink libraries. You can then include this configuration with any other calls you make using Cadence Incisive or NC simulator ncsim from the HDL simulator. You only need to run this script once.
Note The EDA Simulator Link IN configuration and diagnostic script works only on UNIX and Linux. Windows users: please see instructions below. |
Refer to Using the EDA Simulator Link™ IN Libraries for the correct link application library for your platform. Then see Starting Cadence Incisive or NC simulator from MATLAB.
After you have created your configuration files, see .
sycheckin provides an easy way to configure your simulator setup to work with the EDA Simulator Link IN software.
The following is an example of running sycheckin on a Linux 64 machine with EDA Simulator Link IN libraries in a different location than where they were first installed and specifying a TCP/IP connection.
Start sycheckin:
% syscheckin ******************************************************************************** Kernel name: Linux Kernel release: 2.6.11.4-20a-smp Machine: x86_64 ********************************************************************************
The script first returns the location of the HDL simulator installation (ncsim.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 Cadence Incisive or NC 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/IUS/incisive-lfi-1/glnx/tools/bin/64bit/ncsim on the path. Press Enter to use the path we found or enter another one: ******************************************************************************** /hub/share/apps/HDLTools/IUS/incisive-lfi-1/glnx/tools/bin/64bit/ncsim -version TOOL: ncsim(64) 05.70-s008 Cadence Incisive mode: 64 bits ********************************************************************************
Next, the script needs to know if the EDA Simulator Link IN libraries are in the default directory (where they were first installed) or if you have moved them to another directory. If you have the HDL simulator and MATLAB on separate machines, move the link libraries to the Cadence Incisive or NC simulator machine.
Select method to search for EDA Simulator Link IN libraries: 1. Use libraries installed with EDA Simulator Link IN. 2. Prompt me to specify the direct path to the libraries. 2 Enter the path to liblfihdlc_gcc32.so and liblfihdls_gcc32.so: /tmp/lficonfig/linux64 Found /tmp/lficonfig/linux64/liblfihdlc_gcc32.so and /tmp/lficonfig/linux64/liblfihdls_gcc32.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/lficonfig/linux64/liblfihdlc_gcc32.so".
Dependency checker passed.
Dependency status:
librt.so.1 => /lib64/tls/librt.so.1 (0x00002aaaaac1c000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002aaaaad24000)
libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x00002aaaaae39000)
libm.so.6 => /lib64/tls/libm.so.6 (0x00002aaaab016000)
libgcc_s.so.1 => /devel/Ahdl/nightly/matlab/sys/os/glnxa64/libgcc_s.so.1 (0x00002aaaab16d000)
libc.so.6 => /lib64/tls/libc.so.6 (0x00002aaaab27a000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555555000)
********************************************************************************
This next step loads the EDA Simulator Link IN libraries and compiles a test module to verify the libraries loaded correctly.
Press Enter to load EDA Simulator Link IN or enter 'n' to skip this test: ncvlog(64): 05.70-s008: (c) Copyright 1995-2006 Cadence Design Systems, Inc. ncelab(64): 05.70-s008: (c) Copyright 1995-2006 Cadence Design Systems, Inc. ******************************************************************************** ncsim(64): 05.70-s008: (c) Copyright 1995-2006 Cadence Design Systems, Inc. ncsim> source ../hub/share/apps/HDLTools/IUS/incisive-lfi-1/glnx/tools/inca/files/ncsimrc ncsim> call nomatlabtb ncsim> exit ******************************************************************************** EDA Simulator Link IN 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 simulink24255.arg and matlab24255.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.
sycheckin does not run on Windows. To use the configuration script on Windows, create two files according to the following instructions:
Create a MATLAB configuration file and name it. There are no file-naming restrictions. Enter the following text:
//Command file for MATLAB EDA Simulator Link IN.
//Loading of foreign Library, usage example: ncsim -f matlab17032.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/incisive/Windows32/liblfihdlc_vs05.dll.
-loadcfc /path/liblfihdlc_vs05.dll:matlabclient
//TCL wrappers for MATLAB commands
-input @proc" "nomatlabtb" "{args}" "{call" "nomatlabtb" "\$args}
-input @proc" "matlabtb" "{args}" "{call" "matlabtb" "\$args}
-input @proc" "matlabcp" "{args}" "{call" "matlabcp" "\$args}
-input @proc" "matlabtbeval" "{args}" "{call" "matlabtbeval" "\$args}
where path is the path to the particular EDA Simulator Link IN shared library you want to invoke (in this example. See Using the EDA Simulator Link™ IN Libraries).
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 Simulink EDA Simulator Link IN. //Loading of foreign Library, usage example: ncsim -f simulink17032.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/incisive/linux32/liblfihdls_vs05.dll. //For socket connection uncomment and modify the following line: +socket=5001 -loadvpi /path/liblfihdls_vs05.dll:simlinkserver //For shared connection uncomment and modify the following line: //-loadvpi /path/liblfihdls_vs05.dll:simlinkserver
Where path is the path to the particular EDA Simulator Link IN shared library you want to invoke. See Using the EDA Simulator Link™ IN 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.
In general, you want to use the same compiler for all libraries linked into the same executable. The link software provides many versions of the same library compilers that are available with the HDL simulators (usually some version of GCC). Using the same libraries ensures compatibility with other C++ libraries that may get linked into the HDL simulator, including SystemC libraries.
If you have any of these conditions, choose the version of the EDA Simulator Link IN library that matches the compiler used for that code:
Link other third-party applications into your HDL simulator.
Compile and link in SystemC code as part of your design or testbench.
Write custom C/C++ applications and link them into your HDL simulator.
If you do not link any other code into your HDL simulator, you can use any version of the supplied libraries. A default library version is understood by the nclaunch MATLAB command.
Note EDA Simulator Link IN software supports running in 32-bit mode on a 64-bit Solaris machine, but it does not support running on a 32-bit Solaris platform. |
The EDA Simulator Link IN libraries are named according to the following format:
productdir/arch/lib{product_short_name}{client_server_tag}_{compiler_tag).{libext}
where
| productdir | incisive |
| arch | linux32, linux64, solaris32, solaris64, or windows32 |
| product_short_name | lfi |
| client_server_tag | c or s (MATLAB or Simulink) |
| compiler_tag | gcc32, gcc33, gcc40, gcc41, spro11, or vs05 |
| libext | dll or so |
Not all combinations are supported. See Default Libraries for valid combinations.
EDA Simulator Link IN scripts fully support the use of designated default libraries.
With the EDA Simulator Link IN software, the default library for each platform is the version compiled using the same compiler that The MathWorks uses to compile MATLAB and Simulink. The following table lists all the libraries shipped with the link software. The default libraries for each platform are in bold text.
| Platform | MATLAB Library | Simulink Library |
|---|---|---|
| Linux32, Linux64 | liblfihdlc_gcc41.so | liblfihdls_gcc41.so |
| Solaris32, Solaris64 | liblfihdlc_spro11.so | liblfihdls_spro11.so |
| Windows32 | liblfihdlc_vs05.dll | liblfihdls_vs05.dll |
You can use a different HDL-side library by specifying it explicitly using the libfile parameter to the nclaunch MATLAB command. You should choose the version of the library that matches the compiler and system libraries you are using for any other C/C++ libraries linked into the HDL simulator. Depending on the version of your HDL simulator, you may need to explicitly set additional paths in the LD_LIBRARY_PATH environment variable.
Depending on the version of your HDL simulator, you may need to explicitly set additional paths in the LD_LIBRARY_PATH environment variable. For example, if you want to use a nondefault library:
Copy the system libraries from the MATLAB installation (found in matlabroot/sys/os/platform) to the machine with the HDL simulator (where matlabroot is your MATLAB installation and platform is one of the above architecture, e.g., linux32).
Modify the LD_LIBRARY_PATH environment variable to add the path to the system libraries that were copied in step 1.
Example: EDA Simulator Link™ IN Alternate Library Using nclaunch. In this example, you are using the 32-bit Solaris version of IUS 5.83p2 on the same 64-bit Solaris machine which is running MATLAB. Because you have your own C++ application, and you are linking into ncsim which you used SunPro 11 to compile, you are using the EDA Simulator Link IN version compiled with SunPro 11, instead of using the default library version compiled with GCC 3.2.3.
In MATLAB:
>> currPath = getenv('PATH');
>> currLdPath = getenv('LD_LIBRARY_PATH');
>> setenv('PATH', ['/tools/IUS-583p2/bin:' currPath]);
>> nclaunch('tclstart', { 'exec ncvhdl inverter.vhd', ...
'exec ncelab -access +rwc inverter', ...
'hdlsimulink -gui inverter' }, ...
'libfile', 'liblfihdls_spro11');
The PATH is changed to ensure we get the correct version of the HDL simulator tools. Note that the nclaunch MATLAB command will automatically detect the use of the 32-bit version of the HDL simulator and use the solaris32 library directory in the EDA Simulator Link IN installation; there is no need to specify the libdir parameter in this case.
The library resolution can be verified using ldd from within the ncsim console GUI.
ncsim> exec ldd /path/to/liblfihdls_spro11.so
libxnet.so.1 => /lib/libxnet.so.1
librt.so.1 => /lib/librt.so.1
libm.so.2 => /lib/libm.so.2
libc.so.1 => /lib/libc.so.1
libstlport.so.1 => /tools/SUNWspro_studio11_20070319/opt/SUNWspro/lib/stlport4/libstlport.so.1
libCrun.so.1 => /usr/lib/libCrun.so.1
libaio.so.1 => /lib/libaio.so.1
libmd5.so.1 => /lib/libmd5.so.1
libm.so.1 => /lib/libm.so.1
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libmp.so.2 => /lib/libmp.so.2
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
/platform/SUNW,Sun-Blade-1000/lib/libmd5_psr.so.1
Example: EDA Simulator Link™ IN Alternate Library Using System Shell. This example shows how to load an Incisive simulator session by explicitly specifying the EDA Simulator Link IN library (default or not). By explicitly using a system shell, you can execute this example on the same machine as MATLAB, on a different machine, and even on a machine with a different operating system.
In this example, you are running the 64-bit Linux version of Incisive 5.83p2; it does not matter what machine MATLAB is running on. Instead of using the default library version compiled with GCC 3.2.3 in the Incisive distribution, you are using the version compiled with GCC 3.4.6 in the Incisive distribution.
In a csh-compatible system shell:
csh> setenv PATH /tools/ius-583p2/lnx/tools/bin/64bit:${PATH}
csh> setenv LD_LIBRARY_PATH /tools/ius-583p2/lnx/tools/systemc/gcc/3.4.6-x86_64
/install/lib64:${LD_LIBRARY_PATH}
csh> ncvhdl inverter.vhd
csh> ncelab -access +rwc inverter
csh> ncsim -tcl -loadvpi /tools/matlab-7b/toolbox/incisive/linux64
/liblfihdlc_gcc34:matlabclient inverter.vhd
The PATH is changed to ensure we get the correct version of the Incisive tools. Although ncsim will automatically find any GCC libs in its installations, the LD_LIBRARY_PATH is changed to show how you might do this with a custom installation of GCC.
You can check the proper library resolution using ldd as in the previous example.
![]() | Requirements | Starting the HDL Simulator | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |