Using Novas Debug Systems with NC-Sim
Linking
We will use Debussy 5.3, LDV 5.0 and SOLARIS2 32bit OS in this example. Other platforms will have similar settings, except for the HP OS, the environment variable is SHLIB_PATH, instead of LD_LIBRARY_PATH. For detailed information please consult Novas Software's Installation documentation (<Novas_install>/doc/installation.pdf).
Platforms Supported:
- HP10 <=> HPPA <=> HP11_32bit
- HP11<=>HP11_64bit
- LINUX
- WINNT (libraries come up only when installed on windows)
- SOL2<=>SOLARIS2<=>SOL7_32bit
Verilog
Dynamic linking
To link the provided compiled library:
setenv LD_LIBRARY_PATH <Novas_install>/share/PLI/nc_xl/SOLARIS2/nc_shared
If you need to generate your own compiled library, the required files are pli.a and veriuser.c
They are located at <Novas_install>/share/PLI/nc_xl/SOLARIS2
Bootstrap Dynamic Linking
setenv LD_LIBRARY_PATH <Novas_install>/share/PLI/nc_xl/SOLARIS2/nc_loadpli1
ncverilog -f run.f +debug +loadpli1=debpli:debpli_boot
Static Linking
Copy and edit Makefile.nc from <Cadence_install_dir>/tools/inca/files
VERIUSER_C = $(NOVAS_HOME)/share/PLI/nc_xl/SOLARIS2/veriuser.c
PLI_OBJECTS = $(NOVAS_HOME)/share/PLI/nc_xl/SOLARIS2/pli.a
> make -f Makefile.nc static
New static executables will be created for ncsim and ncelab
Use these new static executables
> path = (<location of static executables>) $path)
VHDL
Dynamic linking
To link the provided compiled library:
- Compile novas.vhd found in <Novas_install>/share/PLI/nc_vhdl/SOLARIS2
- Add in your vhdl code: use work.novas.all;
- setenv LD_LIBRARY_PATH <Novas_install>/share/PLI/nc_vhdl/SOLARIS2
If you need to generate your own compiled library the required files are novasfmi.c, novascfc.c and novas.a. They are located at: <Novas_install_dir>/share/PLI/nc_vhdl/SOLARIS2
Bootstrap Dynamic Linking
To link the provided compiled library:
- Compile novas.vhd found in <Novas_install>/share/PLI/nc_vhdl/SOLARIS2
- Add in your vhdl code: use work.novas.all;
- setenv LD_LIBRARY_PATH<Novas_install>/share/PLI/nc_vhdl/SOLARIS2/boot
ncelab -f run.f -access+r +loadfmi debfmi:debfmi_boot
Static Linking
Copy and edit Makefile.nc from <Cadence_install_dir>/tools/inca/files
> make -f Makefile.nc static
New static executables will be created for ncsim and ncelab
Use these new static executables
> path = (<location of static executables>) $path)
Mixed Language Design
Dynamic linking
To link the provided compiled library:
- Compile novas.vhd found in <Novas_install>/share/PLI/ldv4.0_vhpi/SOLARIS2
- Add in your vhdl code: use work.novas.all;
- setenv LD_LIBRARY_PATH <Novas_install>/share/PLI/ldv4.0_vhpi/SOLARIS2
If you need to generate your own compiled library the required files are novasfmi.c, novascfc.c, pli_body.o and veriuser.c. They are located at: <Novas_install_dir>/share/PLI/ldv4.0_vhpi/SOLARIS2
Bootstrap Dynamic Linking
- Compile novas.vhd found in <Novas_install>/share/PLI/ldv4.0_vhpi/SOLARIS2/boot
- Add in your vhdl code: use work.novas.all;
- setenv LD_LIBRARY_PATH<Novas_install>/share/PLI/ldv4.0_vhpi/SOLARIS2/boot
ncelab -f run.f -access+r -loadfmi debfmi:debfmi_bootàIf Top Level is VHDL
ncelab -f run.f +debug -loadpli1 debpli:debpli_bootàIf Top Level is Verilog
Example Use Model
Verilog
Add the following in your Verilog code[1]:
initial begin $fsdbDumpvars; end
> ncverilog +access+r +debug -f run.f
OR
>ncverilog -f run.f +debug +loadpli1=debpli:debpli_boot
> Debussy -f run.f > verdi -f run.f
VHDL
Add the following in your vhdl code: process
begin
fsdbDumpfile("vhdl.fsdb");
fsdbDumpvars(0, "system");
wait ;
end process;
> ncvhdl -work WORK -f run.f
> ncelab -access +r work.system:blk
OR
ncelab -f run.f -access+r +loadfmi debfmi:debfmi_boot
> ncsim work.system:blk -input stop.do
Example stop.do File: call fsdbDumpfile nc_vhdl.fsdb
call fsdbDumpvars 0 :
run 12500 NS
exit
> vhdlcom -f run.f
> debussy -lib work -top system > verdi -lib work -top system
Mixed
Add the following in your vhdl code: process
begin
fsdbDumpfile("vhdl.fsdb");
fsdbDumpvars(0, "system");
wait ;
end process;
Add the following in your Verilog code:
initial begin $fsdbDumpvars; end
> ncvlog -work WORK -f run.f
> ncvhdl -work WORK -f run.f
> ncelab -access +r work.system:blk
> ncsim work.system:blk
> vericom -f run.f (verilog files only)
> vhdlcom -f run.f (vhdl files only)
> debussy -lib work -top system > verdi -lib work -top system
For Debussy/Verdi Interactive Mode Simulation
In Novas GUI select the appropriate simulator, for example:
nTrace -> Tools --> Option --> Preferences ---> Simulator : NC-VHDL
Executable : ncsim
Run the simulation: nTrace -> Tools --> Interactive Mode ---> Run
Examples for dumping from Debussy/Verdi command line :
> call fsdbDumpvars
> run 12500 ns
> exit
Can also use options in GUI mode in Debussy/Verdi :
nTrace -> Debug ---> User Defined Commands
Dumping from NCSIM GUI
On the NCSIM GUI command line, you can type fsdb command as follows:
> call fsdbDumpfile {"test.fsdb"}
> call fsdbDumpvars 0 {"system"}
--> 0 : level , which specifies how many levels of hierarcy to dump for the subsequent scope
--> system: module / variable , gives either the module scope / variable that specify the objects to dump
[1] There are also command line arguments to dump the FSDB file.
- Debug Workshops
- Downloads
- Newsletter
- On-Site Training
- Support
- Supported Platforms