DIRECTORY Basics, CD, DABasics, Real, RealFns, RefTab, Rope, Route, RoutePrivate, RTBasic; RouteUtil: CEDAR DEFINITIONS IMPORTS Real, RealFns = BEGIN LayerToRoutingLayer: PROC [rules: Route.DesignRules, layer: CD.Layer] RETURNS [routingLayer: RoutePrivate.RoutingLayerOrNone] ~ INLINE { RETURN[SELECT layer FROM rules.trunkLayer => trunk, rules.branchLayer => branch, ENDCASE => none]; }; RoutingLayerToLayer: PROC [rules: Route.DesignRules, routingLayer: RoutePrivate.RoutingLayer] RETURNS [layer: CD.Layer] ~ INLINE { RETURN[SELECT routingLayer FROM trunk => rules.trunkLayer, branch => rules.branchLayer, ENDCASE => CD.undefLayer]; }; RoutingLayerName: ARRAY RoutePrivate.RoutingLayerOrNone OF Rope.ROPE; Length: PROC [pos1, pos2: DABasics.Position] RETURNS [DABasics.Number] = INLINE { RETURN[Real.Round[RealFns.SqRt[(pos1.x-pos2.x)*(pos1.x-pos2.x)+(pos1.y-pos2.y)*(pos1.y-pos2.y)]]] }; XYToPQ: PROC [rules: Route.DesignRules, pos: DABasics.Position] RETURNS [pqPos: RTBasic.PQPos] ~ INLINE { RETURN[SELECT rules.trunkDirection FROM horizontal => [pos.x, pos.y], vertical => [pos.y, pos.x], ENDCASE => [-1, -1]]; }; PQToXY: PROC [rules: Route.DesignRules, pqPos: RTBasic.PQPos] RETURNS [pos: DABasics.Position] ~ INLINE { RETURN[SELECT rules.trunkDirection FROM horizontal => [pqPos.p, pqPos.q], vertical => [pqPos.q, pqPos.p], ENDCASE => [-1, -1]]; }; CompareResult: PROCEDURE [result1, result2: Route.ResultData] RETURNS [result: Basics.Comparison]; CreateCDPin: PROC [name: Rope.ROPE, rect: DABasics.Rect, lev: CD.Layer_CD.undefLayer] RETURNS [cdPin: CD.Instance]; GetWidthWithContact: PROC [rules: Route.DesignRules, branch: NAT] RETURNS [width: NAT] = INLINE {RETURN[MAX[rules.contactSize, branch]]}; Include: PROC [cell: CD.Object_NIL, ob: CD.Object, position: DABasics.Position_[0, 0], orientation: CD.Orientation_original] RETURNS [application: CD.Instance]; GetVia: PROC [size: DABasics.Position, layer1, layer2: CD.Layer, cdLambda: DABasics.Number] RETURNS [cell: CD.Object]; StitchVias: PROC [size: DABasics.Position, layer1, layer2: CD.Layer, cdLambda: DABasics.Number, viaTable: RefTab.Ref] RETURNS [obj: CD.Object]; LineToRect: PROC [pos1, pos2: DABasics.Position, width: DABasics.Number] RETURNS [position: DABasics.Position, size: DABasics.Position]; END. lRouteUtil.mesa Copyright Σ 1985, 1987, 1988 by Xerox Corporation. All rights reserved. by Bryan Preas July 10, 1985 6:57:00 pm PDT Christian Le Cocq February 12, 1988 3:34:41 pm PST last edited by Bryan Preas April 19, 1987 1:39:21 pm PDT return lenth of line segment from pos1 to pos2. convert a position from x-y to p-q space. convert a position from p-q to x-y space. Create a ChipNDale pin. Calls CDPinObjects.CreatePinInstance but normalizes the rectangle first. Find the width of a pin when contact is included. include an object in a cell convert a line and a width to a rectangle and an orgin Κ˜šœ™JšœH™HJšœ*Οkœ™.Icode™2Jšœ7™:—J˜š ˜ JšœœF˜PJ˜—JšΠln œœ ˜Jšœ˜Jšœ˜˜š Οnœœ#œœ3œ˜ˆšœœ˜Kšœ˜Kšœ˜Kšœ ˜—K˜K˜—š ŸœœEœ œ œ˜‚šœœ˜Kšœ˜Kšœ˜Kšœœ ˜—K˜K˜—šŸœœ!œœ˜EK˜—šŸœœ!œœ˜QKšœ[˜aKšœ˜K™/K™—š Ÿœœ4œœœ˜išœœ˜'Kšœ˜Kšœ˜Kšœ˜—K˜K™)K™—šŸœœ2œœ˜išœœ˜'Kšœ"˜"Kšœ ˜ Kšœ˜—K˜K™)K™—šŸ œ œ%˜=Kšœ˜$K˜—šŸ œœ œœœ œ œ ˜sKšœa™aK™—šΠbnœœ$œœ œœœœ˜‰Kšœ1™1K™—š Ÿœœœœœ ˜3Kšœ1œœœ ˜mKšœ™K˜—š Ÿœœ+œ#œœ ˜vK˜—š Ÿ œœ+œ9œœ ˜K˜—šŸ œœ9œ8˜ˆKšœ6™6—J™—Jšœ˜J˜J˜—…—ώp