next up previous contents index
Next: Native Symbol File Format Up: Symbol 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. 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. If the boolean variable CifOldWire is set with the !set command or otherwise, generated output will use the old wire format, providing backwards compatibility. The old format used a separate property to define the wire style, which is less efficient than the new format. For example:

    5 7033 PATHTYPE 0;
    W 1000 10000 12000 20000 12000;

  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. Cell instance lines can be preceded by an array extension line of the form
    1 Array nx 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.

  5. Cell instances can be preceded by a magnification extension of the form
    1 Magnify scale_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 should appear in physical cell descriptions only. It is unique to Xic.

  6. Cell instances can also 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.

  7. 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 character of the physical cell. In Xic the cell terminator is the single character E. 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 character. Again, the terminating character is E, however if Strip For Export is active the terminator is End for compatibility reasons.

Xic normally uses a resolution of 1000 units per micron in unstripped CIF and native files, signaled with the addition of a comment line ahead of the first symbol definition:

(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 1000 units when writing a CIF file without the Strip For Export button active, and 100 units otherwise.


next up previous contents index
Next: Native Symbol File Format Up: Symbol File Formats Previous: The CIF File Format   Contents   Index
Stephen R. Whiteley 2006-10-23