GETMODEL(5ICD)

NAME
getmodel, getinst, mgetterm, igetterm - query LDMC data structure

SYNOPSIS

MODEL *getmodel (cell)
char *cell;

INST *getinst (instance)
char *instance;

TERMVEC *mgetterm (key, t_index, cell)
char *key;
int   t_index;
char *cell;

TERMVEC *igetterm (key, t_index, i_index, instance)
char *key;
int  t_index, i_index;
char *instance;

PARAMETERS
is a character string specifying a MODEL node in the LDMC datastructure. is a character string specifying an INST node in the LDMC datastructure. As explained in ldmcintro(5ICD), instance can be the instance name of the subcell, or its cell name. is a character string specifying one or more TERM nodes in the LDMC datastructure, belonging to the specified INST node. Key can be of one of the following forms:
    just a terminal name
    "%[side-specifier(s)][layer-specifier(s)]"
is an integer specifying the index'th repeated terminal matched by key. The special value ALL_INDEX specifies all terminals matched by key. specifies the index'th repeated instance in the direction parallel to the side of the terminal that is specified by key. The special value ALL_INDEX again specifies a don't care condition.

DESCRIPTION
Getmodel returns a pointer to the named MODEL node in the LDMC datastructure.

Getinst returns a pointer to the named INST node of the current cell. If the instance is not found in the current cell and this is a nested cell, the stack is searched.

Mgetterm returns a pointer to a NULL-terminated vector of pointers to TERM nodes specified by key and index belonging to the specified cell. Key can be just a name of a terminal, index 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 cell. A side specifier is a 'l', 'r', 'b' or 't' character, selecting only terminals on the respective sides. A layer specifier depends on the technology at hand. E.g., for the default NMOS process the layer specifiers are 'p', 'd' or 'm' characters, selecting only terminals on the np, nd or nm layer respectively. As a shorthand, not giving any side specifier selects all sides and not giving any layer specifier selects all layers. Thus, just giving "%" for key is identical to "%lrbtpdm". Igetterm returns a pointer to a NULL-terminated vector of 'instantiated' TERM nodes of the named instance.

SPECIAL CONSIDERATIONS
Mgetterm and igetterm maintain two buffer areas where the terminal nodes are stored, and the return value of these functions alternates between pointing to each one of these with every call for mgetterm or igetterm. This means that only the result of the last two calls for either of these functions is useful. You can use the ll_getterm primitive or save the result somewhere if this is not sufficient.

SEE ALSO
ldmcintro (5ICD), ll_getterm (5ICD)

DIAGNOSTICS
These functions do not complain when they can't find a node, but simply return a NULL pointer. This way, the user can elegantly check whether a cell is already defined or still has to be created, etc.