Timing Diagram Editing and Analysis

11.5 Batch Mode & Command Line Options

11.5 Batch Mode & Command Line Options

Previous topic Next topic  

11.5 Batch Mode & Command Line Options

Previous topic Next topic  

All SynaptiCAD products have several command-line parameters which enable them to perform certain functions non-interactively. If you launch the product from a command window you can use one or more command line options to control how the product runs. You can also create start menu and desktop icon shortcuts that launch the tool with different options.

To set the options passed when executing the tool from an icon or start menu, right click on the shortcut, select the Properties menu option, and add the desired options after the program name in the Target field of the shortcut.

Batch mode diagram merge properties are set using the Options > Diagram Merge Properties menu (see Section 10.4 Merging Diagrams for more information).

Batch mode diagram compare properties are set using the View > Compare Signals menus (see Section 9.2 Viewing Compare Differences).

Most command-line parameters have both a short and a long form. For example, the long form of the option to control which product is launched is --product and the short form is -p, so the following are equivalent:

syncad.exe --product wfp --input myfile.btim

syncad.exe -p wfp -i myfile.btim

Below is a list of supported command line parameters. Each of these is described in detail later in this section including the valid values for string arguments.

Long Option

Short Option

Argument Type

Description

--product

-p

product code

Select which product to run

--simulator 

-S

simulator code

Specify the default simulator

--input

-i

filename

Specify an input file containing waveform data.

none

none

filename

Specify a project file or timing diagram to load by listing the file name without any dash commands.

--import

-m

import code

Specify the file format of the file to load

--output

-o

filename

Specify the output file for batch conversion

--export

-e

export code

Specify the output file format for batch conversion

--filter

-f

filename

Specify a filter file to be used when loading files

--eval-perl-file

-s

filename

Invoke a perl script

--eval-perl-string

-t

string of perl commands

Invoke a perl command

--batch-mode

-b

none

Run without displaying the main window

--quit

-q

boolean

Quit after processing command-line parameters

--corba-port

-c

port-number

Connect to tcp port port-number on the localhost with the IOR

--license

-n

option name

specify which licenses to check out like ole or compare.

-nosplash

 

none

Runs the program without displaying the initial splash screen

--report-crashes

-r

never, ask

Asks whether to email a crash report before emailing SynaptiCAD

Write a Script if using more than one option:

If more than one command line option is used, we recommend that you put the commands in a perl script and call it using the -s scriptname option. See Appendix B: Writing Waveperl Scripts for more information. A script will let you explicitly control the sequence of events. However, if more than one command line option is specified, they will be executed in this sequence:

1.Execute -f to setup any filter files.

2.Execute -i to setup any input files.

3.Execute -t to evaluate any perl commands.

4.Execute -s to execute a perl script file if specified.

5.If an output file (-o) and output file format(-e) are specified, the current timing diagram will be saved to that file in that format.

6.All other options

1) Select which product to run -p or -product

All SynaptiCAD products with a timing diagram graphical interface are distributed as one executable image (syncad.exe on Windows and syncad on UNIX). When you run syncad.exe, it will launch one of SynaptiCAD's products, depending on what command line arguments were present. For example, if the executable is invoked as syncad.exe --product testbencherpro it will load TestBencher Pro. The valid values for this option are:

Product

Valid Values

WaveFormer Lite

wfl, wflite, waveformlite, or waveformerlite

Timing Diagrammer Pro

td, tdp, timing, or timingdiagrammerpro

WaveFormer Pro

wf, wfp, waveform, or waveformerpro

VeriLogger Pro

vl, vlp, vlog, vlogger, or veriloggerpro

BugHunter Pro

bh, bhp, bughunter, bughunterpro

DataSheet Pro

ds, dsp, datasheet, or datasheetpro

TestBencher Pro

tb, tbp, tbench, testbencher, or testbencherpro

If no product option is specified on the command line, the program will start as whatever product was run most recently.

2) Set the default simulator -S or --simulator

