<> <> <> <> DIRECTORY CD, CDAtomicObjects, CDBasicsInline, Core, CoreClasses, CoreFlat, DABasics, RefTab; CoreGeometry: CEDAR DEFINITIONS IMPORTS CDBasicsInline = BEGIN <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> CellType : TYPE = Core.CellType; Properties : TYPE = Core.Properties; ROPE: TYPE = Core.ROPE; Wire: TYPE = Core.Wire; CellInstance: TYPE = CoreClasses.CellInstance; FlatWire: TYPE = CoreFlat.FlatWire; FlatWireRec: TYPE = CoreFlat.FlatWireRec; FlatCellType: TYPE = CoreFlat.FlatCellType; FlatCellTypeRec: TYPE = CoreFlat.FlatCellTypeRec; Bindings: TYPE = CoreFlat.Bindings; InstancePath: TYPE = CoreFlat.InstancePath; <> Rect: TYPE = DABasics.Rect; Layer: TYPE = CD.Layer; Object: TYPE = CD.Object; <> <> Transformation: TYPE = CD.Transformation; Instance: TYPE = RECORD [obj: Object, trans: Transformation]; Instances: TYPE = LIST OF Instance; <> Decoration: TYPE = REF DecorationRec; <> <> <<>> <> DecorationRec: TYPE = PRIVATE RECORD [ name: ROPE, -- Documentation purpose only pinsProp: ATOM, -- Hangs on each public wire to specify the pins of the public. Pins should be understood as the more general meaning of "interface geometry", and are not only pins but also contacts, rectangles... objectProp: ATOM, -- Hangs on some cellTypes to specify the corresponding object. Currently only cellTypes of the recordCellClass and transistors have this decoration. geometryProp: ATOM, -- Hangs on every internal wires of record cellTypes to specify the geometry of the internal (but only at this level in the record). transProp: ATOM, -- hangs on every CoreClasses.CellInstance of record cellTypes to specify the corresponding transformation. expandPinsCount: INT _ 3 -- allows playing with space/time tradeoffs ]; CreateDecoration: PROC [name: ROPE] RETURNS [decoration: Decoration]; <> <> <> <<>> EachInstanceProc: TYPE = PROC [instance: Instance] RETURNS [quit: BOOL _ FALSE]; LazyEnumerateProc: TYPE = PROC [eachInstance: EachInstanceProc, data1, data2: REF _ NIL] RETURNS [quit: BOOL _ FALSE]; <> <> <<>> EnumeratePins: PROC [decoration: Decoration, public: Wire, eachInstance: EachInstanceProc] RETURNS [quit: BOOL]; <> <> <<>> CountPins: PROC [decoration: Decoration, public: Wire] RETURNS [count: INT _ 0]; <> <<>> HasPins: PROC [decoration: Decoration, public: Wire] RETURNS [BOOL]; <> GetPins: PROC [decoration: Decoration, public: Wire] RETURNS [pins: Instances]; <> <> <> <<>> PutPins: PROC [decoration: Decoration, public: Wire, pins: Instances]; <> <> <<>> AddPins: PROC [decoration: Decoration, public: Wire, pins: Instances]; <> <> <> <> <> <<>> HasObject: PROC [decoration: Decoration, cellType: CellType] RETURNS [BOOL]; <<>> GetObject: PROC [decoration: Decoration, cellType: CellType] RETURNS [object: Object]; <<>> PutObject: PROC [decoration: Decoration, cellType: CellType, object: Object]; <> <> <<>> EachFlatWireProc: TYPE = PROC [wire: Wire, flatWire: FlatWireRec, trans: Transformation] RETURNS [quit: BOOL _ FALSE]; <> <> EachFlatCellProc: TYPE = PROC [bindings: Bindings, cell: CellType, flatCell: FlatCellTypeRec, trans: Transformation] RETURNS [quit: BOOL _ FALSE]; < CoreFlat.FlatWire]. When cell=root, bindings=NIL>> <> LeafProc: TYPE = PROC [cellType: CellType, bindings: Bindings] RETURNS [BOOL]; <> EnumerateFlatGeometry: PROC [decoration: Decoration, root: CellType, target: FlatCellTypeRec _ CoreFlat.allFlatCells, leafProc: LeafProc, eachFlatWire: EachFlatWireProc _ NIL, eachFlatCell: EachFlatCellProc _ NIL] RETURNS [quit: BOOL]; <> <> <> <> <> <> <<>> EnumerateAllGeometry: PROC [decoration: Decoration, cell: CellType, wire: Wire, eachInstance: EachInstanceProc] RETURNS [quit: BOOL]; <> <> <<>> EnumerateGeometry: PROC [decoration: Decoration, wire: Wire, eachInstance: EachInstanceProc] RETURNS [quit: BOOL]; <> <> <> <<>> HasGeometry: PROC [decoration: Decoration, wire: Wire] RETURNS [BOOL]; <> GetGeometry: PROC [decoration: Decoration, wire: Wire] RETURNS [geometry: Instances]; <> <<>> PutGeometry: PROC [decoration: Decoration, wire: Wire, geometry: Instances]; <> <> <<>> AddGeometry: PROC [decoration: Decoration, wire: Wire, geometry: Instances]; <> <> <> <> <<>> HasTrans: PROC [decoration: Decoration, cellInstance: CellInstance] RETURNS [BOOL]; <> <<>> GetTrans: PROC [decoration: Decoration, cellInstance: CellInstance] RETURNS [trans: Transformation]; <> <<>> PutTrans: PROC [decoration: Decoration, cellInstance: CellInstance, trans: Transformation]; <> <> <> <> <> Side: TYPE = DABasics.Side; Sides: TYPE = DABasics.Sides; noSide: Sides = DABasics.noSide; GetSides: PROC [ir: Rect, pin: Instance] RETURNS [sides: Sides _ noSide]; EachPinProc: TYPE = PROC [min, max: INT, side: Side, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE]; EnumerateSides: PROC [decoration: Decoration, cellType: CellType, wire: Wire, eachPin: EachPinProc] RETURNS [quit: BOOL]; <> EachWirePinProc: TYPE = PROC [wire: Wire, min, max: INT, side: Side, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE]; EnumerateWireSides: PROC [decoration: Decoration, cellType: CellType, eachWirePin: EachWirePinProc] RETURNS [quit: BOOL]; <> <> EnumerateNonOverlappingSides: PROC [decoration: Decoration, cellType: CellType, eachWirePin: EachWirePinProc] RETURNS [quit: BOOL]; <> EachSortedPinProc: TYPE = PROC [wire: Wire, min, max: INT, layer: CD.Layer] RETURNS [quit: BOOL _ FALSE]; EnumerateSortedSides: PROC [decoration: Decoration, cellType: CellType, side: Side, eachSortedPin: EachSortedPinProc] RETURNS [quit: BOOL]; <> <> <> CreateShell: PROC [decoration: Decoration, cellType: CellType, withCuteFonts: BOOL _ FALSE] RETURNS [shell: Object]; <> <> <> <> CheckInterface: PROC [decoration: Decoration, cellType: CellType] RETURNS [ok: BOOL]; <> <<>> CheckInternal: PROC [decoration: Decoration, record: CellType] RETURNS [ok: BOOL]; <> <> PutLazyPins: PROC [decoration: Decoration, public: Wire, lazyPinsEnumerate: LazyEnumerateProc, data1, data2: REF _ NIL]; <> <<>> PutIndirectLazyPins: PROC [decoration: Decoration, public: Wire, indirect: Wire]; <> <> <<>> PutIndirectsLazyPins: PROC [decoration: Decoration, public: Wire, indirects: LIST OF Wire]; <> <> <<>> AddIndirectLazyPins: PROC [decoration: Decoration, public: Wire, indirect: Wire]; <> <> <<>> PutTransWireIRLazyPins: PROC [decoration: Decoration, public: Wire, indirect: Wire, trans: Transformation, ir: Rect]; <> <> <<>> PutRecordLazyPins: PROC [decoration: Decoration, record: CellType, ir: Rect]; <> <> <> PutLazyGeometry: PROC [decoration: Decoration, internal: Wire, lazyGeometryEnumerate: LazyEnumerateProc, data1, data2: REF _ NIL]; <> <> TouchProc: TYPE = PROC [touch: TouchProc, instance1, instance2: Instance] RETURNS [BOOL _ FALSE]; <> <> <> <<>> Touch: TouchProc; <> <<>> TouchRect: PROC [touch: TouchProc, instance: Instance, rect: Rect, layer: CD.Layer] RETURNS [BOOL _ FALSE]; <> TouchList: PROC [touch: TouchProc, instances: Instances, instance: Instance] RETURNS [BOOL _ FALSE]; <> TouchListList: PROC [touch: TouchProc, instances1, instances2: Instances] RETURNS [BOOL _ FALSE]; <> <<>> EnumerateNeighbors: PROC [decoration: Decoration, touch: TouchProc, inX: BOOL, ct1, ct2: CellType, eachPair: PROC [Wire, Wire] RETURNS [quit: BOOL _ FALSE]] RETURNS [BOOL]; <> <> <> <<>> WirePair: TYPE = RECORD [wire1, wire2: Wire]; CreateNeighborsCache: PROC RETURNS [cache: RefTab.Ref]; <> CachedEnumerateNeighbors: PROC [decoration: Decoration, touch: TouchProc, inX: BOOL, ct1, ct2: CellType, cache: RefTab.Ref] RETURNS [LIST OF WirePair]; <> <> <> Length: PROC [instances: Instances] RETURNS [count: INT _ 0]; BBox: PROC [instance: Instance] RETURNS [rect: Rect]; InlineBBox: PROC [instance: Instance] RETURNS [rect: Rect] = INLINE {rect _ CDBasicsInline.MapRect[instance.obj.bbox, instance.trans]}; AtEdge: PROC [ir: Rect, instance: Instance] RETURNS [BOOL]; <> <<>> TransfedNotAtEdge: PROC [trans: Transformation, ir: Rect, instance: Instance] RETURNS [BOOL]; <> <> << NOT AtEdge[ir, Transform[trans, instance]].>> <<>> Intersect: PROC [clipRect: Rect, instance: Instance] RETURNS [BOOL]; <> Transform: PROC [trans: Transformation, instance: Instance] RETURNS [Instance]; <> TransformList: PROC [trans: Transformation, instances: Instances] RETURNS [Instances]; <> <> DrawListToInstances: PROC [drawList: CDAtomicObjects.DrawList] RETURNS [Instances]; <> FlattenInstance: PROC [instance: Instance, eachInstance: EachInstanceProc] RETURNS [quit: BOOL _ FALSE]; <> < NIL>> < called back on each individual component>> < called back on each individual component>> < ERROR>> <<>> <> <<>> CDPinToCoreGeometryPin: PROC [cdPin: CD.Object, props: CD.PropList] RETURNS [coreGeometryPin: Object]; CoreGeometryPinToCDPin: PROC [coreGeometryPin: Instance] RETURNS [cdPin: CD.Instance]; IsCoreGeometryPin: PROC [coreGeometryPin: Object] RETURNS [BOOL]; GetCoreGeometryPinLayer: PROC [coreGeometryPin: Instance] RETURNS [layer: CD.Layer]; <<>> END.