TUP(5ICD)

NAME
tup - place terminals in current cell

SYNOPSIS

tup (key, index, instance, pattern, dx, nx, dy, ny)
char *key;
int index;
char *instance, *pattern;
int dx, nx, dy, ny;

vtup (termvec, pattern, dx, nx, dy, ny)
TERMVEC *termvec;
char *pattern;
int dx, nx, dy, ny;

atup (key, instance, pattern)
char *key, *instance, *pattern;

vatup (termvec, pattern)
TERMVEC *termvec;
char *pattern;

PARAMETERS
can be just a name of a terminal, index (see below) is then used to further identify the terminal in case of a repetition. Alternatively, key can begin with a '%', followed by one or more layer and side specifiers, to select specific terminals of the instance to be tupped. A side specifier is a 'l', 'r', 'b' or 't' character, selecting only terminals on the respective sides to be tupped. A layer specifier depends on the technology at hand, and specifies that only terminals on the respective layers are to be tupped. For example, in our standard NMOS process, a valid layer specifier is one of 'p', 'd' or 'm'. As a shorthand, not giving any side specifier selects all sides and not giving any layer specifier selects all layers. Thus, in our standard NMOS process, just giving "%" for key is identical to "%lrbtpdm". specifies the index'th repeated terminal in the x-direction for bottom and top terminals, and in the y-direction for left and right terminals. Some negative value of index signals that all terminals which are selected by key, are to be placed in the current cell. is a name referring to a subcell in the current cell. It is the name of the INST node in the LDMC datastructure of the subcell. The name of the INST node will be the instance name of the mc statement if an instance name was specified there, and the cell name otherwise. In the latter case, only the latest call for a cell is remembered, see ms(5ICD). specifies how the new terminal is to be named. Each lower case character, digit or underscore in pattern occurs literally in the terminal name, but some other characters in pattern are special: & - This character behaves like the 'ditto' character in the substitute mechanism of the Unix ex-editor. It is replaced in the new name by the old terminal name, the side-specifier (an initial 'l', 'r', 'b' or 't') is, however, first stripped off. + - This character stands for the original side specifier of the old terminal name. So, "+&" in pattern stands for the complete old terminal name. * - This character stands for the appropriate side specifier as depends on the actual side of the subcell where the terminal is located, taking into account the actual orientation (mirror and rotate) of the subcell. A pattern string "*&" will often be a convenient way to give the new terminals a name. # - This character stands for the value of the index member of the TERM node belonging to the terminal if the terminal has a repetition parallel to the side of the terminal. If the terminal has no repetition parallel to the side of the terminal, this character is skipped. $ - The index member even if the terminal has no repetition parallel to the side of the terminal. Other characters in pattern are forbidden and generate an error message. specify a repetition for the terminal statements that are generated by tup. However, tup will not generate an array of terminals. In stead, terminals on the left and right side of the subcell can only have a repetition in the y-direction, given by dy and ny. Also, bottom and top terminals can only have a repetition in x-direction. But, dx and nx are not meaningless for left and right terminals. If dx>0, the right terminals will get an right-shift of (dx*nx), and when dx<0, the left terminals will get an left-shift of (dx*nx). Similarly, the bottom and top terminals can be shifted. is a pointer to a NULL-terminated array of TERM pointers, and specifies which terminals must be tupped for the the vtup and vatup functions.

DESCRIPTION
Tup (mnemonic: Terminals up) is a function which places a terminal in the current cell above each terminal specified by key and index in a subcell specified by instance. Thus, this function is convenient to provide the current cell with terminals at appropriate places (i.e. above the terminals of its subcells). Then, it will be possible to use the current cell for abutment (see abut(5ICD)) or to determine its pitch, see pitch(5ICD). Vtup works on the terminals specified by the termvec parameter. This parameter specifies the terminals to be tupped just as the combination of the parameters key, index and instance of tup does. Atup is a tup function with automatic repetition. The repetition distance and count of the new terminals is the same as the repetition distance of the terminals that are tupped. However, bottom and top terminals can only have a repetition in x-direction, and left and right terminals can only have a repetition in y-direction. Vatup works on the terminals specified by the termvec parameter. The fact that these functions will not generate a two-dimensional array of terminals is very useful for the "tupping" of an array of (identical or unidentical) cells, like an andplane of a pla. One can now simply say
    tup("%",-1,"placell","*&",xpitch,nrins,ypitch,nrterms); and when xpitch, nrins, ypitch and nrterms are integers with an appropriate value, the andplane will get terminals around its edges.

SEE ALSO
ldmcintro(5ICD)