Start and configure Cadence Incisive simulators for use with HDL Verifier software
nclaunch
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.
nclaunch(
specifies name-value pair
arguments that allows you to customize the Tcl commands used to start the Cadence Incisive simulator, the Name,Value
)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.
After you call this function, you can use HDL Verifier functions for the HDL simulator (for example,
hdlsimmatlab
, hdlsimulink
) to do interactive
debug setup.
Compile design and start Simulink.
nclaunch('tclstart',{'exec ncverilog -64bit -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 -64bit -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 character vector 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 -64bit vlogtestbench_top.v' Tclcmd{2} = 'exec ncelab -64bit -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 -64bit vlogtestbench_top.v' 'exec ncelab -64bit -access +wc vlogtestbench_top' Tclcmd = 'exec ncvlog -64bit vlogtestbench_top.v' 'exec ncelab -64bit -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).
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
nclaunch('runmode','GUI')
starts the HDL simulator with
graphical user interface.'hdlsimdir'
— Path to Cadence Incisive simulator executablePath to Cadence Incisive simulator executable, specified as the comma-separated pair consisting
of 'hdlsimdir'
and a path name. By default, function executes first
version of the simulator that the function finds on system path.
Data Types: char
'hdlsimexe'
— Name of Cadence Incisive simulator executable'ncsim'
(default) | character vectorName of Cadence Incisive simulator executable, specified as the comma-separated pair consisting
of 'hdlsimexe'
and a simulator name. By default, function uses
'ncsim'
simulator.
Data Types: char
'libdir'
— Entry in startup Tcl file Entry in startup Tcl file, specified as the comma-separated pair consisting of
'libdir'
and a folder name. It points to the folder with the
shared libraries for Cadence Incisive simulator to communicate with MATLAB when Cadence Incisive simulator runs on a machine that does not have MATLAB.
Data Types: char
'libfile'
— Library file for HDL simulationLibrary file for HDL simulation, specified as the comma-separated pair consisting
of 'libfile'
and the library file name. 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. By default, function uses that version of the library file which was built
using the same compiler that MATLAB itself uses.
Data Types: char
'rundir'
— Location to run HDL simulator Location to run HDL simulator, specified as the comma-separated pair consisting of
'rundir'
and a folder name.
The following conditions apply to this name-value pair:
If the value of dirname
is “TEMPDIR”, the
function creates a temporary folder in which it runs the HDL simulator.
If you specify dirname
and the directory does
not exist, you will get an error.
Data Types: char
'runmode'
— Run mode for HDL simulator'GUI'
(default) | 'Batch'
| 'Batch with Xterm'
| 'CLI'
Run mode for HDL simulator, specified as the comma-separated pair consisting of
'runmode'
and one of the following values:
'Batch'
– Starts HDL simulator in background with no
window
'Batch with Xterm'
– Starts HDL simulator in background
with no window
'CLI'
– Starts HDL simulator in an interactive terminal
window
'GUI'
– Starts HDL simulator with graphical user
interface
'socketsimulink'
— TCP/IP socket communication between Cadence Incisive simulator and SimulinkTCP/IP socket communication between Cadence Incisive simulator and Simulink, specified as the comma-separated pair consisting of
'socketsimulink'
and a port number or service name. By default,
function uses shared memory communication.
Data Types: char
'starthdlsim'
— Option to start Cadence Incisive simulator 'yes'
(default) | 'no'
Option to start Cadence Incisive simulator, specified as the comma-separated pair consisting of
'starthdlsim'
and one of the following values:
'yes'
– To create a startup Tcl file after launching
Cadence Incisive simulator.
'no'
– To create a startup Tcl file without launching
Cadence Incisive simulator.
'startupfile'
— Name and location of generated Tcl file Name and location of the generated Tcl file, specified as the comma-separated pair
consisting of 'startupfile'
and a path name. The generated Tcl
script, when executed, compiles and launches the HDL simulator.
Data Types: char
'tclstart'
— Execute Tcl commandsExecute TCL commands before Cadence Incisive simulator launches, specified as the comma-separated pair consisting of
'tclstart'
and a Tcl command.
Note
You must type exec
in front of non -Tcl system shell
commands. For example:
exec -ncverilog -64bit -c +access+rw +linedebug top.v hdlsimulink -gui work.top
You must specify at least one command; otherwise, no action occurs.
Data Types: char