Specify the default simulator used for new simulation projects. It takes one of the following arguments: verilogger_extreme, vhdl_extreme, vlogcmd, active_vhdl, active_verilog, modelsim_vhdl_se, modelsim_vhdl_nonse, modelsim_verilog, ncvhdl, ncverilog, vcs, vcsi, verilogxl, scirocco, mscl, or gcc.

3) Load an Input File -i or --input

The input command specifies an input file that contains waveform data.

The filename can be either relative to the current directory or absolute.

Can be used with the -m option which specifies the type of the file.

Can be used with the -f option which creates a filter file that specifies which signals are loaded from the input file.

Normally, this option will cause the file to load and display for interactive use, just as if you had started TestBencher Pro and then opened the file from the File > Open Timing Diagram menu. However, if you are doing a batch file conversion, using the -b command, the file will not be displayed.

Alternative Approach: An input file can also be loaded using a perl function OpenFile( ) with the -s command.

4) Specify the format of an input file -m or --import

This option specifies the file format of the input file that is loaded with the -i option. If this is left unspecified, the program will guess at the file type by using the extension. This works for most files, but there are some formats like  TXT which it cannot discriminate. This option is case-sensitive.

To get a complete list of the valid values for this option, select the Import/Export > Add/Execute Script menu  to open a dialog, and then select the Import radio button. The valid values will be listed in the first column.

As of this writing, the valid values are: AUTO_EXT_To_IF, TIM_To_IF, TDML_To_IF, FREEPARM_To_IF, FREETEXT_To_IF, WFM_To_IF, HPL_To_IF, POD_To_IF, ADPLD_To_IF, VCD_To_IF, HPWave_To_IF, AWF_To_IF, VHDL_To_IF, ALT_To_IF, GERMAN_To_IF, HPFASTBIN_To_IF, CSDF_To_IF, OSCOPE_To_IF, TECTRONIX_To_IF, TVECTOR_To_IF, chro.ipl, dworks.ipl, and acco.ipl.

Alternative Approach: An input file can also be loaded using a perl function twf::OpenFile( ) with the -s command. The optional second command of the function specifies the file import type.

5) Generate an Output file  -o or --output

This option specifies the name of the output file when doing file format conversions.

A -e command MUST also be used. This will specify the type of output file format to convert to.

Alternative Approach: Use the perl function twf::SaveFile( ) function with a -s command.

6) Output File Format -e or --export

This option sets the type of file to generate and save to the file listed with the -o command. If a -e is used, then there also MUST be a -o file specified.

To get a complete list of the valid values for this option, select the Import/Export > Add/Execute Script menu  to open a dialog, and then select the Export radio button. The valid values will be listed in the first column.

At the time of writing, the valid values are: IF_TO_TIM, IF_TO_FREEPARM, IF_TO_FREETEXT, IF_TO_FILTERTIM, IF_TO_TDML, wvhdl.epl, tvhdl.epl, verilog.epl, IF_TO_TDML, IF_TO_CMD, mentor.epl, spice.epl, hspice.epl, dspice.epl, IF_TO_CIR, orbit.epl, abel.epl, abelpin.epl, minc.epl, hpdisk.epl, hpbus.epl, HP_PATGENBIN, stil.epl, alterabin.epl, alterahex.epl, pla.epl, mtech.epl, tvector.epl, tvectornotiming.epl, tvectorclocked.epl, and logicexpress.epl

Alternative approach: Use the perl function twf::SaveFile( ) with a -s command.

7) Input File Filter -f or --filter

This filter file option specifies a filter file. See Section 11.2 Import General Instructions for information on filter file creation and usage.

Once the filter file is set, the same filter file will be used each time the product is run.

To change or remove the filter file, use the -f option again. Specifying the empty string ("") indicates that no filter file should be used.

This option does the same thing as the Options > Set Filter File... menu when running the program normally.

Alternative Approach: Use the perl function twf:SetFilterFile( ) function before the call to twf::OpenFile( ) inside the Perl script.

8) Evaluate Perl Script -s or --eval-perl-file

