next up previous contents index
Next: The Misc Config Button: Up: Extraction System: Setup and Previous: Device Templates   Contents   Index


Format Library File

Xic provides a mechanism for user-specified formatting of physical and electrical netlist output. Such formatting is generated by scripts found in a file named ``xic_format_lib''. This file need not exist if user formatting is not required.

An example xic_format_lib file is included in the distributions. This provides two examples each, for physical and electrical output. In either case, the first example is the Cadence Design Exchange Format (DEF), which is an industry-standard ASCII netlist format. The second format in each case is a simple example, not a ``real'' format. The example library is found in the startup directory, and can be used as-is or as a starting point for customization. The example format scripts include instructive comments.

The xic_format_lib file is searched for in the library search path, and the first such file found will be used.

There are three types of script that can appear in the file: those for generating netlists from physical data, those that generate netlists from electrical data, and those that format the output of LVS runs (this is not supported yet).

Blank lines, and lines that start with the `#' character, are ignored. There are four keywords (outside of the scripts) that are recognized:

PhysFormat name
ElecFormat name
LvsFormat name
EndScript

One of the first three of these keywords and its argument should appear on its own line ahead of a script, and ``EndScript'' should appear on its own line following a script. The name is the name of the format, which will appear on command or menu buttons or is given to script functions to indicate that the following script is to be used for formatting. This should be a short alpha-numeric word or phrase, and must be unique among keywords of a given type. If the name contains white space, it should be double-quoted.

The script lines can contain any of the script library functions and operators. All local variables are static. The script can call functions that have been previously defined in a regular library file.

When the script is executed:

When the script is executing, the following predefined variables are available for use in the script.

Name Type Description  
_cellname string name of the cell being output
_viewname string ``physical'' or ``electrical''
_techname string TechnologyName value from technology file
_num_nets integer number of wire nets in cell
_mode integer 0 if physical, 1 if electrical
_list_all integer 1 if list all cells active, 0 otherwise
_bottom_up integer 1 if list bottom-up active, 0 otherwise
_show_geom integer 1 if include geometry active, 0 otherwise
_show_wire_cap integer 1 if show wire cap active, 0 otherwise
_ignore_labels integer 1 if ignore labels active, 0 otherwise

The script will use functions that iterate through the cell and print the desired information in an order and format desired. The function library is being expanded to provide flexibility.


next up previous contents index
Next: The Misc Config Button: Up: Extraction System: Setup and Previous: Device Templates   Contents   Index
Stephen R. Whiteley 2022-05-28