LL_ABUT(5ICD)

NAME
ll_abut - LDMC abutment primitive

SYNOPSIS

#include <ll_abut.h>

INST *ll_abut (side, ip, mp, inst_name, opts)
int side;
INST *ip;
MODEL *mp;
char *inst_name;
struct ll_abut_opts *opts;

PARAMETERS
specifies the side of the instance specified by ip to which the cell is abutted. is a pointer to an INST node, specifying an instance to which the cell specified by mp is to be abutted. is a pointer to the MODEL node of the cell to be instantiated. is a character pointer to the instance name of the new instance, and may be NULL if an instance name is not desired. is a pointer to a ll_abut_opts options structure. If the default options are suitable, this parameter may be NULL. Otherwise, the user must define a private options structure and initialize it to DEFAULT_ABUT_OPTS to guarantee forward software compatibility.
Currently the supported options are:
    repetition distance in x-direction. If opts.dx==0 and opts.nx>0, the function pitch is called to determine the horizontal repetition distance. If the cell is abutted to left of some instance, a negative repetition distance is used. That is, the value obtained from pitch is negated before it is used. repetition count in x-direction, 0 if no repetition (default). repetition distance in y-direction. See also (mutatis mutandis) under opts.dx. repetition count in y-direction, 0 if no repetition (default). mirror the cell before abutting. Legal values for this option are M0 (default), MX and MY. rotate the cell before abutting. Legal values for this option are R0 (default), R90, R180 and R270. They specify the rotation in degrees counter-clockwise. Legal values for this option are:
        0 - Don't overlap (default).
        1 - Try to overlap terminals as much a possible. Terminals in front of each other that do not touch, can be connected. The value and meaning of opts.connect is as follows:
        0 - don't connect.
        1 - call the function connect (default). If this option is 0 (default), the river routing is off. If this option is 1, use river routing to connect both cells. The cells are placed to minimize river routing area.

DESCRIPTION
Ll_abut is the LDMC kernel function for abutment. This function will generate a mc-statement placing the cell specified by mp at a position such that the terminals of this cell abut the terminals of the instance.

RETURN VALUE
If there where no errors, a pointer to the new INST node is returned, NULL otherwise.

EXAMPLE
The next example shows how to define an abut function that can mirror and rotate a cell before abutting.
#include <stdldmc.h>
#include <ll_abut.h>
/* my_abut - an abut function with mirroring and rotation */
my_abut (side, cell, instance, inst_name, mir, rot)
int side, mir, rot;
char * cell, * instance, *inst_name;
{
	static struct ll_abut_opts opts = DEFAULT_ABUT_OPTS;
	opts.mir = mir;
	opts.rot = rot;
	ll_abut (side, getinst (instance), getmodel (cell), inst_name, &opts);
}

SEE ALSO
ldmcintro(5ICD)