<> <> <> <> <> <<>> <> <> DIRECTORY CD USING [Design, Number, Orientation, Position, Rect], CDBasics USING [empty], Core USING [CellType, Wire], CoreGeometry USING [Decoration], Rope USING [ROPE], SoSTNT USING [TNT]; SoS: CEDAR DEFINITIONS ~ BEGIN <> CheckDesignRules: PUBLIC PROC [cell: Core.CellType, design: CD.Design _ NIL, abortFlag: REF BOOL _ NIL, attributes: CoreGeometry.Decoration] RETURNS [quantity: CARDINAL _ 1]; < NIL. Design rule violations are flagged in the Core cell using the property DRV (Design Rule Violation) with key DRVkey = $SoSError. The property DRV is put only on cells having at least one violation.>> <> <> <<- cdObjKey is used to attach the error rectangle in the ChipNDale design. cdObjKey can be any value if ChipNDale flagging is not needed.>> <<- attributes 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.>> <> <> coreInconsistent: ERROR [reason: Rope.ROPE, torch: REF ANY]; <> 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]; <> 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, wireCreationCount: CARDINAL _ 1, -- for debugging cdObjKey: ATOM, -- key of ChipNDale object attributes: CoreGeometry.Decoration]; -- key of geometry and transformations CellHullProc: TYPE = PROC [self: Core.CellType, state: State] RETURNS [h: CD.Rect _ CDBasics.empty]; <> <> CheckCell: TYPE = PROC [self: Core.CellType, state: State, actual: Core.Wire, loc: CD.Position, orient: CD.Orientation]; <> <> <> MaterialToCellProc: TYPE = PROC [self: Core.CellType, state: State, actual, wire: Core.Wire, father: Core.CellType, materialLoc, cellLoc: CD.Position, materialOrient, cellOrient: CD.Orientation]; <> <> 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]; <> <> END.