nclaunch
Start and configure Cadence Xcelium simulator for use with HDL Verifier software
Description
nclaunch starts the Cadence®
Xcelium™ simulator for use with the MATLAB® and Simulink® features of the HDL Verifier™ software. The first folder in the Xcelium 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 Xcelium simulator, the Name,Value)xmsim 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.
Examples
Compile design and start Simulink.
nclaunch('tclstart',{'exec xmvlog -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 xmvlog -64bit -c +access+rw +linedebug top.v.Starts Simulink with the GUI from the
projfolder with the model loaded:hdlsimulink -gui work.topand'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 myTclscriptThis 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 xmvlog -64bit vlogtestbench_top.v'
Tclcmd{2} = 'exec xmelab -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 xmvlog -64bit vlogtestbench_top.v' 'exec xmelab -64bit -access +wc vlogtestbench_top'
Tclcmd =
'exec xmvlog -64bit vlogtestbench_top.v' 'exec xmelab -64bit -access +wc vlogtestbench_top'
Tclcmd =
[1x31 char] [1x41 char] [1x145 char]tclcmd{1}compilesvlogtestbench_top.tclcmd{2}elaborates the model.tclcmd{3}callshdlsimmatlabinguimode and loads the elaboratedvlogtestbench_topin 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(matlabtbandrun) in thexmsimTcl shell.Issues a call to
matlabcp, which associates the functionvlogmatlabcto the module instanceu_matlab_component.Assumes that the
hdldaemonin MATLAB is listening on port 32864Instructs the
runfunction to run 50 resolution units (ticks).
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: nclaunch('runmode','GUI') starts the HDL simulator with
graphical user interface.
Path to Xcelium 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
Name of Xcelium simulator executable, specified as the comma-separated pair consisting
of 'hdlsimexe' and a simulator name. By default, function uses
'xmsim' simulator.
Data Types: char
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 Xcelium simulator to communicate with MATLAB when Xcelium simulator runs on a machine that does not have MATLAB.
Data Types: char
Library 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
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
dirnameis "TEMPDIR", the function creates a temporary folder in which it runs the HDL simulator.If you specify
dirnameand the directory does not exist, you will get an error.
Data Types: char
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
TCP/IP socket communication between Xcelium 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
Option to start Xcelium, specified as the comma-separated pair consisting of
'starthdlsim' and one of the following values:
'yes'– To create a startup Tcl file after launching Xcelium simulator.'no'– To create a startup Tcl file without launching Xcelium simulator.
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 Xcelium simulator.
Data Types: char
Execute TCL commands before Xcelium 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 -xmvlog -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
Version History
Introduced in R2008a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)