# Hurricane Documentation

# Hurricane VLSI Database

List of all members | Public Member Functions
Hurricane::PhysicalRule Class Reference

Define a rule for the technology (API). More...

Inherits Rule.

## Public Member Functions

bool | isDouble () const
bool | isDbU () const
bool | isSymmetric () const
bool | hasSteps () const
void | setSymmetric (bool)
double | getDoubleValue () const
DbU::Unit | getValue (Hurricane::DbU::Unit length=0, bool hDir=true) const
void | addValue (double)
void | addValue (Hurricane::DbU::Unit value, Hurricane::DbU::Unit maxLength)
void | addValue (Hurricane::DbU::Unit hValue, Hurricane::DbU::Unit vValue, Hurricane::DbU::Unit maxLength)

## Detailed Description

Define a rule for the technology (API).

# Introduction

The constructor of Physical rule is not directly accessible, as thoses objects must be created only through the Technology class `API` (to be stored in the relevant tables).

PhysicalRule is a "one size fit class". As there will be only a small number of objects created (compare to other kinds) we choose to implement all variant in one class instead of creating a flock of derived classes and all the assorted paraphernalia. As a consequence, not all fields will be used at the same time, they are mutually exclusive.

## Member Function Documentation

## ◆ isDouble()

bool Hurricane::PhysicalRule::isDouble | ( |  | ) | const

inline

Tells if the rule describe non-length values (Volts, Ohms, Henry, Celsius, ...).

## ◆ isDbU()

bool Hurricane::PhysicalRule::isDbU | ( |  | ) | const

inline

Tells if the rule uses physical lengths, with multiple steps or not.

## ◆ isSymmetric()

bool Hurricane::PhysicalRule::isSymmetric | ( |  | ) | const

inline

Tells if the rule is symmetric.

## ◆ hasSteps()

bool Hurricane::PhysicalRule::hasSteps | ( |  | ) | const

inline

Tells if the rule has more than one step, that is, is not uniform for all length.

## ◆ setSymmetric()

void Hurricane::PhysicalRule::setSymmetric | ( | bool | state | ) |

inline

Set the symmetric state of the rule. This used only for rules bound to two layers.

## ◆ getDoubleValue()

double Hurricane::PhysicalRule::getDoubleValue | ( |  | ) | const

inline

Returns
  The `double` value of the rule.

## ◆ getValue()

double Hurricane::PhysicalRule::getValue | ( | Hurricane::DbU::Unit | length = `0`,
|  | bool | hDir = `true`
| ) |  | const

inline

Parameters

  length | The length for which we want the rule's value.
  hDir | In case of non-isotropic rule, which dimension do we want.

Returns
  The rule's value for the given length. If no parameter is supplied, then, the X value of the first step is returned.

## ◆ addValue() [1/3]

void Hurricane::PhysicalRule::addValue | ( | double | value | ) |

inline

Set the `double` value of a rule.

## ◆ addValue() [2/3]

void Hurricane::PhysicalRule::addValue | ( | Hurricane::DbU::Unit | value,
|  | Hurricane::DbU::Unit | maxLength
| ) |  |

inline

Parameters

  value | The value of the step to add.
  maxLength | The length up to which the rule is valid. passing zero as this argument means always valid.

Adds a new stepping value to the rule. If the rules never change, give a `maxLength` of zero and only call this function once on the rule. The rule is isotropic in X and Y.

This function can be called multiple time on a rule, each call will add a new step. Steps are defined and ordered according to `maxLength`.

## ◆ addValue() [3/3]

void Hurricane::PhysicalRule::addValue | ( | Hurricane::DbU::Unit | hValue,
|  | Hurricane::DbU::Unit | vValue,
|  | Hurricane::DbU::Unit | maxLength
| ) |  |

inline

Parameters

  hvalue | The horizontal value of the step to add.
  vvalue | The vertical value of the step to add.
  maxLength | The length up to which the rule is valid. passing zero as this argument means always valid.

Adds a new stepping value to the rule. If the rules never change, give a `maxLength` of zero and only call this function once on the rule. The rule is not isotropic, it defines a different value for X and Y.

This function can be called multiple time on a rule, each call will add a new step. Steps are defined and ordered according to `maxLength`.

The documentation for this class was generated from the following files:

- PhysicalRule.h
- PhysicalRule.dox