Using NCLaunch
NCLaunch is a graphical user interface that can help you configure and launch
the compiler, elaborator, and simulator. You can also run other tools from
NCLaunch, such as the SDF Compiler, HDL Analysis and Lint, Code Coerage
Analy!er, NC"ro#se, and Comparescan.
$o compile, elaborate, and simulate the design #ith NCLaunch%
&. Start NCLaunch from the directory that contains the tutorial source files.
'se the (ne# option to specify that this is a ne# design%
% nclaunch -new &
At startup, NCLaunch displays a list of modes in #hich you can run the tool.
)ultiple Step mode uses the nclog, nchdl, ncelab, and ncsim commands to
compile, elaborate, and simulate your design* Single Step mode uses irun to
perform these operations #ith one command line.
+. Clic, Single Step. NCLaunch displays its main #indo#.
$he left side of the #indo# sho#s all of the files in the current directory.
$he right side #ill sho# the design libraries, after you hae compiled the
source files and elaborated the design. $he top of the #indo# contains menus
and buttons for starting the tools.
$he NCLaunch main #indo# gies you access to the tools you need to compile and
elaborate the design, as #ell as access to seeral utilities. You access the
tools and utilities by using the $ools or 'tilities menu, or by clic,ing the
appropriate button on the toolbar. "uttons gie you fast access to the tools
and utilities, by using default commandline options. Accessing forms through
the menus lets you specify non(default options.
if you do not see all of the source files that ma,e up the design, chec, the
Filters setting. )a,e sure it is set to -.-. You can enter the filter setting
in the te.t field or choose a setting from the drop(do#n menu attached to the
field.
/. Select the 0erilog design source file%
d,m.
$hen clic, the right arro#, , to add the file to the Design area.
1. Select the 0HDL testbench source file%
d,m2test.hdl
$hen clic, the right arro#, , to add the file to the Design area.
3. Choose $ools 456 78'N. $his opens the 78'N form, #here you can specify options
to the irun command. For this e.ample, you must specify the top(leel module in
the simulation.
9. :nable ;ther ;ptions, and enter the follo#ing option in the te.t field%
(top d,m2test
<. Clic, ;=.
After it compiles and elaborates the design, irun ino,es the simulator in
graphical mode. $he Sim0ision Design "ro#ser and the Console #indo#s appear.
You access your design hierarchy in the Design "ro#ser, and enter Sim0ision and
simulator commands in the Console #indo#.
7n the sidebar on the left side of the Design "ro#ser #indo#, Sim0ision places
the simulation at the top of the hierarchy and assigns it the name simulator.
$he top(leel of the design hierarchy is placed belo# the simulation. 7n this
e.ample, it is named d,m2test.
At startup, the Console #indo# has t#o tabs. $he Sim0ision tab lets you enter
Sim0ision commands, and the simulator tab lets you enter simulator commands. As
you run the simulation, the Console #indo# also displays messages from
Sim0ision and the simulator.
Using the Compiler, Elaborator, and Simulator Command-
Line Interfaces
You can compile, elaborate, and simulate your design #ith the indiidual
command(line interfaces. $his is useful #hen you #ant to run your simulation in
batch mode.
$o compile, elaborate, and simulate the drin, machine%
&. Compile the testbench #ith the follo#ing nchdl command%
% nchdl d!m"test#hdl
+. Compile the 0erilog design #ith the follo#ing nclog command%
% nclog d!m#
/. :laborate the design #ith the follo#ing ncelab command%
% ncelab -access rwc d!m"test
$he (access r#c option gies you read, #rite, and connectiity access to the
design ob>ects. $his ma,es it possible for you to probe signals and display
their alues in Sim0ision.
1. 8un the simulator #ith the follo#ing ncsim command%
% ncsim -gui d!m"test &
$he (gui option ino,es Sim0ision at the start of simulation.
Using the irun Command-Line Interface
$he irun utility lets you run the simulator by specifying all input files and
command(line options on a single command line. $he utility simplifies the
inocation process by letting you use one tool to ino,e the simulator instead
of ino,ing multiple tools separately to piece together the snapshot to be
simulated.
$o compile, elaborate, and simulate the drin, machine #ith irun%
7ssue the follo#ing command%
% irun -access rwc -gui -top wor!lib#d!m"test$hdl d!m"test#hdl d!m# &
$he (access r#c option gies you read, #rite, and connectiity access to the
design ob>ects. $his ma,es it possible for you to probe signals and display
their alues in Sim0ision.
$he (gui option ino,es Sim0ision at the start of simulation.
$he (top option specifies the top(leel design unit that you #ant to simulate.
You must use this option #hen your top leel is #ritten in 0HDL. ?hen it is
#ritten in 0erilog, irun can determine the top leel by analy!ing the design.
Specman
%erilog E&le
$he t#o files are%
@ .or. "ehaioral A;8 model #ritten in 0erilog. $his A;8 design ta,es t#o
input bits and computes one output bit, #hich is the e.clusie(or of the t#o
inputs.
@ .or2erify.e $esting enironment for the design, #ritten in e.
8unning #ith 7nterpreted e Code
You can use irun to simulate this design #ith interpreted e code that is, e
code loaded into Specman, rather than compiled. $he follo#ing command loads the
e file into Specman, generates the HDL stubs file, ino,es nclog to compile
the 0erilog files, and then ino,es the elaborator and simulator.
% irun &or# -snload &or"erif'#e
You can include the -gui option to ino,e the Sim0ision and Specie# B'7s.
8unning #ith Compiled e Code
You can precompile e files and then run Specman. 7f you use irun, the follo#ing
command calls sn2compile.sh to compile the e file into a shared library, loads
the e file into Specman, generates the HDL stubs file, ino,es the 0erilog
compiler, the elaborator, and then the simulator. $he simulator automatically
loads the shared library.
% irun &or"erif'#e &or#
%()L E&le
$he t#o files are%
@ .or.hd "ehaioral A;8 model #ritten in 0HDL.
@ .or2erify.e $esting enironment for the design, #ritten in e.
$o simulate this design #ith interpreted e code that is, e code loaded into
Specman, rather than compiled, use the follo#ing irun command%
% irun &or#hd -snload &or"erif'#e -top wor!lib#&or"tr'
$his command generates the Specman stubs file, loads the e file, ino,es nchdl
to compile the 0HDL files, and then ino,es the elaborator and simulator. 7t is
not necessary to instantiate SC:C)AN28:F:8:NC: in your 0HDL code. $he (top
option is reDuired because the top(leel unit is 0HDL.
)i.ed(Language :.ample
$he three files are%
@ .or2specman.hd Defines the topmost 0HDL entity .or2top, #hich instantiates
.or2try E0erilog moduleF and the Specman foreign entity.
@ .or. "ehaioral A;8 model #ritten in 0erilog.
@ .or2erify.e $esting enironment for the design, #ritten in e.
$he follo#ing irun command generates the Specman 0erilog and 0HDL stubs file,
loads the e file, ino,es nclog to compile the 0erilog files, ino,es nchdl
to compile the 0HDL files, and then ino,es the elaborator and simulator. 7t is
not necessary to instantiate SC:C)AN28:F:8:NC: in your 0HDL code. $he (top
option is reDuired because the top(leel unit is 0HDL.
% irun &or# &or"specman#hd -snload &or"erif'#e -top &or"top
Debugging HDL and e Code
7f the design includes Specman e files, the (gui option #ill also ino,e the
Specie# B'7 so that you can debug your e code. For e.ample, the follo#ing
command ino,es the simulator #ith both Sim0ision and Specie#.
% irun -gui &or"erif'#e &or# &or"specman#hd -top &or"top &
7f you do not need to debug e code, you can ino,e the simulator #ith only
Sim0ision by using the (nospecie# option.
% irun -gui -nospeciew &or# &or"erif'#e
$o ino,e the Specie# B'7 #ithout Sim0ision, use the (specie# option.
% irun -speciew &or# &or"erif'#e