DIRECTORY Core, CoreClasses, IO, Pipal, PipalConnect, PipalCore, RefTab; PipalSinix: CEDAR DEFINITIONS = BEGIN Mode: TYPE = REF ModeRec; layoutMode: Mode; schematicsMode: Mode; rawLayoutMode: Mode; Context: TYPE = REF; ExtractProc: TYPE = PROC [object: Pipal.Object, mode: Mode, context: Context _ NIL] RETURNS [result: REF, props: Core.Properties _ NIL]; Extract: ExtractProc; RegisterExtractProc: PROC [key: ATOM, extractProc: ExtractProc]; FetchExtractProc: PROC [key: ATOM] RETURNS [extractProc: ExtractProc _ NIL]; ExtractConnectized: ExtractProc; ExtractCellAsWire: ExtractProc; ExtractNull: ExtractProc; iconClass: Core.CellClass; CreateIcon: PROC [cellType: Core.CellType, name: Core.ROPE _ NIL, props: Core.Properties _ NIL] RETURNS [icon: Core.CellType]; InternalBug: SIGNAL []; CallerBug: SIGNAL []; FusionPropMismatch: SIGNAL [object: Pipal.Object, prop: ATOM, value1, value2: REF]; FusionStructureMismatch: SIGNAL [object: Pipal.Object, wire1, wire2: Core.Wire]; StructureMismatch: SIGNAL [object: Pipal.Object, index: NAT, actual, subPublic: Core.WireSeq]; FusionByNameMismatch: SIGNAL [object: Pipal.Object, msg: Core.ROPE, wire: Core.Wire]; StructuralLoop: SIGNAL [object: Pipal.Object, wire: Core.Wire]; ModeRec: TYPE = RECORD [ decoration: PipalCore.Decoration, extractMethod: Pipal.Method, connectMode: PipalConnect.Mode, extractAnnotationProp: ATOM, objectEqual: PROC [Pipal.Object, Context, Context] RETURNS [BOOL], postProcessFused: PostProcessProc ]; PostProcessProc: TYPE = PROC [mode: Mode, object: Pipal.Object, context: Context, fused: RefTab.Ref, instances: LIST OF CoreClasses.CellInstance]; SchematicsFusionByName: PUBLIC PostProcessProc; CreateRoot: PROC [fused: RefTab.Ref, size: NAT] RETURNS [wire: Core.Wire]; RootWire: PROC [fused: RefTab.Ref, wire: Core.Wire] RETURNS [rootWire: Core.Wire]; EnumerateRoots: PUBLIC PROC [fused: RefTab.Ref, each: PROC [wire: Core.Wire]]; StructuredFusion: PROC [mode: Mode, object: Pipal.Object, fused: RefTab.Ref, wire1, wire2: Core.Wire] RETURNS [wire: Core.Wire]; PutF: PROC [format: Core.ROPE, v1, v2, v3, v4, v5: IO.Value _ [null[]]]; NonCachingExtract: PRIVATE ExtractProc; END. ώPipalSinix.mesa Copyright Σ 1985, 1986, 1987, 1988 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet August 15, 1985 11:14:27 am PDT Bertrand Serlet April 15, 1988 10:58:20 pm PDT Pradeep Sindhu December 2, 1985 6:42:37 pm PST Jean-Marc Frailong June 20, 1986 7:15:22 pm PDT Theory Sinix is an multi purpose extractor that coverts pictures into meaningful Core data structures. Sinix takes 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. The data structure resulting of extraction, Decorated Core, is described by the interface PipalCore. The extractor promotes public all internal wires that cross the cell boundary (for cells), and may be others (depending on the Mode). Extraction Mode Extraction is technology-independent, and even better Mode-independent. However decorations must be different for every mode, and so there is a Mode argument in this Mode-independent extractor ... Default extraction mode for layout. Default extraction mode for schematics. Raw extraction mode for layout. Extraction 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: - NIL. The object should be forgotten completely. - a Core.Wire. The returned wire is decorated with mode.decoration.portsProp. There might be a name. The returned wire is always copied by Sinix, so caching should not be feared... Dagness is considered. props must be NIL. - a LIST OF Core.Wire. The returned wires are decorated with mode.decoration.portsProp. There might be a name. The returned wire are always copied by Sinix, so caching should not be feared... Dagness is considered across returned wires. props must be NIL. - a Core.CellType. The returned cellType has its public decorated with mode.decoration. Returned props allows putting properties on CellInstances. An arbitrary REF (context) is passed recursively. First looks for the cache on the object, and returns it if found. Otherwise the mode.extractMethod is applied to the object. If no method is found, ExtractConnectized is applied instead. Some ExtractProcs Annotations allow special extraction when the key is mode.extractAnnotationProp. Then the value must be an atom correponding to a registered ExtractProc. Each ExtractProc must be registered, in order to be annotated. All the following ExtractProcs are registred under the atom named as the proc (i.e. ExtractNull has been registred with the key $ExtractNull). For "less global" extract functions, the convention is the prefix the name of the atom with the name of the module defining the ExtractProc. Connectizes and extracts according to the connector type. Used for primitive objects which extract as one electric component. Used for all objects that are invisible when extracted. Icon Class An icon cell type has the same Core data structure as some other cell type but has a new property list. Exceptions Extract functions, in particular ExtractCell, may raise the following exceptions. Please notify maintainors. Something is obviously wrong in client code. object is the object being extracted. prop is the property for which the mismatch occurs. value1 and value2 are the values mismatching. object is the object being extracted. wire1 and wire2 are the two wires that have mismatching structures. object is the object being extracted. wire and subPublic are the two wires that have mismatching structures in the instance index. object is the object being extracted. msg is the error message when fusing by name. wire is the wire being considered. object is the object being extracted. wire is the wire that provokes a loop in the Core.Wire structure [probably]. Mode Details to store/retrieve decorations must be the method of an ExtractProc previously registered. called with the context for the previous call to ExtractCell and brothers and the one for this call and returns TRUE if they are "Equal". Other Private Details Like IO.PutF, but pays attention to internal flag for redirecting Extract progress report. ExtractProc that does not cache its results. Can be used for implementing an ExtractProc needing to call recursively Extract and then to modify in place the result. Of course, use with care! Κs– "cedar" style˜– "Cedar" stylešœ™JšœN™NIcodešœ7Οk™:Kšœ.™.Kšœ+™.Kšœ,™/J˜—š ˜ Jšœœ˜Jšœ˜Jšœ˜J˜—JšΠbn œœ œ˜%head™Ibodyšœμœ‹Οiœ*™²Mšœ…™…—™M™ΕM˜Jšœœœ ˜šœ˜J™#—šœ˜J™'—šœ˜J™——™ Jšœ œœ˜š œ œœ7œœ œœ˜ˆJšœyœCΟbœ@™‡šœ(™(Jšœœ-™2Jšœΰœ™ζJšœœœυœ™†Jšœ”™”—Jšœ œ!™1—J˜šžœ˜Jšœ½™½——™šœœ™œM™—šΟnœœœ˜@J™>—š ‘œœœœœ˜LJ˜—šœœ™œM™—š‘œ˜ Jšœ;™;—š‘œ˜JšœC™C—š‘ œ˜Jšœ7™7——™ M™iK˜šœ˜K˜—Kš ‘ œœ&œœœœ˜~—™ ™QM™—š‘ œœ˜J™J˜—š‘ œœ˜J™,J˜—š‘œœœœ˜SJ™%Jšœ3™3Jšœ-™-J™—š‘œœ1˜PJ™%J™CJ™—š‘œœœ#˜^J™%Jšœ\™\J™—š‘œœ"œ˜UJ™%J™-J™"J™—š‘œœ)˜?J™%JšœL™L——™ šœ œœ˜šœ!˜!Jšœ™—šœ˜Jšœ;™;—J˜Jšœœ˜šœ œ"œœ˜BJšœpœ™Š—Kšœ!˜!˜J˜——š œœœTœœ˜’J˜—š‘œœ˜/J˜—Jš‘ œœœœ˜JJš‘œœ&œ˜RKš‘œœœœ˜NJš‘œœPœ˜€—™š‘œœœœ˜HJšœœS™ZJ™—š‘œœ ˜'Jšœ.™.Jšœy™yJšœ™J™——Jšœ˜—…—xι