LL_RIVER(5ICD)

NAME
ll_river - LDMC river routing facility

SYNOPSIS

#include <ll_river.h>

ll_river (tv1, tv2, opts)
TERMVEC *tv1, *tv2;
struct ll_river_opts *opts;

PARAMETERS
specifies a vector of pointers to TERM nodes. The terminals must be sorted on coordinate value. specifies another vector of pointers to TERM nodes. The terminals denoted by this vector will be connected to the terminals denoted by tv1. is a pointer to an ll_river_opts options structure. If the default options are suitable, this parameter may be NULL. Otherwise, you must define a private options structure and initialize it to DEFAULT_RIVER_OPTS to guarantee forward software compatibility. Currently the supported options are:
    (default 0) If 1, the ll_river function will compute a lateral translation (perpendicular to the direction of the wires that are created) of the terminals in tv2, so as to mimimize the total routing area. The wires are then layed down in accordance with the modified position of the terminals. This is useful in case tv2 corresponds to terminals of a not yet placed cell, i.e. when tv2 was obtained from mgetterm, but it is the responsibility of the user to assure that the cell is in fact placed in the computed position afterwards. This position is stored in opts.tx and opts.ty respectively. (default 0) The same as opts.shift for the direction paralel to the direction of the wires. Output parameter, see opts.shift and opts.place .

DESCRIPTION
River routing can be used to connect cells of which the terminals do not align, but which can be connected in such a way that the wires do not cross each other.

Ll_river is the LDMC river routing primitive. It connects subsequent terminals of tv1 to corresponding terminals of tv2 with the same layer. The wires that are created are straight if the terminals align or consist of 3 pieces if they don't.

Ll_river operates for each layer separately. Thus, wires in different layers can overlap or cross each other.

EXAMPLE
This example outlines how to abut 2 cells with a river routing channel between them. The actual position of the new cell is computed by the river router and the wiring is created, after which the cell is actually layed down:
#include <stdldmc.h>
#include <ll_river.h>
...
{
	static struct ll_river_opts opts = DEFAULT_RIVER_OPTS;
	...
	opts.shift = 1;
	opts.place = 1;
	...
	ll_river (itv, mtv, &opts);
	...
	tx = opts.tx + mp -> xl;	/* compensate for origin */
	ty = opts.ty + mp -> yb;
	mc (inst_name, mp -> name, 0, 0, tx, ty, 0, 0, 0, 0, "");
	...
}

SEE ALSO
ldmcintro(5ICD)