| EDA Simulator Link™ IN | ![]() |
nclaunch('PropertyName', 'PropertyValue'...)
nclaunch('PropertyName', 'PropertyValue'...) starts the Incisive simulator for use with the MATLAB and Simulink features of the EDA Simulator Link IN software. The first directory in the Incisive simulator matches your MATLAB current directory if no explicit rundir parameter is specified.
After you call this function, you can use EDA Simulator Link IN command extensions to do interactive debug setup.
The property name/property value pair settings allow you to customize the Tcl commands used to start the Incisive simulator, the ncsim executable to be used, the path and name of the Tcl script that stores the start commands, and for Simulink applications, details about the mode of communication to be used by the applications. You must use a property name/property value pair with nclaunch.
Specifies the path name to the Incisive simulator executable to be started. By default, the function uses the first version of the simulator that it finds on the system path (defined by the path variable) . Use this option to start different versions of the Incisive simulator or if the version of the simulator you want to run does not reside on the system path.
Specifies the name of an Incisive simulator executable. By default, this function uses 'ncsim'. You can specify a custom-built simulator executable with 'simexename.'
Specifies the directory containing MATLAB shared libraries. This property creates an entry in the startup Tcl file that points to the directory with the shared libraries needed for the Incisive simulator to communicate with MATLAB when the Incisive simulator is running on a machine that does not have MATLAB.
Specifies where to run the HDL simulator. By default, the function uses the current working directory.
The following conditions apply to this name/value pair:
If dirname is specified and the directory exists, the HDL simulator is run in the specified directory.
If no rundir property/value pair is specified or if dirname is empty, the HDL simulator is run in the current working directory.
If the value of dirname is "TEMPDIR", the function creates a temporary directory in which it runs the HDL simulator.
If dirname is specified and the directory does not exist, you will get an error.
Specifies a Tcl script that defines the behavior of the Incisive simulator commands hdlsimmatlab and hdlsimulink. The Tcl script consists of some general-purpose Tcl commands for launching the Incisive simulator and any commands you specify with the 'tclstart' property. If you omit this property, the function creates a temporary file each time the Incisive simulator starts. If you specify a name for the Tcl script, later you can use the file to start the Incisive simulator from a system shell as shown in the following syntax:
tclsh tcl_scriptname
Specifies TCP/IP socket communication for links between the Incisive simulator and Simulink. See Specifying TCP/IP Values for valid TCP/IP examples. For more information on choosing TCP/IP socket ports, see Choosing TCP/IP Socket Ports.
If the Incisive simulator and Simulink are running on the same computing system, you have the option of using shared memory for communication. Shared memory is the default mode of communication and takes effect if you omit -socketsimulink tcp_spec from the function call.
Determines whether the Incisive simulator is launched. The default is yes, which launches the Incisive simulator and creates a startup Tcl file. If starthdlsim is set to no, the Incisive simulator is not launched, but a startup Tcl file is still created.
This startup Tcl file contains pointers to MATLAB and Simulink shared libraries. To run the Incisive simulator manually, see Starting the HDL Simulator.
Specifies one or more Tcl commands to execute before the Incisive simulator launches. Specify a command string or a cell array of command strings. You must specify at least one command; otherwise, no action occurs.
Note You must put "exec" in front of non-Tcl system shell commands. For example: exec -ncverilog -c +access+rw +linedebug top.v hdlsimulink -gui work.top |
The following function call sequence compiles the design and starts Simulink with a GUI from the "proj" directory with the model loaded. Simulink is instructed to communicate with the EDA Simulator Link IN interface on socket port 4449. All of these commands are specified in a single string as the property value to tclstart.
nclaunch(...
'tclstart',...
{'exec ncverilog -c +access+rw +linedebug top.v',...
'hdlsimulink -gui work.top'},...
'socketsimulink','4449',...
'rundir', '/proj');In this next example, tclcmd is used to build the sequence of Tcl commands that are executed in a Tcl shell after calling nclaunch from MATLAB, as follows:
tclcmd{1} compiles vlogtestbench_top.
tclcmd{2} elaborates the model.
tclcmd{3} calls hdlsimmatlab in gui mode and loads the elaborated vlogtestbench_top in the simulator.
The arguments being passed with -input (matlabtb and run) are executed in the ncsim Tcl shell. In this example, matlabcp associates the m-function vlogmatlabc to the module instance u_matlab_component. It assumes that the hdldaemon in MATLAB is listening on port 32864. run will run 50 resolution units (ticks).
tclcmd{1} = 'exec ncvlog vlogtestbench_top.v'
tclcmd{2} = 'exec ncelab -access +wc vlogtestbench_top'
tclcmd{3} = ['hdlsimmatlab -gui vlogtestbench_top ' ...
'-input "{@matlabcp vlogtestbench_top.u_matlab_component...
-mfunc vlogmatlabc -socket 32864}" '...
'-input "{@run 50}"']
nclaunch('hdlsimdir', 'local.IUS.glnx.tools.bin', 'tclstart',tclcmd);
The following example shows using the property startupfile to designate a Tcl script that is then used to start the HDL simulator from the Tcl shell.
In MATLAB:
nclaunch (‘tclstart', ‘xxx', ‘startupfile', ‘mytclscript',...
‘starthdlsim', ‘no') In Tcl shell:
shell> tclsh mytclscript
![]() | mvl2dec | pingHdlSim | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |