# Hurricane Documentation

# Hurricane VLSI Database

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

Technological rules description (API). More...

Inheritance diagram for Hurricane::Technology:
[legend]

## Public Member Functions

bool | isMetal (const Layer *) const
DataBase * | getDataBase () const
const Name & | getName () const
Layer * | getLayer (const Name &) const
BasicLayer * | getBasicLayer (const Name &) const
RegularLayer * | getRegularLayer (const Name &) const
ViaLayer * | getViaLayer (const Name &) const
Layers | getLayers () const
BasicLayers | getBasicLayers () const
BasicLayers | getBasicLayers (const Layer::Mask &) const
RegularLayers | getRegularLayers () const
ViaLayers | getViaLayers () const
Layer * | getLayer (const Layer::Mask &, bool useSymbolic=true) const
Layer * | getMetalAbove (const Layer *, bool useSymbolic=true) const
Layer * | getMetalBelow (const Layer *, bool useSymbolic=true) const
Layer * | getCutAbove (const Layer *, bool useSymbolic=true) const
Layer * | getCutBelow (const Layer *, bool useSymbolic=true) const
Layer * | getViaBetween (const Layer *, const Layer *, bool useSymbolic=true) const
Layer * | getNthMetal (int) const
PhysicalRule * | getUnitRule (std::string ruleName) const
PhysicalRule * | getPhysicalRule (std::string ruleName, std::string layerName) const
PhysicalRule * | getPhysicalRule (std::string ruleName, std::string layer1Name, std::string layer2Name) const
void | setName (const Name &)
bool | setSymbolicLayer (const Layer *)
PhysicalRule * | addUnitRule (std::string ruleName, std::string reference)
PhysicalRule * | addPhysicalRule (std::string ruleName, std::string reference)
PhysicalRule * | addPhysicalRule (std::string ruleName, std::string layerName, std::string reference)
PhysicalRule * | addPhysicalRule (std::string ruleName, std::string layer1Name, std::string layer2Name, std::string reference)
Public Member Functions inherited from Hurricane::DBo
virtual void | destroy ()
Property * | getProperty (const Name &) const
Properties | getProperties () const
bool | hasProperty () const
void | put (Property *)
void | remove (Property *)
void | removeProperty (const Name &)
void | clearProperties ()

## Static Public Member Functions

static Technology * | create (DataBase *, const Name &)

## Detailed Description

Technological rules description (API).

# Introduction

The Technology object provides the description of all the technology rules needed by the tools, currently it contains:

- The layers, roughly from bottom (i.e. closest to the subtsrate) to top. Layers can be basic, that is, match a real physical layer, or composite, like for VIAs in symbolic for macro-generation. It also provides a connexity table between layers.
- Three sets of rules describing the technology rules (formerly the `DTR` in Alliance).
  1. `Zero Layer`: rules not associated to any layer.
  2. `One Layer`: rules associated to one layer.
  3. `Two Layers`: rules associated to two layer.

This object must be created once within the DataBase, and, in principle never destroyed (this would destroy layers and all objects laying on them ...).

Here

Remarks
  There is only one technology for the current DataBase, and only one Database object, so only one technology defined.

# Using PhysicalRules

How to create a simple one layer rule, setup the minimal width of `metal1` layer to 0.5µm.

tech = DataBase::getDB()->getTechnology();
PhysicalRule* rule = tech->addPhysicalRule( "minWidth", "metal1" );
rule->addValue( DbU::fromPhysical( 0.5, DbU::UnitPower::Micro ), 0 );

How to create a one layer rule, with multiple steps. The minimal spacing of `metal1` layer which will depend on the wire length. The spacing will be of 2µm for length below 50µm and 4µm above.

tech = DataBase::getDB()->getTechnology();
PhysicalRule* rule = tech->addPhysicalRule( "minWidth", "metal1" );
rule->addValue( DbU::fromPhysical( 2.0, DbU::UnitPower::Micro )
, DbU::fromPhysical( 50.0, DbU::UnitPower::Micro ) );
rule->addValue( DbU::fromPhysical( 4.0, DbU::UnitPower::Micro )
, DbU::fromPhysical( 1000.0, DbU::UnitPower::Micro ) );

How to create a two layers rule, with non-isomorphic values. The minimum enclosure of `metal1` layer over `cut1` will be 1µm in horizontal direction and 0.5µm in vertical. The order of layers is significant in the function call, it must be read as "The encolusre of metal1 over cut1".

