<> <> <> <> <> DIRECTORY Atom, CD, CDBasics, CStitching, Rope; CornerBasedDRC: CEDAR DEFINITIONS = BEGIN constraintNum: INT = 32; ConstraintIndex: TYPE = [0..constraintNum); Constraint: TYPE = REF ConstraintRep; ConstraintRep: TYPE = RECORD [ index: ConstraintIndex, hasXLayer: BOOL _ FALSE, --for clients only xLayer: [0..256) _ 0, --for clients only data: REF _ NIL --for clients only ]; <<--clients may make arrays...>> <<--data for client only...>> spaceConstraintIndex: ConstraintIndex = 0; nodeConstraintIndex: ConstraintIndex = 1; Rules: TYPE = LIST OF Rule; Rule: TYPE = REF RuleRep; RuleRep: TYPE = RECORD [ extent: CD.Number _ 0, isStuff: Trigger _ ALL[FALSE], --to figure out if there is a corner isError: Trigger _ ALL[FALSE], --to figure out if there is an error okIfConnected: BOOL _ FALSE, --TRUE requires to have node information in tesselation message: Rope.ROPE _ NIL, properties: Atom.PropList _ NIL --for clients only ]; Trigger: TYPE = PACKED ARRAY ConstraintIndex OF BOOL _ ALL[FALSE]; DrcTask: TYPE = RECORD [ -- CornerBasedDRC does not write into any fields geometry: CStitching.Tesselation, <<--this is the tesselation which will be checked>> <<-- NIL tiles: space >> <<-- Constraint tiles: Constraints >> <<-- All other tiles: Nodes >> restrict: CStitching.Tesselation _ NIL, <<--exclude areas from drc with tile value=skipThese>> <<--restrict NIL means no areas are excluded>> skipThese: REF _ NIL, rules: Rules _ NIL, compatibleNodes: CompatibleNodesProc _ NIL, error: ErrorProc _ NIL, properties: Atom.PropList _ NIL, --for clients only data: REF _ NIL --for clients only ]; CompatibleNodesProc: TYPE = PROC [task: REF DrcTask, rule: Rule, corner: REF, pos: CD.Position, other: REF, r: CD.Rect _ CDBasics.empty] RETURNS [BOOL_FALSE]; <<--corner and other are either Constraints, Nodes or NIL>> <<--pos and r can be used to find Nodes if input parameters are Constraints>> ErrorProc: TYPE = PROC [task: REF DrcTask, rule: Rule, r: CD.Rect]; Check: PROC [task: REF DrcTask, area: CD.Rect_CDBasics.universe]; END.