<<-- File: IPTop.mesa>> <<-- Last Edited by: CSChow, February 1, 1985 8:40:33 am PST>> <> <<>> <<-- This is the top leve interface. >> 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, RTStructure; 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]; <<-- Create top from chipRose>> Create1: PROC[defaultDir, descFile: Rope.ROPE] RETURNS [Ref]; <<--Create from desc file. See Impl>> CreateFromStructure: PROC[structure: RTStructure.Structure] RETURNS[Ref]; <<-- Create top from chipRose>> <<>> DestroySelf: PROC [top: Ref]; <<--Clean up circular garbage>> ReDefineChs: PROC[top: Ref, chWidth: NAT _ IPParams.ChDefaultWidth, yPrimary, maxChWidth: BOOL _ FALSE] RETURNS [Ref]; <> <> <> <> <> <> <> <> ClearChannels: PROC[top: Ref]; <<--Destroy (and only) top.ctg (the channels) in the system. >> <<-- So after ClearChannels[top], NoTopology[top] is always TRUE>> 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]; <<--compStipple is stipple used to paint components>> <<--showChNames => channel names will be shown>> <<-- showCompNames => component names will be shown>> ReconstructSelf: PROC[file: Rope.ROPE] RETURNS [top: Ref]; <> <> CheckSelf: PROC[top: Ref]; <<-- Used for debugging. No longer maintained>> 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]; <<--Check if top has channels or not>> 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: NAT _ 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.