| Contents | Index |
nclaunch('PropertyName', 'PropertyValue'...)
nclaunch('PropertyName', 'PropertyValue'...) starts the Cadence Incisive simulator for use with the MATLAB and Simulink features of the HDL Verifier software. The first folder in the Cadence Incisive simulator matches your MATLAB current folder if you do not specify an explicit rundir parameter.
After you call this function, you can use HDL Verifier functions for the HDL simulator (for example, hdlsimmatlab, hdlsimulink) to do interactive debug setup.
The property name/property value pair settings allow you to customize the Tcl commands used to start the Cadence 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.
'hdlsimdir' |
Specifies the path name to the Cadence Incisive simulator executable to be started.
Default: The first version of the simulator that the function finds on the system path. |
'hdlsimexe' |
Specifies the name of a Cadence Incisive simulator executable.
Default: ncsim |
'libdir' |
This property creates an entry in the startup Tcl file that points to the folder with the shared libraries for the Cadence Incisive simulator to communicate with MATLAB when the Cadence Incisive simulator runs on a machine that does not have MATLAB.
|
'libfile' |
Specifies the library file to use for HDL simulation. If the HDL simulator links other libraries, including SystemC libraries, that were built using a compiler supplied with the HDL simulator, you can specify an alternate library file with this property. See HDL Verifier Libraries for versions of the library built using other compilers.
Default: The version of the library file that was built using the same compiler that MATLAB itself uses. |
'rundir' |
Specifies the folder containing the HDL simulator executable.
The following conditions apply to this name/value pair:
Default: The current working folder |
'runmode' |
Specifies how to start the HDL simulator.
Default: 'GUI' |
'socketsimulink' |
Specifies TCP/IP socket communication between the Cadence Incisive simulator and Simulink. For shared memory, omit -socket <tcp-spec> on the command line.
Default: Shared memory |
'starthdlsim' |
Determines whether the Cadence Incisive simulator is launched. This function creates a startup Tcl file which contains pointers to MATLAB and Simulink shared libraries. To run the Cadence Incisive simulator manually, see Starting the HDL Simulator from MATLAB.
Default: yes |
'startupfile' |
Specify the name and location of the Tcl script generated by nclaunch. The generated Tcl script, when executed, compiles and launches the HDL simulator. You can edit and use the generated file in a regular shell outside of MATLAB. For example: sh> tclsh compile_and_launch.tcl
Default: Generates a filename of compile_and_launch.tcl in the folder specified by rundir. |
'tclstart' |
Specifies one or more Tcl commands to execute before the Cadence Incisive simulator launches. You must specify at least one command; otherwise, no action occurs. |
Compile design and start Simulink.
nclaunch('tclstart',{'exec ncverilog -c +access+rw +linedebug top.v','hdlsimulink... -gui work.top'},'socketsimulink','4449','rundir', '/proj');
In this example, nclaunch performs the following:
Compiles the design top.v: exec ncverilog -c +access+rw +linedebug top.v.
Starts Simulink with the GUI from the proj folder with the model loaded: hdlsimulink -gui work.top and 'rundir', '/proj'.
Instructs Simulink to communicate with the HDL Verifier interface on socket port 4449: ‘socketsimulink','4449'.
All of these commands are specified in a single string as the property value to tclstart.
Create a Tcl script to start the HDL simulator from a Tcl shell using nclaunch.
Specify the name of the Tcl script and the command(s) it includes as parameters to nclaunch:
nclaunch (‘tclstart', ‘xxx', ‘startupfile', ‘mytclscript', ‘starthdlsim', ‘yes')
In this example, a Tcl script is created and the command to start the HDL simulator is included. The startup Tcl file is named "mytclscript".
Execute the script in a Tcl shell:
shell> tclsh mytclscript
This starts the HDL simulator.
Build a sequence of Tcl commands that are then executed in a Tcl shell, after calling nclaunch from MATLAB.
Assign Tcl command values to the tclcmd parameter of nclaunch:
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}"']tclcmd =
'exec ncvlog vlogtestbench_top.v' 'exec ncelab -access +wc vlogtestbench_top'
tclcmd =
'exec ncvlog vlogtestbench_top.v' 'exec ncelab -access +wc vlogtestbench_top'
tclcmd =
[1x31 char] [1x41 char] [1x145 char]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.
Issue the nclaunch command, passing the tclcmd variable just set:
nclaunch('hdlsimdir', 'local.IUS.glnx.tools.bin', 'tclstart',tclcmd);In this example, the nclaunch launches the following tasks through the Tcl commands assigned in tclcmd:
Executes the arguments being passed with -input (matlabtb and run) in the ncsim Tcl shell.
Issues a call to matlabcp, which associates the function vlogmatlabc to the module instance u_matlab_component.
Assumes that the hdldaemon in MATLAB is listening on port 32864
Instructs the run function to run 50 resolution units (ticks).

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