DIRECTORY Imager USING [Context], IPCTG USING[Ref, Channel, ChType], Misc USING [Rect], IPConstants USING [White], IPParams USING [ChDefaultWidth, ChDefaultPositionX, ChDefaultPositionY], RefStack USING [Ref], IPCoTab USING[Ref], IPTypeTab, IPNetTab, IPPortTab, IPChipRose, Rope, CoreRouteFlat; IPTop: CEDAR DEFINITIONS IMPORTS IPParams = BEGIN Ref: TYPE = REF Rep; Rep: TYPE = RECORD[ coTab: IPCoTab.Ref, --Tables of components/instances ports: IPPortTab.Ref, --Tables of ports ctg: IPCTG.Ref, -- of Channels types: IPTypeTab.Ref, --Tables of types nets: IPNetTab.Ref, --Tables of nets undoStack, redoStack, horOldChs, verOldChs: RefStack.Ref, -- supports undo/redo initialized: BOOL _ FALSE, -- false implies need to call InitTop. Handled internally southMost, eastMost, northMost, westMost: IPCTG.Channel _ NIL -- bounding chanels ]; CyclicConstraint: ERROR[negCh, posCh: IPCTG.Channel]; ComponentsOverlapped: ERROR[overlaps: LIST OF Misc.Rect]; Create: PROC[chipRose: IPChipRose.Ref] RETURNS[Ref]; Create1: PROC[defaultDir, descFile: Rope.ROPE] RETURNS [Ref]; CreateFromStructure: PROC[structure: CoreRouteFlat.Structure] RETURNS[Ref]; DestroySelf: PROC [top: Ref]; ReDefineChs: PROC[top: Ref, chWidth: INT _ IPParams.ChDefaultWidth, yPrimary, maxChWidth: BOOL _ FALSE] RETURNS [Ref]; ClearChannels: PROC[top: Ref]; DescribeSelf: PROC[top: Ref, file: Rope.ROPE]; PaintSelf: PROC[top: Ref, context: Imager.Context, xOffset, yOffset: REAL _ 0.0, scaleFactor: REAL _ 1.0, compStipple: CARDINAL _ IPConstants.White, showChNames, showCompNames, showPinNames: BOOL _ TRUE]; ReconstructSelf: PROC[file: Rope.ROPE] RETURNS [top: Ref]; CheckSelf: PROC[top: Ref]; ConstraintChannels: PROC[top: Ref, negCh, posCh: IPCTG.Channel, wt: INT]; ClearConstraints: PROC[top: Ref, negCh: IPCTG.Channel, posCh: IPCTG.Channel _ NIL]; ClearAllConstraints: PROC[top: Ref]; NoTopology: PROC[top: Ref] RETURNS [BOOL]; Geometrize: PROC [top: Ref, xPosition: INT _ IPParams.ChDefaultPositionX, yPosition: INT _ IPParams.ChDefaultPositionY, horPosSense, verPosSense: BOOL _ TRUE]; XDim: PROC[top: Ref] RETURNS [INT]; YDim: PROC[top: Ref] RETURNS [INT]; Area: PROC[top: Ref] RETURNS [INT]; CreateChannel: PROC[top: Ref, type: IPCTG.ChType, width: INT _ IPParams.ChDefaultWidth, coord: INT _ 0] RETURNS[ch: IPCTG.Channel]; DestroyChannel: PROC[top:Ref, ch: IPCTG.Channel]; ReActivateChannel: PROC[top: Ref, ch: IPCTG.Channel]; --put the ch back-- DeActivateChannel: PROC[top: Ref, ch: IPCTG.Channel]; --remove ch. END. *IPTop.mesa Last Edited by: CSChow, February 1, 1985 8:40:33 am PST Don Curry December 4, 1987 11:41:42 am PST Preas, August 27, 1986 11:51:03 am PDT -- Create top from chipRose --Create from desc file. See Impl -- Create top from chipRose --Clean up circular garbage ! Raise ComponentsOverlap. This construct the ChannelIPTopologyGraph based on the shape and positions of the components in the coTab. chWidth is the default channel width. If maxChWidth is true then the width of the each constructed channel will be set to the maximum possible without moving the components else all channels will be set to chWidth (In any case all channels will be at least chWidth wide.) If yPrimary is true then the resultant channels will tend to give long vertical channels else it will tend to give long horizontal channels. IPTop is the same instance, only top.ctg is changed-- --Destroy (and only) top.ctg (the channels) in the system. -- So after ClearChannels[top], NoTopology[top] is always TRUE Create a recoverable textual description of self. Used for creating checkpoint-- --compStipple is stipple used to paint components --showChNames => channel names will be shown -- showCompNames => component names will be shown Create the top based on the textual description in file. The reconstruction is `perfect' except for some statistical info. and ref's are are longer the same. -- Used for debugging. No longer maintained Set a (directed) external constraint between negCh and posCh, will ERROR CyclicConstraint if resultant constraint is cyclic. Clear the constraint from negCh to posCh, if posCh = NIL then clear ALL constraints from negCh Removes all external constraints --Check if top has channels or not Compute/update the Geomterical information (eg. coordinates and slacks of channels.) If horPosSense is true then the horizontal channels will be computed from bottom upward else they will be computed from top to down. Similarly for verPosSense. xPosition and yPosition specifies the starting coordinates for the leftmost and bottommost channels respectively Κ3˜šœ ™ Jšœ7™7Icode™*K™&—J˜šΟk ˜ K– "Cedar" stylešœœ ˜Jšœœ˜"Jšœœ˜Jšœ œ ˜Jšœ œ:˜HJšœ œ˜Jšœœ˜Jšœ ˜ Jšœ ˜ J˜ Jšœ ˜ Jšœ˜Jšœ˜—J˜J˜šΟnœœ œ˜Jšœ ˜J˜Jšœœœ˜šœœœ˜JšœΟc ˜4JšœŸ˜'JšœœŸ˜JšœŸ˜'JšœŸ˜$Jšœ:Ÿ˜OJšœ œœŸ9˜UJšœ*œ œŸ˜QJšœ˜—J˜Jšžœœœ ˜5Jšžœœ œœ ˜9J˜šžœœœ˜4Jšœ™—J˜šžœœœœ˜=K™!—K˜šžœœ%œ˜KJšœ™J™—šž œœ ˜K™—K˜š ž œœœ2œœœ˜wKšœN™NKšœG™GKšœH™HKšœG™GKšœR™RKšœP™PKšœS™SKšœ?™?—K˜šž œœ ˜Kšœ;™;Kšœ ž œž œžœ™?—K˜– "Cedar" stylešž œœœ˜/K– "Cedar" stylešœP™P—J˜šž œœ6œœœ@œœ˜ΝJšŸœ Ÿ$™1Jšœ,™,Jšœ1™1—J˜– "Cedar" stylešžœœ œœ ˜;K– "Cedar" stylešœY™YK– "Cedar" stylešœD™D—J˜šž œœ ˜J™+—J˜šžœœœœ˜JJšœC™CJšœ:™:—K˜š žœœœœ œ˜TKšœH™HKšœ™—K˜šžœœ ˜%Kšœ ™ —K˜•StartOfExpansion[]šž œœ œœ˜*K™"—J˜š ž œœœ+œ<œœ˜’JšœU™UJšœQ™QJšœO™OJšœP™PJšœ!™!—J˜Kšžœœ œœ˜#Kšžœœ œœ˜#Kšžœœ œœ˜#J˜K– "Cedar" stylešž œœœœ#œœœ ˜ƒK– "Cedar" stylešžœœœ ˜1K– "Cedar" stylešžœœœ Ÿ˜IK– "Cedar" stylešžœœœ Ÿ ˜CJ˜Jšœ˜——…— β?