<> <> <> <> <> DIRECTORY CD USING [Instance, Layer, Object, PropList, Rect], Core USING [CellType, Properties, ROPE, Wire], CoreClasses USING [CellInstance]; Sinix: CEDAR DEFINITIONS = BEGIN <> <> <> <> <> CellType: TYPE = Core.CellType; Wire: TYPE = Core.Wire; Object: TYPE = CD.Object; Properties: TYPE = Core.Properties; ROPE: TYPE = Core.ROPE; <> ExtractProc: TYPE = PROC [obj: Object, mode: Mode, properties: CD.PropList _ NIL, userData: REF _ NIL] RETURNS [result: REF, props: Properties _ NIL]; <> <> <<- NIL. The object should be forgotten completely.>> <<- Wire. The returned wire is decorated with pinsProp. There might be a name, for example if the wire was a CD pin. The returned wire is always copied by Sinix, so caching should not be feared...>> <<- CellType. The returned cellType has its public decorated with pinsProp.>> <> <> Extract: ExtractProc; <> RegisterExtractProc: PROC [key: ATOM, extractProc: ExtractProc]; <> ExtractCell: ExtractProc; <> ExtractAbut: ExtractProc; <> ExtractExpand: ExtractProc; <> ExtractWire: ExtractProc; <> ExtractPin: ExtractProc; <> ExtractNull: ExtractProc; <> ExtractError: ExtractProc; <> <> Mode: TYPE = REF ModeRec; ModeRec: TYPE = RECORD [ name: ROPE, -- documentation purpose only extractProcProp: ATOM, pinsProp: ATOM, -- Hangs on each public wire to specify the corresponding pins. Pins should be understood as the more general meaning of "interface geometry", and are not only pins but also rectangles. Access to this property should be made via the procedural interface since pins might be enumerated in a lazy manner. wireGeometryProp: ATOM, -- hangs on every internal wires (of type Core.Wire) to specify the corresponding geometry (but only at this level in the data structure). The property value is of type LIST OF CD.Instance. instanceProp: ATOM, -- hangs on every CoreRecord.Instance to specify the corresponding CD.Instance. cacheProp: ATOM, -- property under which lies the cache (extracted CellType) cachePropsProp: ATOM, -- property under which lies the cache (extracted props) equalProc: PROC [Object, CD.PropList, REF, CD.PropList, REF] RETURNS [BOOL], -- called with the properties and userData for the previous call and the ones for this call and returns TRUE if they are "Equal". nbOfLayers: NAT _ 1, -- determines the number of interesting layers corresponding to subinstances of obj. Efficiency hack: should be defaulted for clients unaware of implementation details. instanceLayer: PROC [CD.Instance] RETURNS [LayerRange] _ NIL, -- determines the [min .. max] layers corresponding to a subinstance of obj. Efficiency hack: should be defaulted for clients unaware of implementation details. flatNameSpace: BOOL _ FALSE, -- specifies if fusion by name should consider flat names only clipDistance: INT _ 0 -- this property tells by how much to extend the outer rect in order to do clipping ]; LayerRange: TYPE = RECORD [min, max: NAT]; <> AlwaysTrue: PROC [obj: CD.Object, properties1: CD.PropList, userData1: REF, properties2: CD.PropList, userData2: REF] RETURNS [BOOL _ TRUE]; AlwaysFalse: PROC [obj: CD.Object, properties1: CD.PropList, userData1: REF, properties2: CD.PropList, userData2: REF] RETURNS [BOOL _ FALSE]; CompareProps: PROC [obj: CD.Object, properties1: CD.PropList, userData1: REF, properties2: CD.PropList, userData2: REF] RETURNS [BOOL]; <> AppendPinsProp: PROC [mode: Mode, wire: Wire, pins: LIST OF CD.Instance]; AddPinsProp: PROC [mode: Mode, wire: Core.Wire, pin: CD.Instance]; PutPinsProp: PROC [mode: Mode, wire: Wire, geometry: LIST OF CD.Instance]; GetPinsProp: PROC [mode: Mode, wire: Wire] RETURNS [geometry: LIST OF CD.Instance]; <<>> <> LazyPinsData: TYPE = REF LazyPinsDataRec; LazyPinsDataRec: TYPE = RECORD [ ir: CD.Rect, -- interestRect of the object data: REF, getLazyPins: PROC [Mode, Wire, CD.Rect, REF] RETURNS [LIST OF CD.Instance] -- mode, wire, ir, data are the arguments ]; PutLazyPinsProp: PROC [mode: Mode, wire: Wire, lazyPinsData: LazyPinsData]; <> RecordGetLazyPins: PROC [mode: Mode, wire: Wire, ir: CD.Rect, data: REF] RETURNS [pins: LIST OF CD.Instance]; AppendWireGeometryProp: PROC [mode: Mode, wire: Wire, geometry: LIST OF CD.Instance]; AddWireGeometryProp: PROC [mode: Mode, wire: Wire, cdInstance: CD.Instance]; PutWireGeometryProp: PROC [mode: Mode, wire: Wire, geometry: LIST OF CD.Instance]; GetWireGeometryProp: PROC [mode: Mode, wire: Wire] RETURNS [geometry: LIST OF CD.Instance]; PutInstanceTransformationProp: PROC [mode: Mode, instance: CoreClasses.CellInstance, transf: CD.Instance]; GetInstanceTransformationProp: PROC [mode: Mode, instance: CoreClasses.CellInstance] RETURNS [transf: CD.Instance]; <> TouchProc: TYPE = PROC [mode: Mode, instance1, instance2: CD.Instance] RETURNS [yes: BOOL _ FALSE]; <> touchProcProp: ATOM; Touch: TouchProc; <> <> TouchExpand: TouchProc; TouchPin: TouchProc; TouchRect: TouchProc; TouchCell: TouchProc; TouchAtomic: TouchProc; <> <> TouchRectObject: PROC [mode: Mode, instance: CD.Instance, rect: CD.Rect, layer: CD.Layer] RETURNS [yes: BOOL _ FALSE]; Transform: PROC [transformation, instance: CD.Instance] RETURNS [result: CD.Instance]; TransformList: PROC [transformation: CD.Instance, instances: LIST OF CD.Instance] RETURNS [result: LIST OF CD.Instance _ NIL]; TouchList: PROC [mode: Mode, instances: LIST OF CD.Instance, instance: CD.Instance] RETURNS [yes: BOOL _ FALSE]; TouchListList: PROC [mode: Mode, instances1, instances2: LIST OF CD.Instance] RETURNS [yes: BOOL _ FALSE]; <> <> Signal: SIGNAL [cause: ATOM, data: LIST OF REF _ NIL]; <> <<$InternalBug: please notify an implementor.>> <<$CallerBug: something is obviously wrong in client code.>> <<$FusionPropError: fusion of incompatible properties. >> <<$StructureMismatch: fusion of two wires with incompatible structure.>> <<$FusionByNameError: something wrong during fusion by name.>> <<$StructuralLoop: some wire structure has a cycle.>> <<>> END.