ROUTE_RULES(3ICD)

NAME
Route_rules - Design rule file for the Placement and Routing programs.

DESCRIPTION
The design rules for the routing system are specified in a special file called "Route_rules". Apart from the usual spacing and width rules, this file also contains parameters which influence various aspects of the automatic router. Each program of the routing system (except ipp) uses the "Route_rules"-file to read the specific design rules it requires.

Where is the router design rule file?
The routing programs start looking for a file called "Route_rules" in the project directory (the 'current working directory'). The user can tune the characteristics of the router to a specific situation by editing a "Route_rules"-file in his/her project directory. If no file called "Route_rules" is present in the project directory a default (and process-specific) design rules file will be used automatically by all routing programs. This file has the following path:
ICDPATH/lib/process/<process_name>/Route_rules In this path <process_name> is the name of the process which is selected in the project directory. If this file is not present for a process, the routing programs will complain but they will not abort. The default (and probably wrong) values for the design rule parameters will be selected by each of the programs. On the distribution tape heavily documented router design rule files are present for the 'nmos' and 'c5th' processes. They can be used as example to install a "Route_rules"-file for a new process.

Syntax of the router design rule file
The parsers in all of the routing programs were implemented using the well known UNIX-tools LEX and YACC. Therefore, the syntax is quite user-friendly and flexible. The individual design rule parameters are separated by semicolons. The syntax definition of the design rules file parser is listed in the next figure in the meta language proposed by Wirth. Comment can be included between C-like brackets:
/* comment */ The text between the brackets will be ignored by the parser.
declarations = | {(rule_decl | dummy_decl)}
dummy_decl = | identifier {(letter|digit|special)} ";".
rule_decl = | (keyword1 "=" integer ";") |
 | (keyword2 "=" identifier ";") |
 | (keyword3 "[" layer_id "]" "=" integer ";") |
 | (keyword4 "[" layer_id "]" "=" float ";")
 | (keyword5 "[" layer_id "]" "[" layer_id "]" "=" integer ";") |
 | (keyword6 "[" layer_id "]" "=" identifier ";") |
 | (keyword7 "[" layer_id "]" "=" formula ";").
keyword1 = | "grid_2" | "grid_3" | "minchanwidth" | "max_power_width".
keyword2 = | "vertical" .
keyword3 = | "width" | "length" | "contspacing" | "minlength".
keyword4 = | "polyfactor" | "metalfactor".
keyword5 = | "spacing" | "contact" | "overlap".
keyword6 = | "mask" | "contactmask".
keyword7 = | "power_line" | "current".
formula = | expression {formula}.
expression = | float | "i" | "w"
 | expression "+" expression | expression "-" expression |
 | expression "*" expression | expression "/" expression |
 | expression "^" expression | "{" expression "}".
layer_id = | identifier.
integer = | ["-"] digit {digit}.
float = | ["-"] {digit} ["." digit {digit}].
identifier = | letter {(letter|digit|"_")}.
digit = | "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9".
letter = | "a"|"b"|"c"|"d"|"e"|"f"|"g"|"h"|"i"|"j"|
 | "k"|"l"|"m"|"n"|"o"|"p"|"q"|"r"|"s"|"t"|
 | "u"|"v"|"w"|"x"|"y"|"z"|
 | "A"|"B"|"C"|"D"|"E"|"F"|"G"|"H"|"I"|"J"|
 | "K"|"L"|"M"|"N"|"O"|"P"|"Q"|"R"|"S"|"T"|
 | "U"|"V"|"W"|"X"|"Y"|"Z".
special = | "_"|"-"|"["|"]".
The 'dummy_decl' was added to provide upward compatibility for future enhancements of the file syntax. Any unknown statement will be ignored by the parsers WITHOUT warning. The elementary geometric design rule parameters must be positive integers. If these parameters are not integers, all dimensions can be multiplied by a common factor prior to the routing. This factor can be chosen such that all design rules can be approximated by integers.

