VCS

COMPILE

To compile files use the following command:


vlogan -sverilog filename.sv

COMPILE + ELABORATE

vcs -sverilog filenames.sv # Auto detects top module

vcs -sverilog -f filelist.txt

COMPILE + ELAB + SIM

vcs -sverilog filenames.sv

./simv

DUMPING WAVEFORM - VPD

TB Part:

# VCD

$dumpfile("wave.vcd");

$dumpargs; # $dumpvars(<levels> <, <module_or_variable>>* );


#VPD - VCD-plus

$vcdpluson;


VCS command:

# VCD

vcs -sverilog filenames.sv


# VPD - without -debug_pp switch, the compilation will fail due to $vcdpluson system call

vcs -sverilog filenames.sv -debug_pp

DUMPING WAVEFORM - FSDB

TB Part:

# FSDB

$fsdbDumpfile("wave.fsdb");

$fsdbDumpargs; # $fsdbDumpvars(<levels>, <instance>, <option> );


Options:

+all - Dumps all signals including memory, MDA, packed arrays, union, power-related (power supply nets and power domain states under $power_root ) and packed structs.

For VCS use "+memcbk" during compile

+mda - Dumps all memory and MDA

+IO_Only - Only IO port signals are dumped

+Reg_Only- Only reg type signals are dumped


VCS command:

# VPD - without -debug_pp switch, the compilation will fail due to $vcdpluson system call

vcs -sverilog filenames.sv -debug_pp -fsdb -memcbk -kdb


# -kdb - generate verdi database


IRUN command:

irun -prep -compile +overwrite -64bit -extv200x -v200x -nclibdirname vunit_out/cadence/libraries -makelib vunit_lib -F ./vunit_lib.vc -endlib

Dumping multi dimensional arrays into waveform

Multi-dimensional arrays can be dumped to waveform in two ways,

1. A snapshot of the memory is dumped when a task is invoked. This saves memory.

2. Constantly track memory changes and dump data (like regular flop or signals). This takes up more memory.


SNAPSHOT:

Elaboration option: +memcbk

TB system task : $vcdplusmemorydump (call when a snapshot is needed. Can be called multiple times)


Continuous dump:

Elaboration option: +memcbk

TB system task : $vcdplusmemon, $vcdplusmemoff (Turn on/off dumping), $fsdbDumpargs(0,hier,"+all");


Run lint during compile

To run a basic lint during elaboration use the following switch.

+lint=TFIPC-L # Dumps details on any missing port connection

+lint=PCWM # Dumps detail on port connectivity widths