Execute Jobs From the Command Line

Execute Tools

You can build a design flow by executing tools, provided you activate runtime tracing for each tool in the flow. This is done by executing each tool from within a VOV Wrapper. The examples in this page use the most sophisticated wrapper, called vw2.

At runtime, each tool connects with the server and exchanges information about its execution environment and its I/Os (input/output).

First, make sure that you are in the proper environment and in the proper working directory. Use vel to list the available environments and ves to switch to the proper environment. For example, if a tool should be executed in the BASE environment, type:
% ves BASE
To copy file aa to bb without FlowTracer, you will probably use the tool cp and the command:
% cp aa bb
With FlowTracer, do the same, except with the vw2 prefix:
% vw2 cp aa bb
The same is true for all other tools. Examples:
% vw2 diff aa bb 
% vw2 gcc -c -I../include hello.c
% vw2 dc_shell -f alu.scr
It up to you to decide which commands belong to the design flow and which commands do not. Sample commands that typically do not belong in the flow are:
% ls
% vi hello.c
% mail boss@work.org < todo.txt
You can verify that the tool has been added to the trace with vsx. This utility shows inputs and outputs of selected nodes in the trace. In the following example, the argument "!" refers to the most recent job in the working directory:
% vw2 cp aa bb
% vsx !
00234069 VALID      ${PROJECT_DIR}/txt/aa
  >>>> Node 00234051  VALID  vw2 cp aa bb
00234076 VALID      ${PROJECT_DIR}/txt/bb

Pipes and Redirection

To redirect stdout to a file, use the redirection option `>'. From the command line, you must quote or escape `>' so that vw2, not the shell, will do the actual redirection.

Here are two equivalent way of escaping the redirection option '>':
% vw2 cat aa bb \> cc
% vw2 cat aa bb ">" cc

Unlike the shell, vw2 requires that the redirection options is separated by spaces from the other command line arguments.

Similarly, to use pipes, you can use the symbol `|' as in:
% vw2 cat aa bb \| grep ciao \> cc

Only stdout can be piped and/or redirected at this time.

Tools That Need No Wrapper

The tool integrator chooses whether, for a specific tool, runtime tracing should always be on or if it should be activated on demand. In the first case, any invocation of the tool will be traced, whether the wrapper is used or not. The tool clevercopy is such an example. Therefore, the following two commands are usually the same because clevercopy is instrumented. With some slow NFS servers, you may need to wrap clevercopy with a VOV statement.
% clevercopy aa bb
% vov clevercopy aa bb

Troubleshooting and Verbosity

In versions earlier than 2016.09u9, setting VOV_VW_VERBOSE to a nonzero value would cause the vw/vov wrapper to create a file called .vw2_pid_%d_verbose.out that received verbose messages from the wrapper. Using the -v option would add some messages, but not as many as using VOV_VW_VERBOSE because many of the messages would get piped to /dev/null. In addition, VOV_VW_LOGNAME could be used to modify the name of the file for the verbose output.

In 2016.09u9 and later, setting VOV_VW_VERBOSE still creates the file and VOV_VW_LOGNAME can still be used to change the name, but now, using -v also does the same thing. Setting VOV_VW_VERBOSE=3 in the environment is equivalent to using -v -v -v as options to vw/vov. In addition, if VOV_VW_VERBOSE is 3 or greater, or 3 or more -v arguments are passed, an additional file called .vw2_pid_%d_verbose_env.out gets written with the full contents of the environment and equivalences used for the job. The VOV_VW_ENV_LOGNAME environment variable can be used to change the name of this file.

Since a job can potentially run on different operating systems, the equivalences may vary depending on which machine the job was run on. The environment, however, should be the same on different machines.

Also in this Section