• No results found

Set the FSDB Dumper Library Path

Before running the simulation (simv), the LD_LIBRARY_PATH environment variable must be set and point to the directory where the FSDB dumper engine (libsscore_vcsmxXXX.so) is located. For example:

> setenv LD_LIBRARY_PATH ${NOVAS_INST_DIR}/share/PLI/VCS/

${PLATFORM}

Load the FSDB Dumper

For VHDL-top-level designs:

1. Repeat the Analyze and Include the Novas Package steps above on the top-level VHDL design.

2. Choose the appropriate method to load the FSDB dumping library.

A) When the FSDB dumping commands are only specified in (one of any layer of) VHDL design.

> vcs –debug top_level

> simv

NOTE: The FSDB dumper will try to load libnovas.so automatically with

"simv". The environment variable, LD_LIBRARY_PATH also needs to point to the directory where the libnovas.so file is located.

> setenv LD_LIBRARY_PATH \ ${NOVAS_HOME}/share/PLI/VCS/

${PLATFORM}:$LD_LIBRARY_PATH

B) When the FSDB dumping commands have possibly been specified inside (one of) the Verilog (SystemVerilog) design files or specified separately in a Verilog dumping module.

> vcs –debug top_level \

–P ${NOVAS_HOME}/share/PLI/VCS/${PLATFORM} ...

or

> vcs –debug top_level fsdb_dump \

–P ${NOVAS_HOME}/share/PLI/VCS/${PLATFORM} ...

> simv

C) When using the FSDB dumping command under the UCLI command prompt, set up the environment:

> setenv LD_LIBRARY_PATH ${NOVAS_HOME}/share/PLI/VCS/

${PLATFORM}:$LD_LIBRARY_PATH

> vcs –debug top_level –load libnovas.so:FSDBDumpCmd ...

> simv -ucli

and then the FSDB Dumping commands can be called in UCLI mode:

> simv -ucli

ucli% fsdbDumpvars 0 top +fsdbfile+test.fsdb +mda or

> simv -ucli -i dump.ucli

For the situations where the FSDB Dumping commands are subject to be invoked at the simv SCL prompt mode (with “#” sign ahead):

# call {fsdbDumpfile(“test.fsdb”)}; //Creates the FSDB file.

# call {fsdbDumpvars(0,”:”)}; //Dump all signals starting from system.

NOTE: The VCS UCLI mode is recommended rather than SCL (# sign) mode.

The FSDB dumping command arguments must follow the VHDL procedure call format. The essential number of arguments is required for each dumping command. Refer to the FSDB Dumping Commands Used in VHDL section for details.

Also, change -verilog can be used to enter the vcs CLI prompt mode. Then the Verilog FSDB dumping commands can be invoked at the vcs CLI prompt mode.

For example:

# change -verilog Changed to Verilog mode

cli_2 > $fsdbDumpfile("qa.fsdb"); //Creates the FSDB dump file.

cli_3 > $fsdbDumpvars(0, system); //Dumps all signals from the system region.

NOTE: To enter the VCS CLI prompt mode, make sure you link vcs with the archive library file pli.a and the PLI table file novas.tab (use -P) so the Verilog FSDB commands can be used in CLI prompt mode.

NOTE: In CLI prompt mode, Verilog FSDB dumping commands can be called to dump signals only with the current scope being Verilog instead of VHDL. Therefore, you should set current scope in CLI to a Verilog scope first.

To learn more about the Verilog FSDB dumping command usage, you can refer to the FSDB Dumping Commands Used with Verilog section.

For Verilog (SystemVerilog)-top-level designs:

Choose the appropriate method to load the FSDB Dumping library.

A) When the FSDB dumping commands are only specified in (one of any layer of) Verilog design or specified separately in a Verilog dumping module.

> vcs –debug top_level –P ${NOVAS_HOME}/share/PLI/VCS/

${PLATFORM} ...

or

> vcs –debug top_level dump –P ${NOVAS_HOME}/share/PLI/VCS/

${PLATFORM} ...

> simv

B) When using the FSDB dumping command under the UCLI command prompt, set up the environment:

> setenv LD_LIBRARY_PATH ${NOVAS_HOME}/share/PLI/VCS/

${PLATFORM}:$LD_LIBRARY_PATH

> vcs –debug top_level –load libnovas.so:FSDBDumpCmd \ –P ${NOVAS_HOME}/share/PLI/VCS/${PLATFORM}/novas.tab...

> simv –ucli

and then the FSDB Dumping commands can be called in UCLI mode:

> simv -ucli

ucli% fsdbDumpvars 0 "top" +fsdbfile+test.fsdb +mda or

> simv -ucli -i dump.ucli

Regardless of whether a VHDL or Verilog top is used, the VCS-MX -ucli command is optional. You must specify it if you want to run VCS-MX simulation ("simv") using UCLI interactive mode with the Novas dumping library.

NOTE: If you use the generated FSDB file after the simulation is complete for debug in the Verdi system and you have a mixed language design, you should also turn on the Signal Name is Case-insensitive option.

When the FSDB dumping command is specified in a standalone UCLI command file like "simv -ucli -i dump.ucli", use the FSDB dumping under the UCLI command prompt method above along with the sample dump.ucli file shown below.

dump.ucli:

fsdbDumpvars 0 "top"

run 100 ps quit

For example:

> vcs -debug_pp top_level -load libnovas.so:FSDBDumpCmd

> simv -ucli -i dump.ucli

To learn more about the VHDL FSDB dumping command usage, you can refer to the FSDB Dumping Commands Used in VHDL section.

NOTE: For situations where it is not possible to set the environment variable LD_LIBRARY_PATH to include $NOVAS_HOME/share/PLI/VCS/

LINUX, the following VCS option could be applied to meet the same functionality:

> vcs top.v –LDFLAGS \

"-Wl,--rpath,$NOVAS_INST/share/PLI/VCS/LINUX" \ +vcsd +vpi \

-P $NOVAS_INST/share/PLI/VCS/LINUX/novas.tab \