DIRECTORY CD, Core, CoreClasses, CoreGeometry, CoreProperties, PWCore, PWCoreRoute, Sisyph; MyPWCoreRouteImpl: CEDAR PROGRAM IMPORTS CoreGeometry, CoreProperties, PWCore, PWCoreRoute, Sisyph = BEGIN SchChannel: PWCore.AttributesProc = { DecideIfInX: PROC [i1, i2: CD.Instance] RETURNS [inX: BOOL] ~ { dx: INT _ ABS[i1.location.x-i2.location.x]; dy: INT _ ABS[i1.location.y-i2.location.y]; RETURN[dx>dy]; }; CheckEachPin: CoreGeometry.EachWirePinProc = { SELECT side FROM bottom => IF inX THEN bottomOrLeftWires _ CONS[wire, bottomOrLeftWires]; top => IF inX THEN topOrRightWires _ CONS[wire, topOrRightWires]; right => IF ~inX THEN topOrRightWires _ CONS[wire, topOrRightWires]; left => IF ~inX THEN bottomOrLeftWires _ CONS[wire, bottomOrLeftWires]; ENDCASE => ERROR; }; channelData: PWCoreRoute.ChannelData; inX, verticalM2, flushTopOrRight: BOOL; prop: REF; bottomOrLeftWires, topOrRightWires: LIST OF Core.Wire _ NIL; decoration: CoreGeometry.Decoration _ Sisyph.mode.decoration; data: CoreClasses.RecordCellType _ NARROW[cellType.data]; i1, i2: CD.Instance; prop _ CoreProperties.GetCellTypeProp[cellType, $Metal2IsVertical]; verticalM2 _ IF prop#NIL THEN NARROW[prop, REF BOOL]^ ELSE TRUE; prop _ CoreProperties.GetCellTypeProp[cellType, $FlushTopOrRight]; flushTopOrRight _ IF prop#NIL THEN NARROW[prop, REF BOOL]^ ELSE TRUE; IF data.size#2 THEN ERROR; -- exactly two cells per channel i1 _ CoreGeometry.GetTransf[decoration, data.instances[0]]; i2 _ CoreGeometry.GetTransf[decoration, data.instances[1]]; inX _ DecideIfInX[i1, i2]; PWCore.SortInstances[Sisyph.mode.decoration, cellType, IF inX THEN PWCore.SortInX ELSE PWCore.SortInY]; [] _ CoreGeometry.EnumerateWireSides[decoration, cellType, CheckEachPin]; channelData _ NEW[PWCoreRoute.ChannelDataRec _ [ inX: inX, extend: TRUE, extendTopOrRight: flushTopOrRight, bottomOrLeftWires: bottomOrLeftWires, topOrRightWires: topOrRightWires, trunkLayer: IF verticalM2 THEN "metal" ELSE "metal2", branchLayer: IF verticalM2 THEN "metal2" ELSE "metal", wireWidthProc: PWCoreRoute.GndAndVdd25Met2MinWidth]]; CoreProperties.PutCellTypeProp[cellType, $ChannelData, channelData]; }; layoutProc: PWCore.LayoutProc; decorateProc: PWCore.DecorateProc; [layoutProc, decorateProc] _ PWCore.GetLayoutAtomRegistration[$Channel]; [] _ PWCore.RegisterLayoutAtom[$CR, layoutProc, decorateProc, SchChannel]; END. MyPWCoreRouteImpl.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Louis Monier August 23, 1986 11:04:20 pm PDT Last Edited by: Louis Monier September 30, 1986 1:22:29 pm PDT -- the cellType is a record with exactly two instances [cellType: Core.CellType] -- inX if dx>dy; I know that tis implementation is bogus; used CDBasics [wire: Core.Wire, instance: CD.Instance, min: INT, max: INT, side: CoreGeometry.Side, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE] -- remember to include only atomic wires!!! Κ ˜– "Cedar" stylešœ™Jšœ Οmœ7™BIcode™,K™>—J™JšΟk œžœO˜[J˜šΟnœžœžœ˜$Jšžœ<˜CJšž˜J˜K™6•StartOfExpansion6 -- [cellType: Core.CellType] RETURNS [obj: CD.Object]šΠbn œ˜%KšΠck™KšœG™Gš Ÿ œžœ žœ žœžœ˜?Kšœžœžœ˜+Kšœžœžœ˜+Kšžœ˜K˜—–‡ -- [wire: Core.Wire, instance: CD.Instance, min: INT, max: INT, side: CoreGeometry.Side, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE]šŸ œ"˜.Kš‘ƒ™ƒK™+šžœž˜Kšœ žœžœžœ˜HKšœžœžœžœ˜AKšœ žœžœžœ˜DKšœžœžœžœ˜GKšžœžœ˜—Kšœ˜—Kšœ%˜%Kšœ"žœ˜'Kšœžœ˜ Kšœ$žœžœ žœ˜