next up previous contents index
Next: Native Cell File Format Up: Design Data File Formats Previous: The CIF File Format   Contents   Index


CIF Format Extensions

There have been numerous extensions to the CIF syntax used to enhance the capabilities of the original format. Some of these extensions have been accepted widely and have become essentially part of the standard. Xic uses these extensions, plus some further extensions, in native format files and in files converted to CIF without the Strip For Export button active. These extensions to the basic CIF syntax are enumerated below. Unless stated otherwise, the extension is applied identically in native cell files and CIF output.

  1. The DS (define symbol) line is always followed by a cell name extension line of the form
    9 symbol_name;
    This extension is widely used, and is a standard means for including the symbol names within the CIF framework.

    In native cell files, however, the DS line is preceded by the symbol name line.

  2. In Xic releases prior to 3.0.0, the symbol number part of an instance call was set to 0, i.e., the call sequence was always
    C 0 ...;
    when cell name extensions were used. Since cell names were provided through the extensions, the cell numbering is unneeded. In current releases, the cell numbering is retained and will appear in the instance calls, in all CIF output.

    In CIF, the name of the cell being instantiated may precede the ``C ...'' (symbol call) line, using the same format as associated with the DS line, i.e.

    9 master_name;
    C N ...;
    This is redundant, since the master name can be obtained from the symbol number.

    In native cell files, this line follows the C line. This line is required in native cell files, as there is no symbol numbering.

    In native cell files only, instead of a cell name, the string can contain a full path to a layout file in one of the supported formats, which must use one of the recognized file extensions. For example:

    C 0 ...;
    9 /path/to/directory/containing/myfile.gds;
    When the cell file is read into the Xic main database, the archive will be read in as well, and the instantiation master will become the top-level cell (there must be one only) in the archive file. A table is retained of the top-level cell to file path associations, and the path is used (rather than the top-level cell name) it the parent cell is later saved as a single native cell file.

  3. Labels are specified with a unique syntax:
    94 «label string» x y code width height;
    This is a further extension of a widely-used extension for labels, which does not have the code, width, or height fields and the delimiters around the label. The original extension also required that the string contain no white space.

    The width and height are the dimensions of the untransformed bounding box of the label. The label will be stretched to fill this area. The label is surrounded by « ». The x and y are the reference coordinates, which by default is the lower left corner of the bounding box. The code entry specifies transformations applied to the label at the reference point, and other rendering information, as shown in the table.

    bits 0-1 rotate the text about x,y
      00 no rotation
      01 90 degrees
      10 180 degrees
      11 270 degrees
    bits 2-3 bit 2 = 1, mirror y after rotation
      bit 3 = 1, mirror x after mirror y
    bit 4 bit 4 = 1, shift rotations to 45, 135, 225, 315 degrees
    bits 5-6 horizontal justification, 00, 11 left, 01 center, 10 right
    bits 7-8 vertical justification, 00, 11 bottom, 01 center, 10 top
    bits 9-10 GDSII font number

  4. Cells and instances can be preceded by properties of the general form
    5 prop_num prop_string;
    The property number prop_num is an arbitrary integer. The property string begins with the first non-space character following the integer, and ends with the semicolon (the semicolon is not included). The string can contain any alphanumeric, punctuation or white space but not `;' for obvious reasons. There are a number of properties used by Xic, particularly in electrical mode. This extension is widely used.

Xic writes the electrical information in a second symbol definition which immediately follows the physical cell definition in native files, but after the terminating token of the physical cell. Similarly, when Xic writes a CIF file without the Strip For Export function active, the electrical CIF representation immediately follows the physical CIF data, after the termination token.

In Xic releases prior to 3.0.0, the cell terminator was the single character E. This was used in both native cell files and unstripped CIF. In the present release, the cell terminator is always ``End'' in CIF, ``E'' in native cell files..

Whether or not these extensions are used when writing CIF output is controlled by a set of flags, which can be individually set from the CIF page of the Set Export Parameters panel. Actually, there are two banks of these flags, one bank is used when Strip For Export is set, the other bank is used when Strip for Export is unset. In the case of Strip For Export set, the flags all default to 0, so no extensions are used. In the case of Strip For Export unset, the flags all default to 1, so all extensions are used.

The user can set these flags individually through the Extension Flags menu in the CIF page of the Set Export Parameters panel. The bank of flags being set is determined by the state of the Strip For Export button and variable.

The flags in the menu have the following effects.

scale extension
Traditional CIF has a fixed resolution of 100 units per micron. This extension will add a comment of the form
(RESOLUTION nnn);
near the top of the file, and use nnn as the file resolution. The CIF reader must check for this comment and scale numerical values accordingly.

Xic normally uses internal units in unstripped CIF and native files, signaled with the addition of a comment line ahead of the first symbol definition something like:

(RESOLUTION 1000);
Xic will look for this comment, and interpret the coordinates accordingly. If no comment is found, the CIF default of 100 units per micron is assumed. Xic will always use internal units when writing a CIF file when this extension is enabled, and 100 units otherwise.

cell properties
Properties may be applied to cell definitions, ahead of the DS.

inst name comment
Comments of form
(SymbolCall cellname);
are added ahead of instance `C' calls.

inst name extension
Text in the form
9 cellname;
is added ahead of instance `C' calls.

inst magn extension
Cell instance `C' calls can be preceded by a magnification extension of the form
1 Magnify magn;
where magn is a magnification factor. All internal structure of the cell will be scaled by the given factor, which is a floating point number greater than zero. This extension will appear in physical cell descriptions only. It is unique to Xic.

inst array extension
Cell instance `C' calls can be preceded by an array extension of the form
1 Array x dx ny dy;
where nx and ny are the number of cells to array in the x and y directions, and dx and dy are the spacing between cells. This extension was used in earlier CAD programs.

inst bound extension
Cell instance `C' calls can be preceded by a bounding box extension of the form
1 Bound left bottom right top;
The left, bottom, right, top are the coordinates of the parent cell defining the bounding box of the subcell. This extension is not currently used, though it is written into the files. It is unique to Xic.

inst properties
Properties may be added ahead ahead of instance `C' calls.

obj properties
Properties may be added ahead of B (boxes), P (polygons), and W (wires).

wire extension
The end style of wires is not part of traditional CIF. In this extension, text of the form
1 7033 PATHTYPE n;
may be added ahead of wires to specify an end style. The values of n are 0 (flush ends), 1 (rounded ends), or 2 (extended ends, the default).

This extension was used in Xic prior to 2.5.23. It has been superseded by wire extension new, which will have precedence if both extensions are enabled.

wire extension new
This overrides wire extension, wires include an end-style designation:
W0 | W1 | W2 width x-y data;
The end style of wires is not part of traditional CIF. In this extension, the wire end style 0-2 immediately follows the `W', with the rest of the line as in traditional CIF. The end style is the same as the GDSII path type: 0 for flush ends, 1 for rounded ends, and 2 for extended square ends.

This extension was introduced in release 2.5.23. Older releases of Xic are not compatible with this extension.

text extension
Label string text is enclosed in « », and may include white space. Without this extension, white space characters in the label text will be replaced with underscores. In both cases, semicolons are replaced with underscores. This extension applies with any of the label format choices.


next up previous contents index
Next: Native Cell File Format Up: Design Data File Formats Previous: The CIF File Format   Contents   Index
Stephen R. Whiteley 2012-04-01