PWRoute.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Preas March 27, 1986 4:51:43 pm PST
DIRECTORY
CD,
D2Basic USING [Rect],
PW,
PWPins,
Rope USING [ROPE],
Route USING [Optimization];
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
opt: Optimization ← full,     -- controls runtime vs quality
signalIncomplete: BOOLEANTRUE, -- SIGNAL if there are any incompletes
signalBreakAtExit: BOOLEANTRUE, -- SIGNAL if there are any incompletes
signalSinglePinNets: BOOLEANTRUE-- SIGNAL if there are any single pin nets
];
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!!
build the equivalent classes (nets) of pins
MakeTabKeyProc: TYPE = PROC[pinInst: CD.Instance] RETURNS [tabIndex: ROPE];
width of the wire for a given net
WireWidthProc: TYPE = PROC [netName: ROPE] 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: BOOLTRUE, routeType: RouteType ← channel] RETURNS [channel: PW.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.