<> <> <> <> DIRECTORY CD, D2Basic, PWPins, RefTab, Rope, Route; PWRoute: CEDAR DEFINITIONS = { Objects: TYPE = LIST OF CD.Object; 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: Objects, bottomListOb: Objects _ NIL, topListOb: Objects _ NIL, params: RouterParams _ defaultRouterParams] RETURNS [obj: CD.Object]; AbutChRouteListY: PROC [ listOb: Objects, leftListOb: Objects _ NIL, rightListOb: Objects _ NIL, params: RouterParams _ defaultRouterParams] RETURNS [obj: CD.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: CD.Object _ NIL, trunkDir: HorV _ horizontal, params: RouterParams _ defaultRouterParams] RETURNS [obj: CD.Object]; <<>> <<-- All the parameters for the channel and switchbox router>> RouterParams: TYPE = REF RouterParamsRec; RouterParamsRec: TYPE = RECORD [ trunkLayer: Rope.ROPE, -- "poly", "metal" or "metal2", runs length of area branchLayer: Rope.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 viaTable: RefTab.Ref _ NIL -- hash table for testing contact definitions ]; <> <> <<>> <> MakeTabKeyProc: TYPE = PROC[pinInst: CD.Instance, context: REF ANY _ NIL] RETURNS [tabIndex: Rope.ROPE]; <> WireWidthProc: TYPE = PROC[netName: Rope.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: CD.Object, retrieveRect: RefRect _ NIL, params: RouterParams _ defaultRouterParams, isX: BOOL _ TRUE, routeType: RouteType _ channel] RETURNS [channel: CD.Object]; <> 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, params: RouterParams _ defaultRouterParams] 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: CD.Object]; defaultXferPins: XferPinsProc; ForEachPinProc: TYPE = PROC [inst: CD.Instance] RETURNS [obj: CD.Object]; SelectNamesProc: TYPE = PROC [name: Rope.ROPE] RETURNS [keepIt: BOOL]; KeepAll: SelectNamesProc; XferPins: PUBLIC PROC [technologyKey: ATOM, template: CD.Object, objSide: PWPins.Side, minWidth: INT, routingLayerDes: Rope.ROPE, selectNameProc: SelectNamesProc _ KeepAll, xferPinsProc: XferPinsProc _ defaultXferPins] RETURNS [cell: CD.Object]; }. <<>>