User guide
21-42
OpenVera Native Testbench
If specifying a command line like the following leads to problems
(error messages related to classes), adding -ntb_opts
dep_check to the command line directs the compiler to activate
analysis of Vera files and process them in topological order with
regard to class derivation relationships.
% vcs -ntb *.vr
By default, files are processed in the order specified (or
wildcard-expanded by the shell). This is a global option, and affects
all Vera input files, including those preceding it, and those named in
-f file.list.
When using the option –ntb_opts print_deps in addition to
–ntb_opts dep_check, the reordered list of source files is printed
on standard output. This could be used, for example, to establish a
baseline for further testbench development.
For example, assume the following files and declarations:
b.vr: class Base {integer i;}
d.vr: class Derived extends Base {integer j;}
p.vr: program test {Derived d = new;}
File d.vr depends on file b.vr, since it contains a class derived from
a class in b.vr, whereas p.vr depends on neither, despite containing
a reference to a class declared in the former. The p.vr file does not
participate in inheritance relationships. The effect of dependency
ordering is to properly order the files b.vr and d.vr, while leaving files
without class inheritance relationships alone.
The following command lines result in reordered sequences.
vcs –ntb –ntb_opts dep_check d.vr b.vr p.vr
vcs –ntb –ntb_opts dep_check p.vr d.vr b.vr