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]; 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]; END. ¬Sinix.mesa Copyright c 1985 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet August 15, 1985 11:14:27 am PDT Bertrand Serlet June 1, 1986 2:00:32 pm PDT Pradeep Sindhu December 2, 1985 6:42:37 pm PST Theory Sinix (reduced Spinifex) is an extractor taking into account properties on the layout to produce a Core description with enough back-pointers to the geometry to be able to do DRC, compute Strays for the circuit simulator, or generate geometric information for the router. This interface defines what is the result of the extraction, and a few functions to manipulate or create the Core Data Structure. The extractor promotes public all internal wires that cross the cell boundary (for cells). As ever Extraction framework and common ExtractProcs The atom extractProcProp is the property that users can set on objects, instances or on object classes. Its value is an ATOM corresponding to a registered ExtractProc. The dispatch function Extract uses it, and is soforth programmed in an Object Oriented style. The result must be one of the following types: - 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. Properties is passed recursively to allow access to instances properties, and the returned props allows putting properties on CellInstances (props on Wire are discarded) (pending problem for Wire properties ...). An arbitrary REF (userData) is passed recursively. First looks for the cache on the object, and returns it if found. Otherwise a search for the ExtractProc to apply is made, first by searching for extractProcProp on the given properties, then on the object, and finally on the object class. If no proc is found, calls ExtractExpand. Caching is done (but of course clients can also do their own caching). All the following ExtractProcs are registred under the atom named as the proc (i.e. ExtractCell has been registred with the key $ExtractCell). For "less global" extract functions, the convention is the prefix the name of the atom with the name of the module defining the ExtractProc. The interesting one! A faster proc than ExtractCell for objects of type PWObjects.abut*Class Expands the object and calls again Extract. Used for all objects such as rectangles or contacts that are one electric component plus themselves as geometry. The returned category is $Wire. Used for symbolic such as pins or marks. The returned category is $Wire. The wire inherits the name of the pin. Used for all objects that are invisible when extracted. Used for all objects that should not be extracted. Extraction mode min and max are included Operations for an easy management of the properties PinsProp can also be retrieved in a lazy way. The following is to set the retrieval function. The basic lazy way to store pins is to use the following function, with lazyPinsData.data being a recordCell Geometry Primitives TouchProcs are put as properties of instances, objects, or classes. It is strongly recommended to put them as instance properties, so that the TouchProc of a mode does not interfere with the TouchProc of other modes. First clips using mode.clipDistance. Then Fetches the right TouchProc (on the instance/object/class of the first argument, and applies it. For atomic objects (rList) Geometry Utilities Errors Extract functions, in particular ExtractCell may raise the following exception Current causes of exception are $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. Κ– "cedar" style˜– "Cedar" stylešœ ™ Jšœ Οmœ1™˜[Jšœžœ‘S˜jJ˜J˜—šœ žœžœ žœ˜*J™—Jš  œžœžœžœžœžœžœžœžœžœ˜ŒJš  œžœžœžœžœžœžœžœžœžœ˜ŽJš  œžœžœžœžœžœžœžœžœ˜‡—™3Jš  œžœ žœžœžœ ˜IJš  œžœ$žœ ˜BJš   œžœ$žœžœžœ ˜JJš   œžœžœ žœžœžœ ˜SJ™J™^Jšœžœžœ˜)šœžœžœ˜ Jšœžœ ‘˜,Jšœžœ˜ Jšœ žœžœžœžœžœžœžœ ‘)˜tJšœ˜—Jš œžœ6˜KJšœl™lJš œžœžœ žœžœžœžœžœ ˜mJ˜Jš  œžœ$žœžœžœ ˜UJš œžœ&žœ ˜LJš  œžœ$žœžœžœ ˜RJš  œžœžœ žœžœžœ ˜[J˜Jš œžœ:žœ ˜jJš œžœ2žœ žœ ˜s—™Jš  œžœžœ$žœ žœžœžœ˜cJ˜Jšœά™άJšœžœ˜J˜šŸœ ˜J™$J™e—J˜JšŸ œ ˜JšŸœ ˜JšŸ œ ˜JšŸ œ ˜šŸ œ ˜J™——™JšΠbnœžœžœžœžœžœžœžœ˜vJ˜Jš   œžœžœ žœ žœ ˜VJ˜Jš  œžœžœžœžœžœ žœ žœžœžœ žœ˜~J˜Jš  œžœžœžœžœžœ žœžœžœ˜pJ˜Jš  œžœ&žœžœžœ žœžœžœ˜j—™J™Nš œžœ žœžœžœžœžœ˜6™J™+J™8J™6J™DJ™:J™1——L™—J˜Jšžœ˜—…—*Ν