next up previous contents index
Next: Server Mode Up: Using Xic Previous: Cell Organization and Libraries   Contents   Index

Batch Mode

Xic has a batch mode of operation, where Xic will start without graphics, run commands, and exit. Batch mode is signaled by giving the -B option in the command line, in one of the following forms:


In the first form, the path to a file containing Xic script statements immediately follows ``-B'' with no space. The statements in the script file will be executed after the first input file is loaded. If no input file is given on the command line, the script will be executed after the default ``noname'' cell is loaded.

It is possible to pass parameters to the batch-mode scripts from the command line. The comma is used as a delimiter. Commas in the line that remain in single or double quotes after the shell has treated the line are not taken as separators. The entire construct should not have any embedded white space, except when single or double quoted as part of the values.

The param1, param2, etc. are the names of variables that will be defined in the execution context of the script. These variables will be set to value1, value2, etc. The values are numbers, strings, or executable text. Values that contain white space must be quoted, but note that the shell will strip the quote marks, so that a string constant should be single and double quoted as shown below.


xic -Bmyscript,p1=1.234,p2='"a string"',p3="p1 + 1"

This translates into the virtual addition of three lines to the beginning of the script:

p1 = 1.234
p2 = "a string"
p3 = p1 + 1

In the second form, the ``-B'' is immediately followed by another `-' and one of the command keywords listed below. After the first cell is loaded (or ``noname'' if no input file was named in the command line) the command will be executed. The recognized commands are listed below.

The command name can be immediately followed by an argument string that begins with the `@' character. The arguments are specific to the command. Multiple arguments can be separated by `@' characters, or by white space if quoted.

The .xicstart file is read and executed (if it exists) before the first cell is loaded, and all other initialization is performed in the normal sequence. The commands below are simple shortcuts to common operations. If unavailable options are required, then these can either be set in a .xicinit or .xicstart file, or the first form of the -B option should be used.

tocgx, tocif, togds, tooas, toxic
These write the hierarchy under the current cell to CGX, CIF, GDSII, OASIS, and native cell files, respectively. They perform file conversion by reading a file into Xic, then writing it out in the specified format. The FileTool utility and -F command line option provide a far more powerful format translation capability.

The default name for the file written is the name of the current cell, suffixed with ``.cgx'', ``.cif'', ``.gds'', and ``.oas'' for the four archive file formats. Native cell files always have the same name as the cell contained.

These commands can take the following options. The options are separated from the command name and from one another by `@' characters, and consist of a single character identifier, an optional `=' character, and a value.

The outfile is the name of the file to be generated. If not provided, the file name will be the name of the top-level cell suffixed with an extension appropriate for the format. In the case of toxic, the outfile is a path to a directory where the cell files will be created.

The scale is a floating point value from 0.001 to 1000.0 which applied when the file is written.

l=+|-lname[,lname ...]
This option specifies a list of layer names. The first character in the list is a + or - to indicate that only the listed layers will be output, or that all layers except the listed layers will be output, respectively. Immediately following is a layer name, optionally followed by additional layer names separated by commas.

The letter `e' can be immediately followed by an integer 0-3. This sets the empty cell filtering level, as described for the Format Conversion panel in 14.10. The values are

e or e1 Use both pre- and post-filtering.
e2 Use pre-filtering only.
e3 Use post-filtering only.
e0 No empty cell filtering (no operation).

This flag option indicates that the output will contain a flat representation of the cell hierarchy. If the w option is given, only objects that overlap the window area will be present in output. This option will not work with toxic.

This specifies a rectangular area, in microns, for use when flattening.

This flag indicates that when flattening with a window (both f and w options also given) objects will be clipped to the window boundary in output.


xic -B-togds@o=file1.gds@w=100,200,200,300@fc@l=+0600 myfile.gds

This will create file1.gds, containing objects on layer 0600 within the window area, flattened and clipped. Note that the @ separation character is actually optional after flags, and other options which are not lists or strings.

Design rule checking is performed, and results are written to a log file.

There are optional arguments that can be provided, separated from the command name and from each other with `@' characters.

This provides an area, given in microns, of the top-level cell where checking will be performed. The value consists of four comma-separated floating-point numbers. If not given, the entire cell will be checked.

This provides the maximum batch-mode error count, checking will terminate when this count is reached. The maxerrs is an integer 0-100000, with 0 indicating no limit. This will override the maximum error count set in the technology file, if any.

This sets the error recording level to use when checking. The level is an integer 0-2. These correspond to recording one error per object, one error of each type per object, or all errors. This will override the recording level set in the technology file.

This a flag, not followed by an `=' sign or value. If given, the file which was the source of the current cell will be deleted from the disk when DRC completes. This facilitates cleaning up temporary files, but obviously should be used with care.

In batch mode, the log files for reading and writing of files are written to the current directory.

next up previous contents index
Next: Server Mode Up: Using Xic Previous: Cell Organization and Libraries   Contents   Index
Stephen R. Whiteley 2017-03-22