# VLSI SAPD Documentation

Presentation | AGDS | CIF | DTR | OPENCHAMS | SPICE | Links & Contact

Public Member Functions
Rule Class Reference
Inheritance diagram for Rule:

## Public Member Functions

const std::string & | getLayer1 ()
| returns the first layer of the rule.
virtual const std::string & | getLayer2 ()
| returns the second layer of the rule.
const std::string & | getName ()
| returns the name of the rule.
const std::string & | getRef ()
| returns the reference of the rule.
const std::string & | getType ()
| returns the type of the rule. More...
double | getValue ()
| returns the value of the rule.
const std::string & | getValueAsString ()
| returns the string corresponding to the value of the rule.
| Rule (const char *name, double value, const char *ref, const char *layer1, const char *layer2)
| creates a new rule. More...
void | setType (const char *)
| sets the type of a rule. More...

## Detailed Description

This class describes a symmetrical rule.

A symmetrical rule represents several type of rules:

- a simple rule with only a name (e.g. transistorMinW: transistor minimum width)
- a rule for a unique layer (e.g. minWidth.metal1: the minimum width for metal1 wire)
- a rule associating two layers (e.g minSpace.poly.active: the minimum spacing between a poly shape and an active shape) In this last case the symmetrical characteristic is important since it implies that the value is the same if we invert the two layers : minSpacing poly vs active = minSpacing active vs poly.

Typical rules using no layer are: transistorMinW, transsitorMaxW, transistorMinL transistorMaxL

Typical rules using one layer are: minWidth, minSpacing, minArea, minGateSpacing, minStrapEnclosure

Typical rules using two layers are: minSpacing

## Constructor & Destructor Documentation

## ◆ Rule()

Rule | ( | const char * | name,
|  | double | value,
|  | const char * | ref,
|  | const char * | layer1,
|  | const char * | layer2
| ) |  |

inline

creates a new rule.

Parameters

  name | the name of the rule.
  value | the value of the rule.
  ref | the reference of the rule (helpful to find rule in design kit).
  layer1 | the first layer.
  layer2 | the second layer.

## Member Function Documentation

## ◆ getType()

const std::string & getType | ( |  | ) |

inline

returns the type of the rule.

Rule's type allows to set a specific type for a rule especially the 'area' type to take into account that the value of the rule is to be considered in unit^2.

## ◆ setType()

void setType | ( | const char * | type | ) |

inline

sets the type of a rule.

Parameters

  type | the type of the rule.

Note
  By default the type of a rule is "".