Layer identifiers
In the input files of the channel router, the different layers are identified by a process-independent identifier (called 'layer_id'). This was done in order to specify implicitly the level (or vertical relation) of the masks and to enhance the portability of the program. Four different layers are distinguished by the channel router: POLY, DIFF, METAL1 and METAL2. Two of them, the (POLY and DIFF) cannot cross each other, and will therefore belong to the same routing level. There are three routing levels, of which the layers can cross each other without interfering. The routing level of each layer identifier is predefined:
layer identifier | routing level | direction of preference
poly | 1 (POLY) | Vertical
diff | 1 (POLY) | Vertical
metal1 | 2 (METAL1) | Horizontal
metal2 | 3 (METAL2) | Vertical
The names of the layer identifiers were chosen such that they resemble the names of the corresponding masks in most NMOS or CMOS processes. The layer identifiers can be linked to an arbitrary mask of the process used. See maskdata(3ICD) for details on masks. The parser is very flexible in recognizing the layer indentifiers. A number of alternatives can also be used to specify the layer. In the following table the asterisk (*) matches any string following the first character.
layer identifier | alternatives
poly | np, p*
diff | nd, d*
metal1 | metal, nm, m*
metal2 | ins, s*
A warning message will be printed in the following cases:
The layer identifier starts with the character d, p, m or s , but matches none of the layer identifiers exactly.
Action: The layer will be interpreted according to the first character of the layer name.
Example: The string dumbo will be interpreted as the DIFF -layer. The layer identifier is unknown.
Action: The polysilicon layer will be selected.
Example: The string xyz will be interpreted as a POLY -identifier.

Design rule parameters
The parser will not print warnings for missing design rule parameters. Each undefined parameter will obtain its default value. Not all layer combinations of the rules must be specified. In the following paragraphs, the item 'Useful indices' contains a table which specifies which of the layer combinations are useful for that parameter. In these tables, an uppercase 'X' indicates a layer combination which must be specified. A lowercase 'x' indicates that specification of one of the two equivalent layer combinations is sufficient. An 'O' indicates that specification of the parameter is optional. Finally the '-' means that the specification of the layer combination will always be ignored. If the second metal layer is not available in a process, it is recommended to set the METAL2 -rules to the same values as the POLY -layer.

Mask spacing
Syntax:
spacing[layer1][layer2] = integer; Purpose:
Sets the minimum spacing between layer1 and layer2.
Used by:
gcr(1ICD), sequ(1ICD).
Useful indices:
SPACING | diff | poly | metal1 | metal2
diff | X | x | - | -
poly | x | X | - | -
metal1 | - | - | X | -
metal2 | - | - | - | X
Remarks:
In the current implementation of gcr (the channel router), the same contour covers the POLY -layer and the DIFF -layer. In order to prevent spacing errors, gcr will set both spacing[poly][poly] and spacing[diff][diff] to the maximum spacing between these layers.
Examples:
spacing[poly][poly] = 2;
spacing[poly][diff] = 1; However, notice that
spacing[poly][poly] = 2;
spacing[diff][diff] = 3;
will result in:
spacing[poly][poly] = 3;
spacing[diff][diff] = 3;

Minimum wire width
Syntax:
width[layer] = integer; Purpose:
Sets the minimum width of layer.
Used by:
gcr(1ICD), sequ(1ICD).
Useful indices:
WIDTH | diff | poly | metal1 | metal2
 | X | X | X | X
Example:
width[poly] = 2;

Contact hole size
Syntax:
contact[layer1][layer2] = integer; Purpose:
Sets the minimum width of the contact cut mask in a contact hole from layer1 to layer2 (or vice versa).
Used by:
gcr(1ICD), sequ(1ICD).
Useful indices:
CONTACT | diff | poly | metal1 | metal2
diff | - | - | x | -
poly | - | - | x | -
metal1 | x | x | - | x
metal2 | - | - | x | -
Example:
contact[poly][metal] = 2;

Contact hole overlap
Syntax:
overlap[layer1][layer2] = integer; Purpose:
Sets the minimum overlap width that layer1 must be extended beyond the boundary of a contact cut mask between layer1 and layer2.
Used by:
gcr(1ICD), sequ(1ICD).
Useful indices:
OVERLAP | diff | poly | metal1 | metal2
diff | - | - | X | -
poly | - | - | X | -
metal1 | X | X | - | X
metal2 | - | - | X | -
Examples:
overlap[metal][poly] = 1;
overlap[poly][metal] = 2;