next up previous contents index
Next: CIF Format Extensions Up: Design Data File Formats Previous: Physical Mode Cell Properties   Contents   Index


The CIF File Format

The Cal (Tech) Intermediate Format (CIF) was developed at Cal Tech in the earliest days of design automation. The format, such as it is (there are many dialects), is public domain. Though possibly still used in educational and research environments, it is unusual in current commercial IC engineering.

The format used in native cell files and the device library file is an extension of the CIF file format. Through extension, this format is robust enough to meet the needs of Xic while retaining the syntactic simplicity of the original format. This section outlines the basic syntax of CIF, while the next section will provide details about the extensions used by Xic.

In CIF, ``lines'' are terminated with semicolons. The line feed and carriage return characters are taken as white space and ignored, and may not even be present, so the ``lines'' are actually logical only.

Comments in CIF are enclosed in parentheses. Comments are ignored in CIF, however Xic uses special comment lines for various purposes, as will be seen in the next section.

(This is an example comment);
Note that this (and all) CIF lines must be terminated with `;'.

The first one or two non-whitespace characters of a line (i.e., following `;') are used as a command key. In strict CIF, this key is a letter, though numbers have been adopted as widely-used extensions.

Historically, in CIF the word ``symbol'' has been used to refer to what in current terminology is referred to as a cell. When describing CIF, the terms ``symbol'' and ``cell'' are used as synonyms.

The DS (define symbol) directive begins a symbol (cell) definition.

DS symnum A B;
In strict CIF, symbols do not have names, but are referenced by symbol number. The assigned symbol number (an integer) follows DS. The remaining two parameters are for scaling. Each coordinate in the symbol is scaled by A/B. The use of two integers rather than a single floating point value was once considered a speed optimization. Xic never uses the symnum or scaling factors in native files:
DS 0 1 1;

The definition of a symbol is terminated with a DF line,

DF;

Within the symbol definition, there are layer directives, followed by geometry specifications, and subcell calls. A layer directive consists of a line with the form

L layername;
where layername is a name for a layer. In traditional CIF, the layername is an alphanumeric text token of four characters or fewer. All geometry which follows a layer declaration will be assigned to that layer, until the next layer declaration.

There are three types of CIF geometric objects used by Xic: boxes, polygons, and wires. Boxes have the form

B width height x y [rx ry];
where the first two parameters are the box width and height, and the second two parameters are the coordinates of the midpoint of the box. The last two parameters are optional, and indicate a rotation. The two numbers define a vector with respect to the origin, and the angle represents the angle by which the box should be rotated. Xic never uses the rotation parameters for boxes. Non-Manhattan rotated boxes are converted to polygons.

Ordinarily, boxes are rendered according to the attributes of the layer on which the box is defined. In Xic electrical mode, boxes on the SCED layer use that attribute, however boxes on other layers are rendered as a dotted outline with no fill. The SCED layer defaults to solid fill, other layers default to empty fill. All physical layers default to empty fill.

Polygons are specified with P followed by x-y coordinate pairs. The first and last coordinates must be the same, indicating closure of the polygon.

P x0 y0 x1 y1 ... xN yN x0 y0;
The polygon is rendered using the fill attributes of the layer on which the polygon is defined. There should be at least four pairs of coordinates defined for a polygon.

Wires are fixed-width paths. A wire is specified with W followed by the width, which is followed by x-y coordinate pairs representing the path.

W width x0 y0 x1 y1 ... xN yN;
In electrical mode, the basic line primitive is a zero width wire. In physical mode, wires are defined with finite width as a physical necessity. The coordinates will form the vertices of the path. A wire can technically consist of a single vertex, which will be rendered as a box with the width of the wire. This construct is disallowed in Xic, and should be avoided. Wires are rendered with the fill attribute of the layer on which the wire is defined.

A symbol call (subcell) is indicated with a C, followed by the symbol number, followed by a transformation specification. The transformation if made up of components representing translation, rotation, and reflection. Translation is indicated by T followed by the translation:

T x y
Rotation is specified by R, followed by two numbers which represent a vector with respect to the origin, the angle of which is the angle of rotation. Many parsers recognize only orthogonal rotations. Xic recognizes angles that are multiples of 45 degrees.
R rx ry
Mirroring about the y-axis is specified with
MX
and about the x-axis with
MY
The transformation specification is a concatenation of these directives, which are evaluated in sequence to obtain the coordinate mapping from the cell coordinates in the symbol being instantiated to the cell coordinates of the parent of the instance. The overall syntax is
C symnum transform;
where an example would be
C 0 R 1 0 T -1000 0;

The parsing is terminated with an end directive:

END
This line need not be terminated with a semicolon.

The base coordinate system specified for CIF uses 100 units per micron.


next up previous contents index
Next: CIF Format Extensions Up: Design Data File Formats Previous: Physical Mode Cell Properties   Contents   Index
Stephen R. Whiteley 2024-09-29