CDSimpleRules.mesa (part of ChipNDale)
Copyright © 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 5, 1985 4:58:37 pm PDT
Last edited by: Christian Jacobi, April 13, 1987 7:01:22 pm PDT
DIRECTORY
CD;
CDSimpleRules: CEDAR DEFINITIONS =
BEGIN
This module is used to hide the actual technology used from otherwise quite technology independent routing software. Not all technologies do support this module.
All procedures might raise NotKnown if they do not support this module; if simply a particular procedure is not implemented, a default value might be specified.
Doesn't deal with transistors because they are very technology dependent.
Rules: TYPE = REF;
--UNION of ATOM and REF ImplementationRulesRep
--client procedures
NotKnown: ERROR;
MinWidth: PROC [layer: CD.Layer, rules: Rules ← NIL] RETURNS [CD.Number];
-- Minimum width of conductors.
-- Might return 0 if nothing specified.
-- (Width of interrest rect).
MinDist: PROC [l1, l2: CD.Layer, rules: Rules ← NIL] RETURNS [CD.Number];
-- Minimum distance between unrelated conductors.
-- 0 if no interaction.
-- Error if l1 and l2 from different technologies.
-- Raises NotKnown if distance (or technology) is not known.
-- (Distance of interrest rects).
MaxWidth: PROC [layer: CD.Layer, rules: Rules ← NIL] RETURNS [CD.Number];
-- Maximum width of features.
-- (width of interrest rects).
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.
Rect: PROC [size: CD.Position, layer: CD.Layer] RETURNS [CD.Object];
-- size: interest rect
-- For conveniance only, duplicate of CDRects...
Contact: PROC [l1, l2: CD.Layer, rules: Rules ← NIL] 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 [design: CD.Design, size: CD.Position, l1, l2: CD.Layer, rules: Rules ← NIL] 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.
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]
GetRulesKey: PROC [rules: Rules] RETURNS [ATOM];
-- Useful to get atom from REF ImplementationRulesRep
GetRulesProp: PROC [rules: Rules, key: REF] RETURNS [REF];
-- To get more behaviour...
END.