tech = DataBase::getDB()->getTechnology();
PhysicalRule* rule = tech->addPhysicalRule( "minWidth", "metal1", "cut1" );
rule->addValue( DbU::fromPhysical( 1.0, DbU::UnitPower::Micro )
, DbU::fromPhysical( 0.5, DbU::UnitPower::Micro )
, 0 );

## Member Function Documentation

## ◆ create()

*Technology * Hurricane::Technology::create | ( | DataBase * | dataBase,
|  | const Name & | name
| ) |  |

static

Returns: a newly created technology named `<name>` for the data base `<dataBase>`.

Warning
  Throws an exception if the `dataBase` is `NULL`, if the name is empty or if the `dataBase` has already a technology.

## ◆ isMetal()

bool Hurricane::Technology::isMetal | ( | const Layer * | layer | ) | const

inline

Returns: true if the `layer` is indeed of type BasicLayer::Material::metal.

References Hurricane::Layer::getMask().

## ◆ getDataBase()

DataBase * Hurricane::Technology::getDataBase | ( |  | ) | const

inline

Returns: the DataBase owning the technology.

## ◆ getName()

const Name & Hurricane::Technology::getName | ( |  | ) | const

inline

Returns: the technology name.

## ◆ getLayer() [1/2]

Layer * Hurricane::Technology::getLayer | ( | const Name & | name | ) | const

inline

Returns: the Layer named `<name>` if it exists, else `NULL`.

## ◆ getBasicLayer()

BasicLayer * Hurricane::Technology::getBasicLayer | ( | const Name & | name | ) | const

Returns: the Layer named `<name>` if it exists and is a BasicLayer, else `NULL`.

## ◆ getRegularLayer()

BasicLayer * Hurricane::Technology::getRegularLayer | ( | const Name & | name | ) | const

Returns: the Layer named `<name>` if it exists and is a RegularLayer, else `NULL`.

## ◆ getViaLayer()

BasicLayer * Hurricane::Technology::getViaLayer | ( | const Name & | name | ) | const

Returns: the Layer named `<name>` if it exists and is a ViaLayer, else `NULL`.

## ◆ getLayers()

Layers Hurricane::Technology::getLayers | ( |  | ) | const

inline

Returns: the collection of layers of the technology.

Remarks
  The layers are traversed according to their creation order. This order is very important, notably for the graphical display. Therefore deeper basic layers must be created first and upper layers later (the order of composite layers has no importance).

## ◆ getBasicLayers() [1/2]

BasicLayers Hurricane::Technology::getBasicLayers | ( |  | ) | const

Returns: the collection of basic layers of the technology (uses the same order).

## ◆ getBasicLayers() [2/2]

BasicLayers Hurricane::Technology::getBasicLayers | ( | const Layer::Mask & | mask | ) | const

Returns: the collection of basic layers of the technology which matches the Layer mask `<mask>` (uses the same order).

## ◆ getRegularLayers()

RegularLayers Hurricane::Technology::getRegularLayers | ( |  | ) | const

Returns: the collection of regular layers of the technology (uses the same order).

## ◆ getViaLayers()

ViaLayers Hurricane::Technology::getViaLayers | ( |  | ) | const

Returns: the collection of via layers of the technology (uses the same order).

## ◆ getLayer() [2/2]

Layer * Hurricane::Technology::getLayer | ( | const Layer::Mask & | mask,
|  | bool | useWorking = `true`
| ) |  | const

Returns: the layer whose mask equal `mask` and is flagged as working layer. if there is no working layer, returns the first layer that matches.

## ◆ getMetalAbove()

Layer * Hurricane::Technology::getMetalAbove | ( | const Layer * | layer,
|  | bool | useWorking = `true`
| ) |  | const

Returns: the first layer of metal type whose mask is above the current one. if there is no working layer, returns the first layer that matches.

## ◆ getMetalBelow()

Layer * Hurricane::Technology::getMetalBelow | ( | const Layer * | layer,
|  | bool | useWorking = `true`
| ) |  | const

Returns: the first layer of metal type whose mask is below the current one. if there is no working layer, returns the first layer that matches.

## ◆ getCutAbove()

Layer * Hurricane::Technology::getCutAbove | ( | const Layer * | layer,
|  | bool | useWorking = `true`
| ) |  | const

Returns: the first layer of cut type whose mask is above the current one. if there is no working layer, returns the first layer that matches.

