Batch Mode Operation
All SynaptiCAD products have several command-line parameters that enable the product to perform certain
functions non-interactively. Running the product in batch mode execution is especially useful when combined
with the Comparison Option. Files from different simulation runs or from
logic analyzer capture runs can compared automatically using a bath file. Some examples of batch files
that our customers have written:
When the product is launched from the start menu or desktop, no command line options are used. If you
launch the product from a command window you can use one or more command line options to control how
the product runs.
Most of the command-line parameters have both a short form and a long form. If the short form is -a
and the long form is --argument and the argument takes a string as a parameter, then the following are
syncad.exe --argument foo
syncad.exe +argument foo
syncad.exe -a foo
Below is a list of command line parameters. Each of these is described in detail later in this section.
|Select which product to run
|Controls simulator used for new projects
|Invoke a perl script
|Invoke a perl command
|Run without displaying the main window
|Quit after processing command-line parameters
|Select a file to load
|Specify the file format of the file to load
|Specify a filter file to be used when loading files
|Specify the output file for batch conversion
|Specify the output file format for batch conversion
If more than one command line option is used, we recommend that you put the commands in perl script
and call it using the -s scriptname option. This 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:
- If a filter file is specified on the command line, it will be set
- If an input file is specified on the command line, it will
be loaded (using the input file format specified on the command line, if any)
- If a perl string is specified, it will be evaluated
- If a perl file is specified, it will be evaluated
- If an output file and output file format are specified, the current timing
diagram will be saved to that file in that format. It is an error to specify the
file and not the format.
See Chapter 15: Writing Waveperl Scripts for more information in the on-line help.
1) Product Command Line Parameter (-p)
All SynaptiCAD products 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. If the executable is invoked as syncad.exe --product testbencherpro it
will load TestBencher Pro. The valid values for this option are:
|wfl, wflite, waveformlite, or waveformerlite
|Timing Diagrammer Pro
|td, tdp, timing, or timingdiagrammerpro
|wf, wfp, waveform, or waveformerpro
|bughunter, bughunterpro, bh, bhp
|ds, dsp, datasheet, or datasheetpro
|tracker, transactiontracker, tt
|tb, tbp, tbench, testbencher, or testbencherpro
If no product option is specified on the command line, then it will load whatever it was run as last.
2) Default Simulator for new projects (-S)
This option controls the simulator that is used for new projects. If not specified, new projects will
default to using the last selected simulator. The valid values for this option are:
|ModelSIM SE VHDL
|ModelSIM VHDL (non-SE)
3) Evaluate Perl Script Command Line Parameter (-s)
TestBencher Pro has a Perl interpreter built in, to enable easy customization. The --eval-perl-script
filename option allows you to have TestBencher Pro run an arbitrary perl script after it
loads. The filename argument can be either an absolute path to the script or a path relative to the
directory from which TestBencher Pro was run.
The script can be any valid perl script. The script will have access to all of the functions in TestBencher
Pro's perl interface.
The perl script is evaluated in the main thread of TestBencher Pro; the application will be unresponsive
while the script is running. If you create an infinite loop, TestBencher Pro will hang indefinitely.
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 file called "basename.vcd".
The filter file lists the names of the signals to read out of 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
#import the signals from a vcd file named "basename.vcd"
#export the signals to a test vector spreadsheet file named "basename.cbc"
4) Evaluate Perl String Command Line Parameter (-t)
This is similar in function to the --eval-perl-script except that it evaluates its argument as if it
were the contents of a script.
For example, the following command would launch TestBencher Pro and notepad at the same time:
syncad.exe --product testbencherpro
To compare the file test.txt with test2.tim you could use the following commands:
syncad.exe -ptbp --eval-perl-string
Another way to automatically compare these files is to embed the commands into a perl file:
syncad.exe -ptbp --eval-perl-file temp.pl
if tmp.pl contained
5) Enable Batch Mode Command Line Parameter (-b)
If Batch mode is specified, TestBencher Pro will run in batch mode, in which it will not display anything
on the screen. This is useful when you want to invoke TestBencher Pro 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.
6) Exit After Processing Arguments Command Line Parameter (-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).
7) Input File (deprecated) Command Line Parameter (-i)
This option specifies a file to load on startup. The filename can be either relative to the current
directory or absolute. 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 menu.
However, if you are doing a batch file conversion, the file will not be displayed -- it will be used
as the input for the file conversion. For more information on batch file conversions, see the --export
The --import and --filter files alter how the file is loaded.
Note: the preferred way to specify an input file is by using a perl script. The OpenFile( ) function
should do what you want.
8) Import Format (deprecated) Command Line Parameter (-m)
This option specifies the file format of the input file. If this is left unspecified, TestBencher Pro
will attempt to automatically determine what file format to use. This works for most files, but there
are some formats which it cannot discriminate. This option is case-sensitive.
You can get the complete list of the valid values for this option by going to the Export | Add or Execute
Script menu and selecting the script type Import from the resulting dialog box. 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.
Note: the preferred way to specify the input file format is by using a perl script. The (optional) second
parameter to the OpenFile( ) function should do what you want.
9) Input File Filter (deprecated) Command Line Parameter (-f)
This command-line argument sets the filter file used when loading a diagram or performing a batch file
conversion. Specifying the empty string ("") for a filter file forces TestBencher Pro not to use a filter
file. This option does the same thing as the Options | Set Filter File. menu item does during interactive
Filter files behave a little oddly, though. If you set a filter file during interactive an interactive
session, it will be used each time you run TestBencher Pro until you specifically tell it not to use
the filter file. If you don't specify a filter file on the command line and the user was using a filter
file the last time they shut down TestBencher Pro, it also will be applied to input files specified
on the command line. This is usually what you want it to do, unless you are doing batch file conversions.
If you want to make sure that no filter is applied to files, use this option but specify the empty string
("") as the filter.
Note: the preferred way to specify a filter file is to use the perl interface. The SetFilterFile( )
function does this. The call to SetFilterFile( ) should be placed before the call to OpenFile( ) in
order to have the same effect as this option does.
10) Output File (deprecated) Command Line Parameter (-o)
This option specifies the output file when doing file format conversions. If you specify this option,
you must also specify output format.
Note: the preferred way to output data to a file is to use the SaveFile( ) function from the perl interface.
11) Output File Format (deprecated) Command Line Parameter (-e)
This command-line argument sets the format of the output file. This option is only useful in batch mode,
where it decides the format for the file specified by the --output argument. You can get the complete
list of the valid values for this option by going to the Export | Add or Execute Script menu and selecting
the script type Export from the resulting dialog box. The valid values will be listed in the first column.
|Timing Diagram (*.tim)
|Timing Diagram - Binary (*.btim)
|Waveform Filter - Binary (*.tim)
|Free Parm (*.fp)
|Text Free Parm (*.txt)
|Text Free Parm with Margins (*txt)
|Timing Analysis Report (*.txt)
|VHDL w/ Top Level Test Bench (*.vhd)
|Verilog w/ Top Level Test Bench (*.v)
|SystemC Transactor (*.cpp)
|Workview CMD (*.cmd)
|PI-2005 Pattern Generator (*.txt)
|Agilent 167xx Pattern Generator (binary)(*.pgb)
|Agilent 169xx Pattern Generator Full Mode (*.pgb)
|Agilent 169xx Pattern Generator Half Mode (*.pgb)
Note: the preferred way to specify an output format is to use the (optional) second parameter to the
SaveFile( ) function provided by the perl interface.