DIRECTORY CD, DABasics, DesignRules, Rope; Route: CEDAR DEFINITIONS = BEGIN Pin: TYPE = REF PinRec; PinList: TYPE = LIST OF Pin; PinRec: TYPE = RECORD[ min, max, depth: CD.Number _ 0, layer: CD.Layer, side: DABasics.Side]; Result: TYPE = REF ResultRec; ResultRec: TYPE = RECORD [ object: CD.Object, polyLength, metalLength, metal2Length: DABasics.Number _ 0, polyToMetal, metalToMetal2, numTrunkTracks, numIncompletes: NAT _ 0, incompleteNets: LIST OF Label _ NIL]; Optimization: TYPE = {full, noIncompletes}; Label: TYPE = Rope.ROPE; Error: ERROR [errorType: ErrorType _ callingError, explanation: Rope.ROPE _ NIL]; Signal: SIGNAL [errorType: ErrorType _ callingError, explanation: Rope.ROPE _ NIL]; ErrorType: TYPE = {programmingError, callingError, noResource, other}; DesignRulesParameters: TYPE = REF DesignRulesParametersRec; DesignRulesParametersRec: TYPE = RECORD [ horizLayer, vertLayer: CD.Layer, -- ChipNDale layers for the indicatde direction trunkDirection: DABasics.Direction, -- direction of the trunk layer trunkToTrunk, pinSpacing, trunkToEdge: NAT, technology: CD.Technology -- ChipNDale technology ]; DefaultDesignRulesParameters: PROC [technologyHint: REF, horizLayer, vertLayer: CD.Layer, trunkDirection: DABasics.Direction] RETURNS [designRules: DesignRulesParameters]; Channel: PROC [enumerateNets: EnumerateChannelNetsProc, min, max: CD.Number, rulesParameters: DesignRulesParameters, name: Rope.ROPE _ NIL, brokenNets: BrokenNetProc _ NIL, enumerateObstructions: EnumerateChannelBarriersProc _ NIL, channelData: REF _ NIL, optimization: Optimization _ full, signalSinglePinNets, signalCoincidentPins: BOOL _ TRUE] RETURNS [result: Result]; BrokenNetProc: TYPE = PROC [channelData, netData: REF, sourceNet: Label, regionNumber, numberOfRegions: NAT] RETURNS [newLabel: Label]; EnumerateChannelNetsProc: TYPE = PROC [channelData: REF, eachNet: EachChannelNetProc]; EachChannelNetProc: TYPE = PROC [name: Label, enumeratePins: EnumerateChannelPinsProc, exitLeftOrBottom, exitRightOrTop: BOOL _ FALSE, mayExit: BOOL _ TRUE, trunkSize: CD.Number _ 0, channelData, netData: REF _ NIL]; EnumerateChannelPinsProc: TYPE = PROC [channelData, netData: REF, eachPin: EachChannelPinProc]; EachChannelPinProc: TYPE = PROC [bottomOrLeftSide: BOOL, min, max, depth: CD.Number _ 0, layer: CD.Layer]; EnumerateChannelBarriersProc: TYPE = PROC [channelData: REF, eachObstruction: EachChannelBarrierProc]; EachChannelBarrierProc: TYPE = PROC [side: DABasics.Side, min, max, depth: CD.Number, layer: CD.Layer]; SwitchBox: PROC [enumerateNets: EnumerateSwitchBoxNetsProc, routingRect: DABasics.Rect, rulesParameters: DesignRulesParameters, name: Rope.ROPE _ NIL, enumerateObstructions: EnumerateSwitchBoxBarriersProc _ NIL, switchBoxData: REF, optimization: Optimization _ full, signalSinglePinNets, signalCoincidentPins: BOOL _ TRUE, okToDiddleLLPins, okToDiddleURPins: BOOL _ FALSE] RETURNS [result: Result]; EnumerateSwitchBoxNetsProc: TYPE = PROC [switchBoxData: REF, eachNet: EachSwitchBoxNetProc]; EachSwitchBoxNetProc: TYPE = PROC [name: Label, enumeratePins: EnumerateSwitchBoxPinsProc, trunkSize: CD.Number _ 0, switchBoxData: REF, netData: REF]; EnumerateSwitchBoxPinsProc: TYPE = PROC [switchBoxData, netData: REF, eachPin: EachSwitchBoxPinProc]; EachSwitchBoxPinProc: TYPE = PROC [side: DABasics.Side, min, max, depth: CD.Number _ 0, layer: CD.Layer]; EnumerateSwitchBoxBarriersProc: TYPE = PROC [switchBoxData: REF, eachObstruction: EachSwitchBoxBarrierProc]; EachSwitchBoxBarrierProc: TYPE = PROC [side: DABasics.Side, rect: CD.Rect, layer: CD.Layer]; IntermediateResult: TYPE = REF IntermediateResultRec; IntermediateResultRec: TYPE = RECORD [ routingArea: REF ANY _ NIL, resultData: ResultData ]; ResultData: TYPE = REF ResultDataRec; ResultDataRec: TYPE = RECORD [ polyLength, metalLength, metal2Length: CD.Number _ 0, polyToMetal, metalToMetal2, numTrunkTracks, numIncompletes: NAT _ 0, routingRect: DABasics.Rect _ [0, 0, 0, 0], moreAreaRequired: BOOL _ FALSE, incompleteNets: LIST OF Rope.ROPE _ NIL ]; ChannelRoute: PROC [enumerateNets: EnumerateChannelNetsProc, min, max: CD.Number, rulesParameters: DesignRulesParameters, rules: DesignRules, name: Rope.ROPE _ NIL, enumerateObstructions: EnumerateChannelBarriersProc _ NIL, channelData: REF _ NIL, optimization: Optimization _ full, signalSinglePinNets, signalCoincidentPins: BOOL _ TRUE] RETURNS [intermediateResult: IntermediateResult]; ChannelRetrieve: PROC [intermediateResult: IntermediateResult, enumerateNets: Route.EnumerateChannelNetsProc, brokenNets: BrokenNetProc _ NIL, channelData: REF_ NIL, retrieveRect: REF DABasics.Rect _ NIL] RETURNS [result: Result]; SwitchBoxRoute: PUBLIC PROC [enumerateNets: EnumerateSwitchBoxNetsProc, routingRect: DABasics.Rect, rulesParameters: DesignRulesParameters, rules: DesignRules, name: Rope.ROPE, enumerateObstructions: EnumerateSwitchBoxBarriersProc, switchBoxData: REF, optimization: Route.Optimization, signalSinglePinNets, signalCoincidentPins: BOOL, okToDiddleLLPins, okToDiddleURPins: BOOL] RETURNS [intermediateResult: IntermediateResult]; SwitchBoxRetrieve: PUBLIC PROC [intermediateResult: IntermediateResult] RETURNS [result: Route.Result]; DesignRules: TYPE = REF DesignRulesRec; DesignRulesRec: TYPE = RECORD[ trunkLayer, branchLayer: CD.Layer, trunkDirection, branchDirection: DABasics.Direction, trunkWidth, trunkSpacing, trunkToContact, trunkToTrunk, trunkOffset, branchWidth, branchSpacing, branchToContact, branchToBranch, branchOffset, contactSize, contactToContact, pinSpacing, trunkToEdge: NAT _ 0]; DefaultDesignRules: PROC [designRuleParameters: DesignRulesParameters] RETURNS [designRules: DesignRules]; END. 'ÌRoute.mesa Copyright Ó 1985, 1987 by Xerox Corporation. All rights reserved. Created by Bryan Preas Bertrand Serlet May 20, 1987 6:11:29 pm PDT Preas, August 9, 1987 3:12:17 pm PDT Christian Le Cocq January 4, 1988 5:22:02 pm PST Theory This interface provides the procedures and data types necessary to define and route an interconnection area using the major routing algorithms: Channel, and SwitchBox. The client program must first define the design rules. Next, one of the routing algorithms is invoked; this algorithm passes back summary routing information (required size, whether expansion is needed, list of incomplete nets if any) as well as the resulting ChipNDale object. A routing area has top, bottom, left, and right edges. Route supports both fixed coordinate routing (SwitchBox) where the pin and side locations are not modified by the algorithm and topological routing (Channel) where the routing area is expanded to the required size to hold all of the routing. The following restrictions apply: The routing area is rectangular but may have irregular routing barriers on the edges of the rectangle. The pins may not lie in the routing area proper (that is, they must lie outside the routing area of within the route barriers). The pins must be accessable by straight line segments on the layer for the routing material used. The routing area (except for the routing barriers) is owned by Route. Route has no concept of any pre-existing material in the routing area proper. Channel Router restrictions: Pins must have fixed positions on the sides parallel to the trunk layer direction. Pins on the channel ends (routing area sides parallel to the branch direction) are positioned by the channel router to minimize the routing area. Channel routing algorithms do not exploit the area in the shadow of routing barriers well. SwitchBox Router restrictions: The routing area is not altered from the input specification. The SwitchBox router does the best it can in the area specified. Common Types Errors Design Rules the design rule parameters used by the Router Define the routing design rules. technologyHint must define a technology ChipNDale. Channel A channel routing area has left, right, top, and bottom sides. There is a single x axis used to define the position of the left and right sides as well as the x position of the pins belonging to the top and bottom sides. Increasing values denote up and right. The left side is the line defined by x=min and the right side is the line defined by x = max. Thus the top and bottom sides must be of equal length. The top and bottom sides of the channel have a common x coordinate axis but different y coordinate axis. The top y coordinate axis lies above the bottom side coordinate axis. The top side is the line defined in the top side y coordinate system by y = maximum y coordinate of all top side pins. The bottom side is the line defined in the bottom side coordinate system by y = minimum y coordinate of all bottom side pins. All top side pins which lie below the top side, or bottom side pins which lie above the bottom side, must be within an obstruction. Obstructions are rectangles with three sides defined and the fourth infinitely far away from the channel. Obstructions are associated with the top or bottom side. The fourth side of a top obstruction extends to plus infinity and that of a bottom side extends to minus infinity. Route will not place geometry outside of the routing area nor within an obstruction except that it will extend branches into an obstruction sufficiently to connect to a pin lying within it. Clients define the obstructions by supplying an enumerateObstructions procedure. If no obstruction procedure is passed then the channel is assumed to be a simple rectangular region and all of the y coordinates of the top pins must be equal and all of the y coordinates of the bottom pins must be equal. The router calls a client supplied procedure, enumerateNets, to enumerate the nets and supply connectivity information. Each net has a set of pins which are to be connected by the router. Pins must be design rule correct and must not overlap. The router may fail to complete the interconnection. If it does then it routes the electrical regions which still need to be connected to the left or right side of the channel. The client provides new net names via the brokenNets procedure. channelData is passed through to the enumerateNets, brokenNets, and enumerateObstructions procedures. The router typically uses the trunkLayer to synthesize geometry which runs parallel to the top and bottom sides. It uses the branchLayer to synthesize geometry which runs parallel to the left and right sides. To improve density the router may move short segments of trunk material to the branchLayer. If optimization is noIncompletes then the router stops searching when it finds a solution which completes all of the interconnections. optimization= full may result in shorter routes, fewer vias, and increased run time. The router places the origin of the result object at x=min, y=0. The first trunk is placed above the bottom side by the trunkToEdge distance. Each succeeding trunk is placed above the previous by the trunkToTrunk distance. pinSpacing specifies the minimum separation distance of pins along the sides. The router uses the rulesParameters to synthesize rectangles and holes and to place them into the result object in a design rule correct manner. The router returns the synthesized object and a number of indications of the quality of the solution. trunkLayerLength, and branchLayerLength report the length of the geometry synthesized in each of these layers. holes reports the number of holes synthesized. numTrunkTracks reports the number of horizontal trunk tracks the router used. Channel Route the routing area. The pin positions on the four sides are specified in the same manner. A Routing Barrier is an area where the Router should not put geometry on the specified layer. NOTE: Error conditions are indicated through Errors and Signals. Proceeding from signals will cause design rule violations in the routing. Signals are raised instead of Errors so debugging will be easier! Use signalSinglePinNets and signalCoincidentPins = FALSE with caution!!! BrokenNetProc is called by the Router if has to break a net at the end of the channel. This allows the client to assign different Labels to unconnected regions mayExit indicates if the net wiring may be deferred out of the left or right side. A signal is raised if the router needs to defer a net which has mayExit FALSE. exitLeft and exitRight indicate if the net must be routed to the respective channel side. The channel geometry of enumeratePins should be thought of as line segments. If trunkSize is 0 then the trunk will be the minimum size allowed for the trunk layer. The name and id are stored as the value of some properties on the Node property list in the synthesized routing cell. If branchSize is 0 then the branch will be the minimum size allowed for the branch layer. If the actual branch size is different than the pin width then the branch is centered on the pin, justified left for odd sizes. bottomOrLeftSide indicates which of the two channel sides that the pin is on. If the layer is not included is not a branchLayer a signal is raised. A Channel Routing Barrier describes one of the routing layers adjacent to the associated side. The barrer extends from the routing area side to the fartherest extent of the barrier rectangle. Switch Box SwitchBox Route the routing area. Side positions are not changed by SwitchBoxRoute. Incompletes should be remidied by increasing the routing area size. A Routing Barrier is an area where the Router should not put geometry on the specified layer. NOTE: Error conditions are indicated through Errors and Signals. Proceeding from signals will cause design rule violations in the routing. Signals are raised instead of Errors so debugging will be easier! Use signalSinglePinNets and signalCoincidentPins = FALSE with caution!!! NOTE: Setting okToDiddlePins TRUE allows the router to move pins on the ends of a switchBox up to one design rule spacing. Set this parameter 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 okToDiddlePins TRUE!!! A signal is raised if the router needs to defer a net to the end of the switchbox. The channel geometry of enumeratePins should be thought of as line segments. If trunkWidth is 0 then the trunk will be the minimum size allowed for the trunk layer. The fields are interpreted differently depending if the pin is on a side (parallel to the trunk direction) or on the end of the channel. Channel end: side and width (may be defaulted, 0 => mimimum trunk width) are used if the pin is on the "end" of the channel. Channel Side: range indicates the the position along the side and depth indicates the penetration of the pin. A SwitchBoxBarrier Routing Barrier describes one of the routing layers within the routing area. Primitive Operations Channel Route the routing area. The pin positions on the four sides are specified in the same manner. A Routing Barrier is an area where the Router should not put geometry on the specified layer. Channel Route the routing area. The pin positions on the four sides are specified in the same manner. A Routing Barrier is an area where the Router should not put geometry on the specified layer. SwitchBox Route the routing area. Side positions are not changed by SwitchBoxRoute. Incompletes should be remidied by increasing the routing area size. A Routing Barrier is an area where the Router should not put geometry on the specified layer. SwitchBox Route the routing area. Side positions are not changed by SwitchBoxRoute. Incompletes should be remidied by increasing the routing area size. A Routing Barrier is an area where the Router should not put geometry on the specified layer. get design rules from parameters Ê%˜šœ ™ JšœB™BJšœ™Icodešœ+™+Jšœ$™$K™0—J™šÏk œœ˜*J˜—JšÐblœœ œ˜ head™IbodyšœÏbœŸ œ›™ÁMšœ6™6M™ñ™!Iitem™fN™N™aN™”—™Nšœå™åN™Z—™N™——™ Kšœœœ˜Kšœ œœœ˜šœœœ˜Kšœœ ˜Kšœœ˜Kšœ˜—Kšœœœ ˜šœ œœ˜Kšœœ˜Kšœ;˜;Kšœ<œ˜DKšœœœ œ˜%K˜—Kšœœ˜+Kšœœœ˜—™KšÏnœœ9œœ˜QKš œœ9œœ˜SKšœ œ7˜F—™ Kšœœœ˜;šœœœ˜)Kšœœ Ïc/˜QKšœ$¡ ˜DKšœ'œ˜+Kšœ œ ¡˜2Kšœ˜Kšœ-™-K˜—š  œœœœ,œ&˜«Kšœ"™"Kšœ2™2——™MšœàÏiœæ™ÉMšœˆ¢œê™‡Mšœ.¢ œ¹™ôMšœÝ¢ œ ¢ œZ™ÙMšœ¢ œV¢ œ¥™®MšœÛ™ÛMšœy¢ œF¢ œ ¢ œÕ™Âš œg¢œ¢œH¢œ+¢œ?™ÔM™—š œœ5œ<œœœ8œœœPœœœ˜ôKšœg™gKšœ]™]K™Kšœþœ™—K˜—š œœœœ3œœ˜‡Kšœ ™ K˜—šœœœœ˜VK˜—šœœœZœœ œœ œ#œœ˜ØKšœœœù™šK˜—šœœœœ˜_K˜—š œœœœœœ˜jKšœð™ðK™—Kšœœœœ+˜fš œœœ(œœ˜gKšœÀ™À——™ š  œœ|œœ:œœPœœ&œœœ˜ŽKšœ™™™Kšœ]™]K™Kšœþœ™—K™Kšœœåœ™K™—šœœœœ!˜\K˜—š œœœEœœ˜—Kšœú™úK˜—šœœœœ!˜eK˜—š œœœ(œœ˜iK™ˆKšœ|™|Kšœm™mK™—Kšœ œœœ-˜lš œœœœœ˜\Kšœ_™_——™šœœœ˜5šœœœ˜&Kšœ œœœ˜Jšœ˜Kšœ˜šœ œœ˜%šœœœ˜Kšœ'œ ˜5Kšœ<œ˜DKšœ*˜*Kšœœœ˜Kšœœœœ˜'Kšœ˜K˜————š  œœ5œPœœ8œœœPœœœ*˜„Kšœg™gKšœ]™]K˜—š  œœuœ%œœœ˜æKšœg™gKšœ]™]J˜—š œ œœHœOœ&œœ*˜ªKšœ™™™Kšœ]™]K˜—š œ œ*œ˜gKšœ™™™Kšœ]™]K˜—Kšœ œœ˜'šœœœ˜Kšœ"˜"Kšœ5˜5KšœÈœ˜ÑK˜—š œœ/œ˜jKšœ ™ ——Jšœ˜—…—0E!