Caltech Intermediate Form - Hierarchy

Hierarchy

The CALL statement (or the letter C) invokes a collection of other statements that have been packaged with DS and DF. All subroutines are given numbers when they are defined and these numbers are used in the CALL to identify them. If, for example, a LAYER statement and a BOX statement are packaged into subroutine 4, then the 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.4 shows some examples, illustrating the importance of ordering the transformations (notice that Figs. B.4c and B.4d 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 Fig. B.4 can be described formally as follows:

DS 10 20 2; B10 20 5 5; W1 5 5 10 15; DF;

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; ... C 11; DF; DS 11; ... DF; 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.

Read more about this topic:  Caltech Intermediate Form

Famous quotes containing the word hierarchy:

    In the world of the celebrity, the hierarchy of publicity has replaced the hierarchy of descent and even of great wealth.
    C. Wright Mills (1916–1962)

    In a hierarchy every employee tends to rise to his level of incompetence.
    Laurence J. Peter (1919–1990)