RouteUtil.mesa
Copyright © 1985, 1987 by Xerox Corporation. All rights reserved.
by Bryan Preas July 10, 1985 6:57:00 pm PDT
last edited by Bryan Preas February 5, 1987 8:15:23 pm PST
DIRECTORY
Basics, CD, HashTable, Rope, Route, RoutePrivate;
RouteUtil: CEDAR DEFINITIONS =
BEGIN
LayerToRoutingLayer: PROC [routingArea: Route.RoutingArea, layer: Route.Layer] RETURNS [routingLayer: RoutePrivate.RoutingLayer];
RoutingLayerToLayer: PROC [routingArea: Route.RoutingArea, routingLayer: RoutePrivate.RoutingLayer] RETURNS [layer: Route.Layer];
GetNumberProp: PROC [properties: Route.PropList, key: REF ATOM, default: Route.Number] RETURNS [Route.Number];
Search for property key. If found return value else return default.
PutNumberProp: PROC [properties: Route.PropList, key: REF ATOM, number: Route.Number] RETURNS [Route.PropList];
Put key and number on properties.
Length: PROC [pos1, pos2: Route.Position] RETURNS [Route.Number];
return lenth of line segment from pos1 to pos2.
XYToPQ: PROC [routingArea: Route.RoutingArea, pos: Route.Position] RETURNS [pqPos: RoutePrivate.PQPosition];
convert a position from x-y to p-q space.
PQToXY: PROC [routingArea: Route.RoutingArea, pqPos: RoutePrivate.PQPosition] RETURNS [pos: Route.Position];
convert a position from p-q to x-y space.
SimpleCompare: PROCEDURE [result1, result2: Route.Number]
RETURNS [result: Basics.Comparison];
CompareResult: PROCEDURE [result1, result2: Route.RoutingResult]
RETURNS [result: Basics.Comparison];
CreateCDPin: PROC [name: Rope.ROPE, rect: Route.Rect, lev: Route.Layer←CD.undefLayer] RETURNS [cdPin: Route.Instance];
Create a ChipNDale pin. Calls CDPinObjects.CreatePinInstance but normalizes th rectangle first.
GetPinWidth: PROC [routingArea: Route.RoutingArea, connections: Route.PinList, channelDirection: Route.Direction] RETURNS [widestBranchPin, widestTrunkPin: Route.Number];
Find the widest pin in connections in channelDirection.
GetWidthWithContact: PROC [routingArea: Route.RoutingArea, branch: Route.Number] RETURNS [width: Route.Number] = INLINE{RETURN[MAX[routingArea.rules.contactSize, branch]]};
Find the width of a pin when contact is included.
Include: PROC [cell: Route.Object←NIL, ob: Route.Object,
position: Route.Position←[0, 0], orientation: CD.Orientation←original] RETURNS [application: Route.Instance];
include an object in a cell
AddPin: PROC [obj: Route.Object, pin: Route.Pin];
AddVia: PROC [obj: Route.Object, name: Rope.ROPE, pos, size: Route.Position, layer1, layer2: Route.Layer, cdLambda: Route.Number, viaTable: HashTable.Table];
GetVia: PROC [size: Route.Position, layer1, layer2: Route.Layer, cdLambda: Route.Number] RETURNS [cell: Route.Object];
StitchVias: PROC [size: Route.Position, layer1, layer2: Route.Layer, cdLambda: Route.Number, viaTable: HashTable.Table] RETURNS [obj: Route.Object];
LineToRect: PROC [pos1, pos2: Route.Position, width: Route.Number] RETURNS [position: Route.Position, size: Route.Position];
convert a line and a width to a rectangle and an orgin
END.