## ◆ getCutBelow()

Layer * Hurricane::Technology::getCutBelow | ( | const Layer * | layer,
|  | bool | useWorking = `true`
| ) |  | const

Returns: the first layer of cut type whose mask is below the current one. if there is no working layer, returns the first layer that matches.

## ◆ getViaBetween()

Layer * Hurricane::Technology::getViaBetween | ( | const Layer * | ,
|  | const Layer * | ,
|  | bool | useSymbolic = `true`
| ) |  | const

Returns: the cut layer between `layer1` and `layer2`. They must be both of metal kind and contiguous.

## ◆ getNthMetal()

Layer * Hurricane::Technology::getNthMetal | ( | int | depth | ) | const

Returns: the `Nth` metal layer from the substrate. So a `depth` of zero should mean `metal1`.

## ◆ getUnitRule()

PhysicalRule * Hurricane::Technology::getUnitRule | ( | std::string | ruleName | ) | const

Parameters

  ruleName | The name of the rule

Returns: The matching rule in the table of unit rules.

## ◆ getPhysicalRule() [1/2]

PhysicalRule * Hurricane::Technology::getPhysicalRule | ( | std::string | ruleName,
|  | std::string | layerName
| ) |  | const

Parameters

  ruleName | The name of the rule
  layerName | The name of the layer

Returns: The matching rule in the table of one layer rules.

## ◆ getPhysicalRule() [2/2]

PhysicalRule * Hurricane::Technology::getPhysicalRule | ( | std::string | ruleName,
|  | std::string | layer1Name,
|  | std::string | layer2Name
| ) |  | const

Parameters

  ruleName | The name of the rule
  layer1Name | The name of the first layer
  layer2Name | The name of the second layer

Returns: The matching rule in the table of two layers rules. The order of layers arguments is meaningful and should match The one used at rule creation.

## ◆ setName()

void Hurricane::Technology::setName | ( | const Name & | name | ) |

Allows to change the technology name (if empty name, throws an exception).

## ◆ setSymbolicLayer()

bool Hurricane::Technology::setSymbolicLayer | ( | const Layer * | layer | ) |

Sets this exact `layer` as symbolic (not is mask). Returns true on success (the layer exists).

## ◆ addUnitRule()

PhysicalRule * Hurricane::Technology::addUnitRule | ( | std::string | ruleName,
|  | std::string | reference
| ) |  |

Parameters

  ruleName | The name of the rule
  reference | A free comentary string for further reference.

Returns: The newly added rule.

Create and add to Technology a rule whithout associated layer. The rule should contain a value which is anything but a length (Volt, Henry, Ohm, ...) The rule is created empty. For a detailed explanation see PhysicalRule.

## ◆ addPhysicalRule() [1/3]

PhysicalRule * Hurricane::Technology::addPhysicalRule | ( | std::string | ruleName,
|  | std::string | reference
| ) |  |

Parameters

  ruleName | The name of the rule
  reference | A free comentary string for further reference.

Returns: The newly added rule.

Create and add to Technology a rule whithout associated layer. The rule should contain only length value(s) (so DbU::Unit). The rule is created empty. For a detailed explanation see PhysicalRule.

## ◆ addPhysicalRule() [2/3]

PhysicalRule * Hurricane::Technology::addPhysicalRule | ( | std::string | ruleName,
|  | std::string | layerName,
|  | std::string | reference
| ) |  |

Parameters

  ruleName | The name of the rule
  layerName | The one layer associated to the rule.
  reference | A free comentary string for further reference.

Returns: The newly added rule.

Create and add to Technology a rule associated to one layer. The rule should contain only length value(s) (so DbU::Unit). The rule is created empty. For a detailed explanation see PhysicalRule.

## ◆ addPhysicalRule() [3/3]

PhysicalRule * Hurricane::Technology::addPhysicalRule | ( | std::string | ruleName,
|  | std::string | layer1Name,
|  | std::string | layer2Name,
|  | std::string | reference
| ) |  |

Parameters

  ruleName | The name of the rule
  layer1Name | First layer associated to the rule.
  layer2Name | First layer associated to the rule.
  reference | A free comentary string for further reference.

Returns: The newly added rule.

Create and add to Technology a rule associated to two layers. The order of layers is meaningful in case of an asymmetric rule. The rule should contain only length value(s) (so DbU::Unit). The rule is created empty. For a detailed explanation see PhysicalRule.

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

- Technology.h
- Technology.dox