DIRECTORY IPOrient USING [Orientation], Misc USING [Rect], IO USING [STREAM], Imager USING [Context], IPNetTab, IPTypeTab, IPChipRose, IPConstants, IPParams, IPCTG USING [Ref, Channel], IP, Rope USING [ROPE], SymTab USING [Ref], CoreRouteFlat; IPCoTab: CEDAR DEFINITIONS IMPORTS IPParams = BEGIN Channel: TYPE = IPCTG.Channel; Ref: TYPE = REF Rep; Rep: TYPE = RECORD[comps: SymTab.Ref]; Component: TYPE = REF ComponentRep; ComponentRep: TYPE = IP.ComponentRep; CornerChannels:TYPE = REF CornerChannelsRep; CornerChannelsRep: TYPE = IP.CornerChannelsRep; CornerSpace: TYPE = REF NatVector; CornerTypes: TYPE = IP.CornerTypes; EdgeTypes: TYPE = IP.EdgeTypes; IntVector: TYPE = IP.IntVector; NatVector: TYPE = IP.NatVector; EachComponentAction: TYPE = PROC[co: Component] RETURNS[quit: BOOL _ FALSE]; Create: PROC[chipRose: IPChipRose.Ref, typeTab: IPTypeTab.Ref, netTab: IPNetTab.Ref] RETURNS[Ref]; CreateFromStructure: PROC[structure: CoreRouteFlat.Structure, typeTab: IPTypeTab.Ref, netTab: IPNetTab.Ref] RETURNS[Ref]; DestroySelf: PROC[coTab: Ref]; DescribeSelf: PROC[coTab: Ref, stream: IO.STREAM]; --Create a recoverable textual description of self. Used for creating checkpoint-- ReconstructSelf: PROC[stream: IO.STREAM, typeTab: IPTypeTab.Ref, netTab: IPNetTab.Ref, ctg: IPCTG.Ref _ NIL] RETURNS [coTab: Ref]; CheckSelf: PROC[coTab: Ref]; --Used in debugging, no longer supported PaintSelf: PROC [coTab: Ref, context: Imager.Context, xOffset, yOffset: REAL _ 0.0, scaleFactor: REAL _ 1.0, coStipple: CARDINAL _ IPConstants.White, showCoNames, showPhyPinNames: BOOL _ TRUE]; CreateComponent: PROC[coTab: Ref, name: Rope.ROPE, type: IPTypeTab.CoType, orient: IPOrient.Orientation, pinNets: IPNetTab.PinNets, origin: IntVector _ [IPParams.CoDefaultPosition, IPParams.CoDefaultPosition], active: BOOL _ TRUE] RETURNS[Component]; CreateComponent2: PROC[coTab: Ref, name: Rope.ROPE, shape: IP.ShapeRep, active: BOOL _ TRUE, orient: IPOrient.Orientation, origin: IntVector, from: Component _ NIL] RETURNS[Component]; --Used in IPTopEditOpsExtraImpl.SpawnComps DestroyComponent2: PROC[coTab: Ref, co: Component]; --Used in IPTopEditOpsExtraImpl.SpawnComps Size: PROC[coTab: Ref] RETURNS[INT]; --return the number of components (active and non-active) in coTab CountComponents: PROC[coTab: Ref] RETURNS [active, nonActive: INT]; GetComponent: PROC[coTab: Ref, name: Rope.ROPE, raiseError: BOOL _ TRUE] RETURNS[component: Component]; -- name will raise UnknownName[name]-- Components: PROC[coTab: Ref, p: EachComponentAction]; --enumerate all active components or until p returns true-- AllComponents: PROC[coTab: Ref, p: EachComponentAction]; --enumerate all (active and non-active) components or until p returns true-- SetName: PROC[coTab: Ref, co: Component, name: Rope.ROPE]; --Change the name of co to name. -- SetOrigin: PROC[co: Component, origin: IntVector] = INLINE{co.origin _ origin};--SetOrigin GetName: PROC[co: Component] RETURNS[Rope.ROPE] = INLINE {RETURN[co.name]}; GetDim: PROC[co: Component] RETURNS[x, y: INT]; GetOrigin: PROC[co: Component] RETURNS[IntVector] = INLINE {RETURN[co.origin]}; CoActive: PROC[co: Component] RETURNS [BOOL] = INLINE {RETURN [co.active]}; DeActivateComponent: PROC[co: Component]; ReActivateComponent: PROC[co: Component]; PaintComponent: PROC [co: Component, context: Imager.Context, xOffset, yOffset: REAL _ 0.0, scaleFactor: REAL _ 1.0, stipple: CARDINAL _ IPConstants.Black, showName: BOOL _ TRUE]; --If showName then the name of the component will be visible-- PositionComponent: PROC[co: Component, southCoeff, eastCoeff, northCoeff, westCoeff: INT _ 0]; --southCoeff, eastCoeff, northCoeff, and westCoeff are to position the component with respect to its surrounding channels-- GetCornerRects: PROC[co: Component, crop: INT _ 1] RETURNS[sw, se, ne, nw: Misc.Rect]; GetBRect: PROC[co: Component] RETURNS[Misc.Rect]; FindEdgeType: PROC[co: Component, ch: IPCTG.Channel] RETURNS [EdgeTypes]; GetPrinCh: PROC[co: Component, et: EdgeTypes] RETURNS [Channel]; SetPrinCh: PROC[co: Component, et: EdgeTypes, ch: Channel]; FindCornerType: PROC[co: Component, ch: IPCTG.Channel] RETURNS [CornerTypes]; GetCornerChs: PROC[co: Component, ct: CornerTypes] RETURNS [CornerChannels]; SetCornerChs: PROC[co: Component, ct: CornerTypes, cc: CornerChannels]; GetCornerChFor: PROC[co: Component, ct: CornerTypes, ot: IP.OrientationTypes] RETURNS [IPCTG.Channel]; SetCornerChs2: PROC[co: Component, ct: CornerTypes, horCh, verCh: IPCTG.Channel]; GetCornerSp: PROC[co: Component, ct: CornerTypes] RETURNS [CornerSpace]; GetCornerSps: PROC[co: Component] RETURNS [sw, se, ne, nw: CornerSpace]; GetChOnSide: PROC[co: Component, side: IP.PinSideType, useParrallel: BOOL] RETURNS [IPCTG.Channel]; InsertComponent: PROC [co: Component, south, east, north, west: Channel, sw, se, ne,nw: CornerChannels _ NIL]; ConstrainChannels: PROC[co: Component, chs: IPCTG.Ref]; --Impose the constraints between thee surrounding channels resulting from the dimension of the component-- FromEdge: PROC[co: Component, edge: EdgeTypes, edgeAt: INT] RETURNS [coord: INT]; FromCorner: PROC[co: Component, corner: CornerTypes, CornerAtX, CornerAtY: INT] RETURNS [xCoord, yCoord: INT]; CCGetCh: PROC[cc: CornerChannels, ot: IP.OrientationTypes] RETURNS [IPCTG.Channel]; --CCGetCh-- OrientCoShape: PROC[co: Component, operation: IP.Orientation]; OrientCoShapeChk: PROC[co: Component, operation: IP.Orientation] RETURNS [BOOL]; END. >IPCoTab.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Last Edited by: CSChow, February 2, 1985 2:09:15 am PST Don Curry December 4, 1987 2:25:01 pm PST Preas, August 1, 1986 10:41:57 pm PDT Note: IPCoTab = ComponentTable This a collection of all the components. Component has shape of a retangle with 0-4 of its corners removed. Some of these corners may have corner channels, this indicates that the corner spaces are being utilized --These are the top level global operations on IPCTG-- --Create an instance of component table by reading in all instances in chipRose --Create an instance of component table by evaluating a structure --Create the ctg based on the textual description in s. The reconstruction is perfect -- except the ref's are different. --create a component of given shape and size at specified positions in the table -- If from # NIL THEN name:, shape:, active:, orient:, origin:, are IGNORED --Get the component (active or not) with that name. If raiseError and no component has that --These are operations on individual component -- --For Implementor -- --returns NIL if side = interior or side = unknown --useParrallel: eg. if side = swVer and co.cornerChannels.sw = NIL then -- if useParrallel then return [west] else return [south] --Operation to manipulate component shape Κ Ψ˜šœ ™ Icode™˜σK– "Cedar" style˜K– "Cedar" stylešœ™K– "Cedar" style˜K– "Cedar" stylešžœœ>œŸœy˜ΪK– "Cedar" style˜K– "Cedar" stylešžœœœœ˜VK– "Cedar" style˜K– "Cedar" stylešžœœœ ˜1K– "Cedar" stylešž œœœ œ ˜IK– "Cedar" stylešž œœœ ˜@K– "Cedar" stylešž œœ,˜;K– "Cedar" stylešžœœœ œ˜MK– "Cedar" stylešž œœ!œ˜LK– "Cedar" stylešž œœ5˜GK– "Cedar" style˜K– "Cedar" styleš žœœ%œœœ ˜fK– "Cedar" style˜K– "Cedar" stylešž œœ/œ ˜QK– "Cedar" style˜K– "Cedar" stylešž œœ!œ˜HK– "Cedar" style˜K– "Cedar" stylešž œœœ˜HK– "Cedar" style˜– "Cedar" styleš ž œœœœœœ ˜cK– "Cedar" stylešœ2™2K– "Cedar" stylešœH™HK– "Cedar" stylešœ;™;—K– "Cedar" style˜K– "Cedar" stylešžœœTœ˜oK– "Cedar" style˜K– "Cedar" stylešžœœœŸjœ˜£K– "Cedar" style˜K– "Cedar" styleš žœœ)œœ œ˜QK– "Cedar" style˜K– "Cedar" styleš ž œœ;œœœ˜nK– "Cedar" style˜K– "Cedar" styleš žœœœœœ Ÿ ˜_K˜K™)K˜Kšž œœœ˜>K˜Kš žœœœœœ˜PK– "Cedar" style™K– "Cedar" style™K– "Cedar" stylešœ˜——…—p(†