PWRoute.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Preas March 27, 1986 4:51:43 pm PST
Frank Bowers May 20, 1986 10:47:08 am PDT
DIRECTORY
CD,
D2Basic USING [Rect],
PW,
PWPins,
Rope USING [ROPE],
Route USING [Optimization, RoutingResult];
PWRoute:
CEDAR
DEFINITIONS
IMPORTS PW =
BEGIN
ROPE: TYPE = Rope.ROPE;
RouteType: TYPE = {channel, switchBox};
Rect: TYPE = D2Basic.Rect;
RefRect: TYPE = REF Rect;
Optimization: TYPE = Route.Optimization;
-- AbutChRoute: uses a channel router to connect adjacent objects; listOb contains objects that are to be interconnected by routing between each pair of objects. topListOb, bottomListOb (for AbutChRouteListX) and rightListOb, leftListOb (for AbutChRouteListY) carry pins that indicate nets to exit the channel from the ends; pin location are not significant for these objects. parms define routing layers and widths as well as how to construct hte nets from the pins. The returned object contains the objects in listOb in addition to objects that define the routing between pairs of objects; the size of the returned object is determined by area required for the routing.
AbutChRouteListX:
PROC [
listOb: PW.ListOb,
bottomListOb: PW.ListOb ← NIL,
topListOb: PW.ListOb ← NIL,
params: RouterParams ← defaultRouterParams] RETURNS [obj: PW.Object];
AbutChRouteListY:
PROC [
listOb: PW.ListOb,
leftListOb: PW.ListOb ← NIL,
rightListOb: PW.ListOb ← NIL,
params: RouterParams ← defaultRouterParams] RETURNS [obj: PW.Object];
-- AbutSBRoute: uses a switchBox router to connect adjacent objects. bottomOb, rightOb, topOb, leftOb define the pin positions and the size of the routing area. AbutSBRoute will fail interconntection for which it does not have room to route (exception: pins too close on edge of switchbox will cause a signal; proceeding from a design rule violation signal can cause a design rule violation). The returned object is just the routing area.
HorV: TYPE = {horizontal, vertical};
AbutSbRoute:
PROC [
bottomOb, rightOb, topOb, leftOb: PW.Object ← NIL,
trunkDir: HorV ← horizontal,
params: RouterParams ← defaultRouterParams] RETURNS [obj: PW.Object];
-- All the parameters for the channel and switchbox router
RouterParams: TYPE = REF RouterParamsRec;
RouterParamsRec:
TYPE =
RECORD [
trunkLayer: ROPE, -- "poly", "metal" or "metal2", runs length of area
branchLayer: ROPE, -- branch goes across the area
technologyKey: ATOM ← $cmosB, -- $cmosA or $cmosB
makeTabKeyProc: MakeTabKeyProc ← NIL, -- NIL means pinName=netName
wireWidthProc: WireWidthProc ← NIL, -- to control the width of a trunk wire
context: REF ANY ← NIL, -- context to use as parameter for above procs
opt: Optimization ← full, -- controls runtime vs quality
signalIncomplete: BOOLEAN ← TRUE, -- SIGNAL if there are any incompletes
signalBreakAtExit: BOOLEAN ← TRUE, -- SIGNAL if constraint loop was resolved at exit
signalSinglePinNets: BOOLEAN ← TRUE, -- SIGNAL if there are any single pin nets
signalCoincidentPins: BOOLEAN ← TRUE, -- SIGNAL if there any pins are coincident
okToDiddleLLPins: BOOLEAN ← FALSE, -- TRUE => ok to move pins on end of switchBox
okToDiddleURPins: BOOLEAN ← FALSE -- TRUE => ok to move pins on end of switchBox
];
Both the channel and the switchbox router will signal if design rule violations are found on the input. Proceeding from the signals will cause design rule violations in the routing!!
NOTE: Setting okToDiddle??Pins TRUE allows the router to move pins on the ends of a switchBox up to one design rule spacing. Set these parameters to true only if this will not cause design rule violations in the output. This means that the pins on the end of the switchbox must be "sparse" and have no interfering material close by. If you don't know what this means, do't set okToDiddle??Pins TRUE!!!
build the equivalent classes (nets) of pins
MakeTabKeyProc: TYPE = PROC[pinInst: CD.Instance, context: REF ANY ← NIL] RETURNS [tabIndex: ROPE];
width of the wire for a given net
WireWidthProc: TYPE = PROC[netName: ROPE, context: REF ANY ← NIL] RETURNS [wireWidth: INT];
defaultRouterParams: RouterParams;
-- Given two cells that we plan to abut ( and 0 to 2 cells other cells), this module parses the corresponding edges, extracts the pins, builds nets according to the names on the pins, then calls the router to produce a cell containing the channel routing. retrieveRect is interpreted as follows: the lower left corner of the routing area is placed at (0, 0); then the returned object is expanded to fill retrieveRect; if retrieveRect is NIL or smaller than the routing area, then no expansion takes place.
MakeChannel: PUBLIC PROC[obj1, obj2, bottomOrLeftObj, topOrRightObj: PW.Object, retrieveRect: RefRect ← NIL, params: RouterParams ← defaultRouterParams, isX: BOOL ← TRUE, routeType: RouteType ← channel] RETURNS [channel: PW.Object];
The combination of DoRoute and GetRouting perform the same function as MakeChannel. These procedures allow the object size to be adjusted after routing.
DoRoute:
PUBLIC
PROC [obj1, obj2, bottomOrLeftObj, topOrRightObj:
CD.Object, params: RouterParams, isX:
BOOL, routeType: RouteType]
RETURNS [result: Route.RoutingResult];
GetRouting: PUBLIC PROC [result: Route.RoutingResult, retrieveRect: RefRect ← NIL] RETURNS [channel: CD.Object];
-- XferPins maps the pins ont ths specified side (objSide) of template to the specified layer (routingLayer) for fouting; it first determines the space required to map the pins to the specified layer (routingLayer). If any maping is required, then it does the following: an empty cell is created: one dimension is the max [specified width(minWidth), required width as determined by the pins]; the other is the same as the side of the template; then it parses the side of the template, and for every pin it constructs a mapping object; the object is rotated according to the side in use, and the right side corresponds to the original orientation. routingLayer may be "poly", "metal", or "metal2"
XferPinsProc: TYPE = PROC [technologyKey: ATOM, inst: CD.Instance, routingLayer: CD.Layer, width: INT] RETURNS [cell: PW.Object];
defaultXferPins: XferPinsProc;
XferPins: PUBLIC PROC [technologyKey: ATOM, template: PW.Object, objSide: PWPins.Side, minWidth: INT, routingLayerDes: ROPE, selectNameProc: PW.SelectNamesProc ← PW.KeepAll, xferPinsProc: PWRoute.XferPinsProc ← defaultXferPins] RETURNS [cell: PW.Object];
END.