DIRECTORY CD, Core, CoreFlat, PipalCore, PipalSinix, Rope, ViewerClasses; PipalCoreCDUser: CEDAR DEFINITIONS = BEGIN CoreCDUserError: SIGNAL [msg: Rope.ROPE]; EachRootCellTypeProc: TYPE = PROC [root: Core.CellType] RETURNS [quit: BOOL _ FALSE]; EnumerateSelectedCellTypes: PROC [design: CD.Design, eachRootCellType: EachRootCellTypeProc, mode: PipalSinix.Mode _ NIL] RETURNS [quit: BOOL _ FALSE]; SetDesignRootCellType: PROC [design: CD.Design, root: Core.CellType]; GetDesignRootCellType: PROC [design: CD.Design] RETURNS [root: Core.CellType]; GetRootCellTypeDesign: PROC [root: Core.CellType] RETURNS [design: CD.Design]; SetImporterDesign: PROC [importee: CD.Design, importer: CD.Design]; GetImporterDesign: PROC [importee: CD.Design] RETURNS [importer: CD.Design]; SetRootCellTypeDecoration: PROC [root: Core.CellType, decoration: PipalCore.Decoration]; GetRootCellTypeDecoration: PROC [root: Core.CellType] RETURNS [decoration: PipalCore.Decoration]; GetDesignLabel: PROC [design: CD.Design] RETURNS [label: Rope.ROPE _ NIL]; HighlightFlatCellType: PROC [root: Core.CellType, flatCell: CoreFlat.FlatCellTypeRec, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL, viewer: ViewerClasses.Viewer _ NIL, clearFirst: BOOL _ TRUE]; HighlightFlatWire: PROC [root: Core.CellType, flatWire: CoreFlat.FlatWireRec, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL, viewer: ViewerClasses.Viewer _ NIL, clearFirst: BOOL _ TRUE]; SelectFlatCellType: PROC [root: Core.CellType, flatCell: CoreFlat.FlatCellTypeRec, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL]; SelectFlatWire: PROC [root: Core.CellType, flatWire: CoreFlat.FlatWireRec, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL]; ignoreMeProp: ATOM; EachSelectedFlatWireProc: TYPE = PROC [selectedFlatWire: CoreFlat.FlatWireRec] RETURNS [quit: BOOL _ FALSE]; EnumerateSelectedFlatWires: PROC [root: Core.CellType, eachSelectedFlatWire: EachSelectedFlatWireProc, cutSet: CoreFlat.CutSet _ NIL, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL] RETURNS [quit: BOOL _ FALSE]; EachSelectedFlatCellProc: TYPE = PROC [selectedFlatCell: CoreFlat.FlatCellTypeRec] RETURNS [quit: BOOL _ FALSE]; EnumerateSelectedFlatCells: PROC [root: Core.CellType, eachSelectedFlatCell: EachSelectedFlatCellProc, cutSet: CoreFlat.CutSet _ NIL, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL] RETURNS [quit: BOOL _ FALSE]; SelectedFlatWireActionProc: TYPE = PROC [selectedFlatWire: CoreFlat.FlatWire]; DoForSelectedFlatWires: PROC [root: Core.CellType, action: SelectedFlatWireActionProc, cutSet: CoreFlat.CutSet _ NIL, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL]; SelectedFlatCellActionProc: TYPE = PROC [selectedFlatCell: CoreFlat.FlatCellType]; DoForSelectedFlatCells: PROC [root: Core.CellType, action: SelectedFlatCellActionProc, cutSet: CoreFlat.CutSet _ NIL, design: CD.Design _ NIL, decoration: PipalCore.Decoration _ NIL]; END. °PipalCoreCDUser.mesa Copyright Σ 1987, 1988 by Xerox Corporation. All rights reserved. Barth, October 15, 1987 1:25:41 pm PDT Last tweaked by Mike Spreitzer on February 17, 1988 8:55:57 am PST Bertrand Serlet April 24, 1988 11:55:32 pm PDT Theory This interface allows Core tools to interact with users through ChipNDale. It presumes a model in which a single root Core cell type is associated with a design at any one instant. The context section allows client programs to establish and make use of this association. The procedures which map Core to CD allow marking CoreFlat cell types and wire with either of the two CD interaction mechanisms, highlight and the push stack with selection. The CD to Core procedures translate the CD push stack and selections into CoreFlat cell types and wires within the current root cell type context. Context Client commands which take a single cell type as argument should normally get this argument via GetDesignRootCellType. Commands which need to enumerate a set of Core cell types should do so via EnumerateSelectedCellTypes. Extracts the object of each selected instance, calls SetDesignRootCellType, calls SetRootCellTypeDecoration, and calls eachRootCellType with each resulting root. If mode is NIL then GetExtractMode is used. There is a many to one relation from applications to root cell types and from root cell types to designs. In order for interactions which start with a design to refer to a root cell a single root cell is placed on a design. Application handles should be placed on the root cell property list. Thus tool handles can be reached from a design by accessing the root cell and then fetching the tool handle. This also means that only a single application instance can be associated with a root cell type. The root cell type associated with a design is changed by CoreCDUser interactive commands which call the following procedures. Calls SetImporterDesign for each imported design. There is also a many to one relationship between importer and importee designs. To allow CD push stacks in imported designs to refer to root cell types it is necessary to set to which importer the importee is currently referring. Performs operation on transitive closure of all designs reachable from importee. In addition to the cell type some procedures in this interface require the decoration used to associate CD objects with Core cell types and wires. Core To CD In the following procedures the design and decoration are fetched from the root cell type property list if they are NIL. If these procedures are invoked from a CD command then the design should be the command's design. All of these procedures may raise CoreCDUserError. Highlight generates a set of rectangles at the top level of a ChipNDale design. It is useful when the feedback must cross multiple ChipNDale cells. Select uses the standard ChipNDale selection mechanism. It is only useful within a single cell. Constructs a highlight rectangle the same size as the associated object. If viewer is NIL then ExtractOps.FindViewer is invoked. If clearFirst, all other highlight in the design is removed first. Highlights all parents and sons of this wire and all wires bound to this wire or its parents or sons. If viewer is NIL then ExtractOps.FindViewer is invoked. This procedure potentially changes the CD stack. If it does then any previous selections are lost. Adds only the flatWire indicated to the selection, not its parents or sons. This procedure potentially changes the CD stack. If it does then any previous selections are lost. CD To Core The procedures in this section use the CD stack to disambiguate the flat cell type corresponding to the most deeply pushed CD cell. The wire or cell types enumerated are those which are selected within this disambiguated cell type. Imported design push stacks are disambiguated ignoring all other design push stacks, utilizing only the selection viewer in addition to the single push stack. Basic Operations This is a cell type property. When it is present the disambiguation mechanism ignores the cell type when constructing the selection viewer. Effectively the user is promising never to push into such a cell type in an ambiguous manner and then invoke one of the functions in this section. selectedFlatWire is not in canonical form. Raises CoreCDUserError if some selected object does not correspond to a wire rectangle. Raises CoreCDUserError if some selected object does not correspond to a Core cell type. Command Utilities These procedures deal with printing error messages. They are otherwise similiar to EnumerateSelectedFlatWires and EnumerateSelectedFlatCells. They print messages if nothing is selected or the selected rectangles are not matched to any wire, or if the action procedure returns with a non NIL error message. They catch CoreFlat.PathError and CoreCDUserError and print the associated error message. Calls action once per wire even if the wire is reachable through multiple paths of a wire DAG. Κ˜– "Cedar" stylešœ™Icode– "Cedar" style™BK™&K™BK™.J˜—JšΟk œœ=˜IJ˜JšΟnœœ œ˜*head™IbodyšœΣ™Σ—K˜šžœœ œ˜)K˜—™Mšœή™ήM™š œœœœœœ˜UK˜—šžœœ œIœœœœ˜—KšœΞ™ΞK˜—M™φM™šžœœ œ˜EKšœ1™1K˜—šžœœ œ œ˜NK˜—šžœœœ œ ˜NK˜—M™ζM™šžœœ œœ ˜CK™PK˜—š žœœ œ œ œ ˜LK˜—M™’M™šžœœ9˜XK˜—šžœœœ$˜aK˜—š žœœ œ œœœ˜JK˜——™ Mšœ™M™φM™šžœœCœ œ%œ!œœœ˜ΤKšœΕ™ΕK˜—šžœœ?œ œ%œ!œœœ˜ΜKšœž™žK˜—š žœœCœ œ%œ˜”Kšœc™cK˜—š žœœ?œ œ%œ˜ŒKšœ°™°——™ M™ˆK˜™šœœ˜K™ K˜—š œœœ*œœœ˜lKšœ*™*K˜—šžœœaœ œ œ%œœœœ˜δKšœW™WK˜—š œœœ.œœœ˜pK˜—šžœœaœ œ œ%œœœœ˜δKšœW™W——™Mšœ™M™šœœœ'˜NK˜—š žœœUœ œ œ%œ˜·Kšœ^™^K˜—šœœœ+˜RK˜—š žœœUœ œ œ%œ˜·K˜———Jšœ˜—…— Ί#o