<> <> <> <> DIRECTORY CD, Rope; CDSimpleRules: CEDAR DEFINITIONS = BEGIN <<>> <> <> <> <<>> Rules: TYPE = REF; <<--UNION of ATOM and REF ImplementationRulesRep>> <<>> NotKnown: ERROR; <<>> <<-- Basic design rules>> MinWidth: PROC [rules: Rules, layer: CD.Layer] RETURNS [CD.Number]; <<-- Minimum width of conductors. (Width of interrest rect)>> <<-- Returns zero if no minimum width specified for the layer. >> MinSpace: PROC [rules: Rules, l1, l2: CD.Layer] RETURNS [CD.Number]; <<-- Minimum distance between unrelated conductors.>> <<-- Returns zero if no minimum space specified for the layers.>> <<-- Error if l1 and l2 from different technologies. >> <<>> MaxWidth: PROC [rules: Rules, layer: CD.Layer] RETURNS [CD.Number]; <<-- Maximum width of features. (interrest rects).>> <<-- Returns zero if no maximum width specified for the layer. >> <<>> GetValue: PROC [rules: Rules, id: ATOM] RETURNS [v: CD.Number]; <<-- If id is not found then ERROR NotKnown.>> <<>> GetRuleDescription: PROC [rules: Rules, id: ATOM] RETURNS [r: Rope.ROPE]; <<-- If id is not found then returns NIL.>> <<>> GetRulesProp: PROC [rules: Rules, key: REF] RETURNS [REF]; <<-- Properties to get more behaviour...>> <<-- If key is not found then returns NIL.>> GetRulesKey: PROC [rules: Rules] RETURNS [ATOM]; <<-- Gets name of a Rules set.>> <<>> <<-- Object generators>> Rect: PROC [size: CD.Position, layer: CD.Layer] RETURNS [CD.Object]; <<-- size: interest rect>> <<-- For conveniance only, duplicate of CDRects...>> Contact: PROC [rules: Rules, l1, l2: CD.Layer] RETURNS [CD.Object]; <<-- Returns minimum size contact>> <<-- nil if any complication or no contact possible>> <<-- use CD.InterestRect to get size>> <<-- Error if l1 and l2 from different technologies. >> <<-- Returned object must be treated readonly. >> <<>> LargeContact: PROC [rules: Rules, design: CD.Design, size: CD.Position, l1, l2: CD.Layer] RETURNS [CD.Object]; <<-- nil if any complication [other than size] or no contact possible>> <<-- Check size with CD.InterestRect, unless you are sure required size works>> <<-- Error if l1 or l2 from different technologies. >> <<-- Returned object must be treated readonly. >> <<>> <<>> <<-- Bridge to get ChipNDale features from names >> GetLayer: PROC [technology, layer: REF] RETURNS [CD.Layer]; <<-- Tries to figure out a layer, given names for layer, technology or rules. >> <<-- A little bit more forgiving than CD.FetchLayer...>> <<-- Raises NotKnown if not known.>> GetTechnology: PROC [hint: REF] RETURNS [CD.Technology]; <<-- Returns technology given its name, key or rules; NIL if not found.>> <<-- [more friendly version of CD.GetTechnology, which requires a key]>> <<>> FetchRules: PROC [design: CD.Design] RETURNS [rules: ATOM]; <<-- Conveniance procedure to get rules from $DesignRules property of design>> <<-- May raise NotKnown if not known.>> END.