User guide

9-14
Using the Old Command Line Interface (CLI)
Non-Graphical Debugging With the CLI
In order to use the CLI:
Enable it at compile time with the options
+cli and -line.
Include the -s on the runtime command line (e.g. simv -s).
For example:
When compiling both the testbench and the design together, the
command lines are:
% vcs -ntb +cli -line sram.v sram.test_top.v sram.vr
% simv -s
When compiling the testbench separately from the design, the
command lines are:
% vcs -ntb_cmp +cli -line -ntb_sname sram_test sram.vr
% vcs -ntb_vl +cli -line sram.v sram.test_top.v sram.vshell
% simv -s +ntb_load=./libtb.so
Using the CLI, Example 1
Example 9-2 is a testbench, containing mailboxes and triggers. It is
in the file memsys1.vr, which is a part of the Native Testbench tutorial
example in your VCS installation under $VCS_HOME/doc/examples/
nativetestbench/tutorial.
Example 9-2 Testbench Containing Mailboxes and Triggers
#define OUTPUT_SKEW #1
#define INPUT_SKEW #-1
#define INPUT_EDGE PSAMPLE
#include <vera_defines.vrh>
#include “memsys.if.vrh”