next up previous contents index
Next: Global Rules Up: The DRC Menu: Design Previous: Layer Expressions   Contents   Index


Built-In Design Rules

Design rules are specified in layer blocks of the technology file by a keyword, followed by an optional source region specification, followed by parameters. There can be an arbitrary string following the parameters. This string is not used internally, but is printed with rule violation messages and usually contains a brief description and reference number for the rule.

The rules make use of layer expressions. A layer expression can be a single layer name, or a more complicated expression. In a rule specification, the expression syntactically represents a single token, though the expression may include white space. The expression in the specification is parsed as far as possible (white space is ignored), and the rest of the line is taken as further input to the specification.

The result of the evaluation of a layer expression can be thought of as a set of geometric figures representing areas where the expression is true. Below are two example rule specifications that use layer expressions.

Overlap M1 | M2 #layer must be covered by M1 or M2
NoOverlap Via&!M1 #layer must never overlap Via without M1

It is a good idea start the explanation string (if any) with the script comment character `#' to guarantee termination of the preceding expression. Recall that white space is ignored when parsing the expression. Most of the time, the parser can recognize the end of the expression, so the comment character is not necessary, but it is possible that the explanation string might start with an operator token such as `*' or a reserved keyword such as ``not'', and the expression parse would fail.

Ordinarily, a design rule evaluation proceeds as follows. All evaluation is performed using a ``pseudo-flat'' representation of the cell hierarchy, which effectively translates the coordinates of every object in the hierarchy to the space of the top-level cell. Each object in this space can be tested without having to know which cell in the hierarchy actually contains the object. The ``global'' tests, that are not associated with individual objects, such as checking for holes, are done first. Then, the per-object tests are performed on each object in the pseudo-flat representation. For each object (box, polygon, or wire), each test listed for the layer of the object is run in sequence. The per-area tests, which are done first, are applied to the area of the object, and remaining tests are applied to constructed regions along each edge of the object.

Below are descriptions of the built-in design rule test functions, and the syntax used to specify the test in a layer block in the technology file. Each rule line starts with the defining keyword, followed by an optional Region expression, required parameters, and an optional explanation string.

If the Region keyword and associated expression are given in the rule specification, the source area becomes those regions where the expression is true, within the boundaries of the object. The per-area tests are applied to the areas where the expression is true, and the other tests are applied to the edges of these regions. In simple cases, the Region expression is not necessary, but it does provide additional capability for more complex testing.

In the discussion that follows, the following definitions will be used. An ``object'' is a physical entity found in the database. A ``figure'' is a geometrical shape and an associated layer expression which is true within the shape. A figure can represent an object and the object's layer, for example, or one of the regions where a layer expression is true, and the layer expression. The ``source'' is a set of figures where rule evaluation is to be performed. If no Region is given, the source is simply the figure representing the object's geometry and the object's layer. Otherwise, the source is the set of figures where the region expression is true within the object. Two or more figures are ``compatible'' if they are associated with the same layer expression.



Subsections
next up previous contents index
Next: Global Rules Up: The DRC Menu: Design Previous: Layer Expressions   Contents   Index
Stephen R. Whiteley 2006-10-23