L NC;
sets the layer to NC, which often stands for the NMOS contact hole.
The BOX statement (or the letter B) is the most commonly used way
of specifying geometry. It describes a rectangle by giving its length, width,
center position, and an optional rotation. The format is as follows:
B length width xpos ypos [rotation] ;
Without the rotation field, the four numbers specify a box the center of
which is at (xpos, ypos) and is length across in x and width tall in y. All
numbers in CIF are integers that refer to centimicrons of distance, unless
subroutine scaling is specified (described later). The optional rotation field
contains two numbers that define a vector endpoint starting at the origin. The
default value of this field is (1, 0), which is a right-pointing vector. Thus
the rotation clause 10 5 defines a 30-degree counterclockwise rotation from
the normal. Similarly, 10 -10 will rotate clockwise by 45 degrees. Note that
the magnitude of this rotation vector has no meaning.
The WIRE statement (or the letter W) is used to construct a path
that runs between a set of points. The path can have a nonzero width and has
rounded corners. After the WIRE keyword comes the width value and then an
arbitrary number of coordinate pairs that describe the endpoints. Figure B.1
shows a sample wire. Note that the endpoint and corner rounding are implicitly
handled.
The ROUNDFLASH statement (or the letter R) draws a filled circle, given the diameter and the center coordinate. For example, the statement:
R 20 30 40;
will draw a circle that has a radius of 10 (diameter of 20), centered at (30, 40). The POLYGON statement (or the letter P) takes a series of coordinate pairs and draws a filled polygon from them. Since filled polygons must be closed, the first and last coordinate points are implicitly connected and need not be the same. Polygons can be arbitrarily complex, including concavity and self-intersection. Figure B.2 illustrates a polygon statement.
|
C 4;
will cause the box to be drawn on that layer. In addition to simply invoking the subroutine, a CALL statement can include transformations to affect the geometry inside the subroutine. Three transformations can be applied to a subroutine in CIF: translation, rotation, and mirroring. Translation is specified as the letter T followed by an x, y offset. These offsets will be added to all coordinates in the subroutine, to translate its graphics across the mask. Rotation is specified as the letter R followed by an x, y vector endpoint that, much like the rotation clause in the BOX statement, defines a line to the origin. The unrotated line has the endpoint (1, 0), which points to the right. Mirroring is available in two forms: MX to mirror in x and MY to mirror in Y. Mirroring is a bit confusing, because MX causes a negation of the x coordinate, which effectively mirrors about the y axis! Any number of transformations can be applied to an object and their listed order is the sequence that will be used to apply them. Figure B.3 shows some examples, illustrating the importance of ordering the transformations (notice that Figure B.3(c) and Figure B.3(d) produce different results by rearranging the transformations).
Defining subroutines for use in a CALL statement is quite simple. The statements to be packaged are enclosed between DS (definition start) and DF (definition finish) statements. Arguments to the DS statement are the subroutine number and a subroutine scaling factor. There are no arguments to the DF statement. The scaling factor for a subroutine consists of a numerator followed by a denominator that will be applied to all values inside the subroutine. This scaling allows large numbers to be expressed with fewer digits and allows ease of rescaling a design. The scale factor cannot be changed for each invocation of the subroutine since it is applied to the definition. As an example, the subroutine of Figure B.3 can be described formally as follows:
DS 10 20 2;
B10 20 5 5;DF;
W1 5 5 10 15;
Note that the scale factor is 20/2, which allows the trailing zero to be dropped from all values inside the subroutine. Arbitrary depth of hierarchy is allowed in CIF subroutines. Forward references are allowed provided that a subroutine is defined before it is used. Thus the sequence:
DS 10;
...DF;
C 11;
C 10;
is legal, but the sequence:
C 11;
DS 11;
...DF;
is not. This is because the actual invocation of subroutine 11 does not occur until after its definition in the first example.
|