Mayday.mesa    Agewmetrhtos
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Giordano Bruno Beretta, October 17, 1985 4:37:14 pm PDT
gbb September 3, 1986 6:53:11 pm PDT
Bertrand Serlet August 20, 1986 4:22:09 pm PDT
Mayday is a Clone from SoS. It is a hierarchical design rule checker that monkeys around in a Core design and tries to find all the ChipNDale geometry in order to check as many design rules as it possibly can.
Gli uomini vollero piuttosto le tenebre che la luce (Giovanni, III, 19.)
DIRECTORY
CD USING [Design, Instance, Layer, Number, Orientation, Position, Rect, undefLayer],
CDBasics USING [empty],
Core USING [CellType, Wire],
CoreGeometry USING [Decoration],
Rope USING [ROPE],
SoSTNT USING [TNT];
Mayday: CEDAR DEFINITIONS
~ BEGIN
DRC
CheckDesignRules: PUBLIC PROC [cell: Core.CellType, decoration: CoreGeometry.Decoration, design: CD.Design ← NIL, abortFlag: REF BOOLNIL, verbose, shy, placebo: BOOLFALSE, cdObjKey: ATOM] RETURNS [quantity: CARDINAL ← 1];
cell and its subcells are verified, except the cells with property $DoNotDRC <> NIL. Design rule violations are flagged in the Core cell using the property DRV (Design Rule Violation) with key DRVkey = $MaydayError. The property DRV is put only on cells having at least one violation.
If a design is specified and the ChipNDale cell containing the violation can be accessed, an error rectangle is inserted at the proper location. If verbose is set and the error cannot be flagged in the ChipNDale design, a warning is written in the typescript viewer. If shy is set, Mayday does not touch the display or external data structures if it succeeds to communicate otherwise (however, it will still attach some properties for internal use to external data structures). The reason there is no guarantee is that it would cost 23 GFIs. If placebo is true, then Mayday really does all the things Bertrand wants: no screen output, no data structure is touched, no message is spoken to the user.
The keys to retrieve the geometry from the Core objects are passed as parameters due to their frequent change.
- cdObjKey is used to attach the error rectangle in the ChipNDale design. cdObjKey can be any value if ChipNDale flagging is not needed.
- decoration is the key to retrieve location and orientation of subcells and geometry of the wires; it is mandatory and error coreInconsistent will be raised if location and orientation prove to be wrong.
The abortFlag is tested periodically. If it is TRUE Mayday aborts.
The return parameter quantity contains the number of errors found. Jumping out counts 1.
coreInconsistent: ERROR [reason: Rope.ROPE, torch: REF ANY];
Access to violations
DRV: TYPE = REF DesignRuleViolation;
DRVkey: ATOM;
DesignRuleViolation: TYPE = RECORD [count: INT ← 0, places: LIST OF ErrorRect];
ErrorRect: TYPE = RECORD [r: CD.Rect, msg: Rope.ROPE];
Types for writing own DRC procedures
State: TYPE = REF StateRec;
StateRec: TYPE = RECORD [design: CD.Design,
abort: REF BOOL,
nt: SoSTNT.TNT,   -- neighbourhood table
maxSeparation: CD.Number ← 200, -- a large number
globalErrorCount: CARDINAL,
verbose: BOOL,   -- warn about unreportable violations
shy: BOOL,   -- ok to go into paranoia
wireCreationCount: CARDINAL ← 1, -- for debugging
cdObjKey: ATOM,   -- key of ChipNDale object
decoration: CoreGeometry.Decoration]; -- key of geometry and transformations
FindGeometry: TYPE = PROC [self: CD.Instance] RETURNS [r: CD.Rect ← CDBasics.empty, l: CD.Layer ← CD.undefLayer];
Input: a ChipNDale instance as delivered by Sinix. Output: a rectangle to intersect.
Attached as property $MaydayAnalysis to ChipNDale classes.
CellHullProc: TYPE = PROC [self: Core.CellType, state: State] RETURNS [h: CD.Rect ← CDBasics.empty];
Computes the bounding box of a cell.
Attached as property $MaydayHull to Core classes and/or objects.
CheckCell: TYPE = PROC [self: Core.CellType, state: State, actual: Core.Wire, loc: CD.Position, orient: CD.Orientation];
Design rule checks a Core cell.
Must remove existing error information and check the intenal geometry. It has to perform both the binding and the propagation of the binding, making sure the Core data structure is not altered.
Attached as property $MaydayAnalysis to Core classes and/or objects.
MaterialToCellProc: TYPE = PROC [self: Core.CellType, state: State, actual, wire: Core.Wire, father: Core.CellType, materialLoc, cellLoc: CD.Position, materialOrient, cellOrient: CD.Orientation];
Checks a rectangle of material against all rectangles of material in a cell. It has to perform both the binding and the propagation of the binding, making sure the Core data structure is not altered.
Attached as property $Maydaymc to Core classes and/or objects.
CellToCellProc: TYPE = PROC [self: Core.CellType, state: State, otherCell: Core.CellType, selfActual, otherActual: Core.Wire, father: Core.CellType, selfLoc, otherLoc: CD.Position, selfOrient, otherOrient: CD.Orientation];
Checks all rectangles of material in a cell against those in another cell. It has to perform both the binding and the propagation of the binding, making sure the Core data structure is not altered.
Attached as property $Maydaycc to Core classes and/or objects.
END.