The --eval-perl-file filename option specifies a perl script file to be run. The script can be any valid perl script. The script will have access to all of the functions in product's perl interface. The perl script is evaluated in the main thread of the timing diagram editor so the application will be unresponsive while the script is running. All of the Perl commands are described in the file Twfapi.txt located in the SynaptiCAD\Help directory.

The filename argument can be either an absolute path to the script or a path relative to the directory from which the timing diagram editor was run.

Below is an example of a perl script that could be called using the -s command line option. This code passes a filter file called "filterfile.tim" to the program, then loads a VCD waveform file called "basename.vcd". The filter file lists the names of the signals to load from the VCD file. Next the script exports the waveform information to a spreadsheet format and saves the information in a file called basename.cbc.

#open a filter file that defines what signals to read from the input file

# as well as other information such as signal direction

twf::SetFilterFile("filterfile.tim");
 

#import the signals from a vcd file named "basename.vcd"

twf::OpenFile("basename.vcd");
 

#export the signals to a test vector spreadsheet file named "basename.cbc"

twf::SaveFile("basename.cbc","tvectorclocked.epl");

9) Evaluate Perl String -t or --eval-perl-string

The evaluate perl string function evaluates its argument as if it were the contents of a script. It can do everything that the -i, -e, and -m can do, plus much more. All of the perl commands are described in the file Twfapi.txt located in the SynaptiCAD\Help directory. Some examples are:

The following command would launch TestBencher Pro and notepad at the same time (system is a perl function for launching a program, qw is a perl function that puts quotes around the string it encloses):

syncad.exe --product testbencherpro --eval-perl-string "system(qw(notepad.exe))"

The following command loads test.txt and specifies that it is a test vector spreadsheet file. It then loads test2.btim and performs a comparison between the files:

syncad.exe -t "twf::OpenFile(qw(test.txt),qw(TVECTOR_To_IF));twf::CompareFile(qw(test2.btim));"

Another way to automatically compare these files is to embed the commands into a perl file:

syncad.exe --eval-perl-file temp.pl

if temp.pl contained

twf::OpenFile('C:\temp\test.txt', "TVECTOR_To_IF");

twf::CompareFile('C:\temp\test2.tim);

10) Enable Batch Mode -b or --batch-mode

If the -b option is specified, the program will not display the graphical interface. It will just run and perform the listed commands. This is useful when you want to invoke the SynaptiCAD product from within another program to convert a file from one format to another or do some other automated processing. This option interacts with the --quit option.

11) Exit After Processing Arguments -q

Setting this parameter's value to true causes TestBencher Pro to exit after it has carried out all the actions specified on the command line (anything triggered by the --input,--output, --eval-perl-*, etc). If it is set to false, TestBencher Pro will continue into interactive mode.

If you do not specify this argument on the command line, then it will determine what to do from the --batch-mode flag. If batch mode is enabled, it will default to true. If batch mode is not enabled, it will default to false. This is usually what you want, because if it is set to false in batch mode, TestBencher Pro will continue to run (invisibly) after doing all of the work you specified. (But then you could write a server in perl which would, say, accept requests on a socket, and you would want that to stick around after the initial processing was completed).

12) Set Corba port number -c or --corba-port:

Use mostly by OEM vendors, the -c option connects to tcp port port-number on the localhost with the IOR.

13) Pick License and options to run -n or --license

Normally the program will grab a license for the product and one of each available option packages (same as the "alloptions" code). When the -n option is used, only the options specified will be checked out.

The following are valid options to specify: ole, compare, multidgm, gigawave, debuggertool, reactiveexport,      trackertool, timinganalysis, timingparameters, alloptions or nooptions

You must have the a valid license for the option in order to successfully run a program option.

To ensure that the program checks out no optional features, specify "nooptions".

14) Run without the splash screen -nosplash

Runs the program but does not display the splash screen at start up.

15) Don't prompt when reporting crashes -r or --report-crashes:

The default behavior of the program is, -r ask, which cause a prompt to be displayed before emailing any crash information to SynaptiCAD. If -r never is set, then no crash report will be sent.