<> <> <> <> DIRECTORY CD, CDBasics, Core, CoreClasses, CoreFlat; CoreGeometry: CEDAR DEFINITIONS IMPORTS CDBasics = 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 = CD.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]; <> <> EachFlatCellProc: TYPE = PROC [bindings: Bindings, cell: CellType, flatCell: FlatCellTypeRec, trans: Transformation]; < CoreFlat.FlatWire]. When cell=root, bindings=NIL>> <> LeafProc: TYPE = PROC [cellType: CellType] RETURNS [BOOL]; <> EnumerateFlatGeometry: PROC [decoration: Decoration, root: CellType, leafProc: LeafProc, eachFlatWire: EachFlatWireProc _ NIL, eachFlatCell: EachFlatCellProc _ NIL]; <> <> <> <> <> <<>> EnumerateGeometry: PROC [decoration: Decoration, internal: Wire, eachInstance: EachInstanceProc] RETURNS [quit: BOOL]; <> <> <> <<>> HasGeometry: PROC [decoration: Decoration, internal: Wire] RETURNS [BOOL]; <> GetGeometry: PROC [decoration: Decoration, internal: Wire] RETURNS [geometry: Instances]; <> <> <<>> PutGeometry: PROC [decoration: Decoration, internal: Wire, geometry: Instances]; <> <> <<>> AddGeometry: PROC [decoration: Decoration, internal: Wire, geometry: Instances]; <> <> <> GetTrans: PROC [decoration: Decoration, cellInstance: CellInstance] RETURNS [trans: Transformation]; <> <<>> PutTrans: PROC [decoration: Decoration, cellInstance: CellInstance, trans: Transformation]; <> <> <> <> <> Side: TYPE = {bottom, right, top, left}; Sides: TYPE = PACKED ARRAY Side OF BOOL _ noSide; noSide: Sides = ALL [FALSE]; 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]; <> <> Length: PROC [instances: Instances] RETURNS [count: INT _ 0]; BBox: PROC [instance: Instance] RETURNS [rect: Rect]; InlineBBox: PROC [instance: Instance] RETURNS [rect: Rect] = INLINE {rect _ CDBasics.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]; <> <> FlattenInstance: PROC [instance: Instance, eachInstance: EachInstanceProc] RETURNS [quit: BOOL _ FALSE]; <> < NIL>> < called back on each individual component>> < called back on each individual component>> < ERROR>> <<>> <> <<>> TouchProc: TYPE = PROC [instance1, instance2: Instance] RETURNS [BOOL _ FALSE]; <> <<>> Touch: TouchProc; <<>> TouchRect: PROC [instance: Instance, rect: Rect, layer: CD.Layer] RETURNS [BOOL _ FALSE]; <> TouchList: PROC [instances: Instances, instance: Instance] RETURNS [BOOL _ FALSE]; <> TouchListList: PROC [instances1, instances2: Instances] RETURNS [BOOL _ FALSE]; <> <> <<>> 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.