DIRECTORY Imager, Pipal, PipalInt; PipalMos: CEDAR DEFINITIONS = BEGIN Layer: TYPE = ATOM; errorLayer: Layer; commentLayer: Layer; blueCommentLayer: Layer; RopeToLayer: PROC [rope: Pipal.ROPE] RETURNS [layer: Layer _ NIL]; LayerToRope: PROC [layer: Layer] RETURNS [rope: Pipal.ROPE]; RegisterLayerColor: PROC [layer: Layer, color: Imager.ConstantColor]; FetchLayerColor: PROC [layer: Layer] RETURNS [color: Imager.ConstantColor _ NIL]; IsDifLayer: PROC [layer: Layer] RETURNS [BOOL]; IsWellLayer: PROC [layer: Layer] RETURNS [BOOL]; IsSchematicLayer: PROC [layer: Layer] RETURNS [BOOL]; boxClass: Pipal.Class; Box: TYPE = REF BoxRec; BoxRec: TYPE = RECORD [size: PipalInt.Size, layer: Layer]; CreateBox: PROC [size: PipalInt.Size, layer: Layer] RETURNS [box: Box]; starClass: Pipal.Class; Star: TYPE = REF StarRec; StarRec: TYPE = RECORD [ overlayStar: BOOL, -- allows distinguishing between instance satellites and object satellites master: Pipal.Object, satellites: SEQUENCE size: NAT OF Pipal.Object -- satellites can only be Text or transformations of Text ]; CreateStar: PROC [master: Pipal.Object, satellites: Pipal.Objects, overlayStar: BOOL _ FALSE] RETURNS [star: Star]; GetSatelliteText: PROC [satellite: Pipal.Object] RETURNS [text: Text _ NIL]; GetStarTexts: PROC [star: Star] RETURNS [LIST OF Text]; GetNonItalicRopes: PROC [star: Star] RETURNS [LIST OF Pipal.ROPE]; routingClass: Pipal.Class; Routing: TYPE = REF RoutingRec; RoutingRec: TYPE = RECORD [nodes: SEQUENCE size: NAT OF Pipal.Object]; CreateRouting: PROC [nodes: Pipal.Objects] RETURNS [routing: Routing]; tilingClass: Pipal.Class; Tiling: TYPE = REF TilingRec; TilingRec: TYPE = RECORD [sizeX, sizeY: NAT, xyTile: XYTileProc, data: REF _ NIL]; XYTileProc: TYPE = PROC [x, y: NAT, data: REF _ NIL] RETURNS [Pipal.Object]; CreateTiling: PROC [sizeX, sizeY: NAT, xyTile: XYTileProc, data: REF _ NIL] RETURNS [tiling: Tiling]; EachTileProc: TYPE = PROC [x, y: NAT, tile: Pipal.Object, pos: PipalInt.Position] RETURNS [quit: BOOL _ FALSE]; EnumerateTiles: PROC [tiling: Tiling, each: EachTileProc] RETURNS [quit: BOOL _ FALSE]; markerClass: Pipal.Class; Marker: TYPE = REF MarkerRec; MarkerRec: TYPE = RECORD [size: PipalInt.Size, layer: Layer]; CreateMarker: PROC [size: PipalInt.Size, layer: Layer] RETURNS [marker: Marker]; schematicIconClass: Pipal.Class; SchematicIcon: TYPE = REF SchematicIconRec; SchematicIconRec: TYPE = RECORD [ child: Pipal.Object, expression: Pipal.ROPE, -- name of referee or expr to evaluate code: BOOL, -- indicate whether expr is code or the name of a cell type: SchematicIconType ]; SchematicIconType: TYPE = {cell, wire, unnamedWire}; CreateSchematicIcon: PROC [child: Pipal.Object, expression: Pipal.ROPE, code: BOOL, type: SchematicIconType] RETURNS [icon: SchematicIcon]; schematicSequenceClass: Pipal.Class; SchematicSequence: TYPE = REF SchematicSequenceRec; SchematicSequenceRec: TYPE = RECORD [ child: Pipal.Object, repetition: Pipal.ROPE -- expression to evaluate indicating the repetition factor ]; CreateSchematicSequence: PROC [child: Pipal.Object, repetition: Pipal.ROPE] RETURNS [seq: SchematicSequence]; textClass: Pipal.Class; Text: TYPE = REF TextRec; TextRec: TYPE = RECORD [contents: Pipal.ROPE, font: Imager.Font]; CreateText: PROC [contents: Pipal.ROPE, font: Imager.Font] RETURNS [text: Text]; GetTextFontName: PROC [text: Text] RETURNS [fontName: Pipal.ROPE]; IsItalic: PROC [fontName: Pipal.ROPE] RETURNS [BOOL]; pictureClass: Pipal.Class; Picture: TYPE = REF PictureRec; PictureRec: TYPE = RECORD [size: PipalInt.Size, imagerObject: Imager.Object]; CreatePicture: PROC [size: PipalInt.Size, imagerObject: Imager.Object] RETURNS [picture: Picture]; CreatePictureFromInterpress: PROC [size: PipalInt.Size, master: Pipal.ROPE] RETURNS [picture: Picture]; indirectProp: ATOM; atomicProp: ATOM; biAtomicProp: ATOM; transistorProp: ATOM; isAtomicMethod: Pipal.Method; IsAtomicProc: TYPE = PROC [object: Pipal.Object] RETURNS [BOOL]; IsAtomic: IsAtomicProc; EnumerateAtomic: PipalInt.EnumerateProc; clippedEnumerationClass: Pipal.Class; ClippedEnumeration: TYPE = REF ClippedEnumerationRec; ClippedEnumerationRec: TYPE = RECORD [ clipRect: PipalInt.Rectangle, child: Pipal.Object ]; CreateClippedEnumeration: PROC [clipRect: PipalInt.Rectangle, child: Pipal.Object] RETURNS [clippedEnumeration: ClippedEnumeration]; CreateClipEnum: PROC [clipRect: PipalInt.Rectangle, child: Pipal.Object] RETURNS [Pipal.Object]; EachRectangleLayerProc: TYPE = PROC [rect: PipalInt.Rectangle, layer: Layer, isMarker: BOOL] RETURNS [quit: BOOL _ FALSE]; EnumerateRectangleLayers: PROC [object: Pipal.Object, each: EachRectangleLayerProc, transformation: PipalInt.Transformation _ [], includeMarkers, includeSchematicLayer: BOOL _ TRUE] RETURNS [quit: BOOL _ FALSE]; ContainsWell: PROC [object: Pipal.Object] RETURNS [BOOL]; TouchProc: TYPE = PROC [touch: TouchProc, trans1: PipalInt.Transformation, object1: Pipal.Object, trans2: PipalInt.Transformation, object2: Pipal.Object] RETURNS [BOOL _ FALSE]; Touch: TouchProc; LayoutTouch: TouchProc; SchematicTouch: TouchProc; TransistorType: TYPE ~ {nE, pE}; extractTransistorMethod: Pipal.Method; ExtractTransistorProc: TYPE = PROC [object: Pipal.Object] RETURNS [type: TransistorType, ch1, ch2, gate, bulk: Pipal.Object, width, length: INT]; ExtractTransistor: ExtractTransistorProc; END. PipalMos.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. Created by Bertrand Serlet March 6, 1988 1:20:51 pm PST Bertrand Serlet May 9, 1988 11:58:04 pm PDT Theory The Pipal data structures which will some day turn to silicon. Layers Compatibility with CD only. Layer used for schematics. Layer used for schematics. Invisible for connectization. Box Corresponds to the basic materials IC are made of (rectangles in CD). It is not legal for a box to be reduced to a line or a point. Star Corresponds to CD instance Satellites. Check that satellites are Text or transformations of Text. Returns the satellite itself if it's a text, or the child if it's a transformed text. Discards any transformation of the satellites' texts. Discards any transformation of the satellites' texts. Routing Corresponds to PW routing objects. Keeps connectivity. Tiling A Tiling is two dimensional abuts. Having a special class allows fast extraction. All tiles in a row should have same height and all tiles in a column should have same width. xyTile must be fast since it might be called often (e.g. when extracting). sizeX and sizeY must be >0 pos is relative to the [0, 0] of the tiling. Marker Denotes an area, for something like a routing program. Corresponds to CD symbolic objects. denotedSize can be reduced to a line or a point. Schematic Icons Schematic Sequences Text Picture Creates a picture from an Interpress master, expressed as a ROPE. Annotations Indirect Indirect annotations introduce one level of indirection, so that users can store properties both on indirect objects and their source, or so that there is a way to guarantee that 2 objects are different. The annotation value is NIL Atomic Objects It is convenient to mark certain objects as "atomic". Such annotations are not editable. Example of use: contacts without well. The annotation value is the type ATOM. BiAtomic Objects It is convenient to mark certain objects as "bi-atomic". Such annotations are not editable. Example of use: contacts containing well. The annotation value is the type ATOM. Transistors It is convenient to mark certain atomic objects as "transistor". Such annotations are not editable. The annotation value is the type ATOM. Atomicity Some programs (e.g. PipalCore) want to deal with complex entities as if they were "atomic". The obvious thing to do is to consider the presence of the enumerateMethod as the atomic predicate. Unfortunately some classes of objects (e.g. Star) that should be atomic but have an enumerateMethod. Therefore a new message is needed. Short cut for applying the isAtomicMethod method. No isAtomicMethod => iff object has an Int enumerate method it is not atomic. Short cut for applying the Int enumerate method only on atomic objects. If argument is atomic itself, each is called once with it. New class for representing collections of atomic objects in a dense way. Raw creation of a clippedEnumeration. This function usually creates a ClippedEnumeration, but may creates an overlay if more appropriate. The atomic objects of are enumerated. No atomic object => Pipal.void is returned. Mask Layers and Touching In order to generate masks, any Object should be projected into a bunch of rectangles. If argument is a box or a marker itself, each is called once with it (if the flags apply). Returns TRUE if instance1 touches instance2. A strong assumption made all over the code is that instances with non-overlapping bbox can not touch. Function is passed itself for recursive calls with simpler instances. Generic one, only using EnumerateRectangleLayers. As Touch, but hacked for well and ovg rectangles. Funny touching for schematics. Only knows about boxes. Transistors Interface to Saguaro. Object must be an atomicObject annotation with value one of the transistor types. ΚΌ˜– "Cedar" stylešœ™Jšœ<™—™Jšœœœ˜šœ˜Kšœœ™—šœ˜K™—šœ˜K™9K™—Kš ž œœœœœ˜BKšž œœœœ˜JšœœŸ6˜DJšœ˜Kšœ˜K˜—šœœ˜4K˜—Kš žœœ)œœœ˜‹—™šœ$˜$K˜—Kšœœœ˜3šœœœ˜%K˜KšœœŸ:˜QKšœ˜K˜—Kšžœœ)œœ˜m—™šœ˜K˜—Kšœœœ ˜šœ œœœ˜AK˜—šž œœœœ˜PK˜—šžœœœœ˜BK˜—Kš žœœœœœ˜5—™šœ˜K˜—Kšœ œœ ˜šœ œœ4˜MK˜—Kšž œœ4œ˜bšžœœ%œœ˜gKšœ<œ™A——™ ™šœΛ™ΛM™—šœœ˜Kšœ™——™MšœY™Y™&M™—šœ œ˜Kšœ!œ™'——™Mšœ\™\™)M™—šœœ˜Kšœ!œ™'——™ šœd™dM™—šœœ˜Kšœ!œ™'———™ MšœΚ™ΚK˜šœ˜K˜—Kš œœœœœ˜@šžœ˜Kšœ3™3KšœM™MK˜—šžœ˜(KšœG™GK™:K™—šœ%˜%K™HK˜—Kšœœœ˜5šœœœ˜&Kšœ˜Kšœ˜K˜K˜—šžœœ5œ*˜„Kšœ%™%K™—šžœœ5œ˜`Kšœ·™·——™šœX™XM™—Kš œœœ4œœœœ˜zšžœœ‹œœœœœ˜ΣK™ZK™—šž œœœœ˜9K˜—š œ œœ„œœœ˜±Kšœœ ™,Kšœ[Οbœ™fK™EK™—šžœ ˜Kšœ1™1—šž œ ˜Kšœ1™1—šžœ ˜Kšœ7™7——™ šœ™M™—Kšœœ ˜ K˜&š œœœœKœ˜‘K™QK™—šžœ˜)K˜——Jšœ˜J˜—…—,Τ