Katabatic - Routing Toolbox

AUTHOR
Version 1.0
Mon Apr 27 2020 

Table of Contents

Table of contents

Katabatic Documentation
Additionnal documents:
Synthetic Class Hierarchy 

Module Index
Modules
Here is a list of all modules:
Synthetic Class Hierarchy	pagenum
Global Routing Loading	pagenum
Generalities [external]

JSON Support [external]

DbU/Unit description [external]

Graphics [external]

Namespace Index
Namespace List
Here is a list of all documented namespaces with brief descriptions:
anonymous_namespace{AutoSegment.cpp}  	pagenum
anonymous_namespace{ChipTools.cpp}  	pagenum
anonymous_namespace{GCell.cpp}  	pagenum
anonymous_namespace{KatabaticEngine.cpp}  	pagenum
anonymous_namespace{LoadGrByNet.cpp}  	pagenum
anonymous_namespace{Session.cpp}  	pagenum
Katabatic (The namespace dedicated to Katabatic ) 	pagenum

Hierarchical Index
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
AutoContact	pagenum
AutoContactHTee	pagenum
AutoContactTerminal	pagenum
AutoContactTurn	pagenum
AutoContactVTee	pagenum

AutoSegment	pagenum
AutoHorizontal	pagenum
AutoVertical	pagenum

BaseGrid::Axis	pagenum
BaseGrid	pagenum
Grid< GCell >	pagenum
GCellGrid	pagenum

Grid< GCellT >	pagenum

BaseObserver	pagenum
Observer< T >	pagenum

ChipTools	pagenum
Collection< Type > [external]
AutoSegments_Aligneds	pagenum
AutoSegments_AnchorOnGCell	pagenum
AutoSegments_OnContact	pagenum
AutoSegments_Perpandiculars	pagenum

GCell::CompareByDensity	pagenum
GCell::CompareByIndex	pagenum
DBo [external]
ToolEngine [external]
KatabaticEngine	pagenum

Filter< Type > [external]
AutoSegments_InDirection	pagenum
AutoSegments_IsAccountable	pagenum

GCell	pagenum
GCellDensitySet	pagenum
GCellTopology	pagenum
GCell::Key	pagenum
LocatorHelper	pagenum
Observable	pagenum
Session	pagenum

Class Index
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
AutoContact (Abstract base class for AutoContact ) 	pagenum
AutoContactHTee (AutoContact H-Tee (two H, one V) ) 	pagenum
AutoContactTerminal (AutoContact Terminal (S/T is a Terminal) ) 	pagenum
AutoContactTurn (AutoContact Turn (one H, one V) ) 	pagenum
AutoContactVTee (AutoContact V-Tee (one H, two V) ) 	pagenum
AutoHorizontal (Concrete Horizontal AutoSegment ) 	pagenum
AutoSegment (Abstract base class for AutoSegment ) 	pagenum
AutoSegments_Aligneds (All aligned AutoSegment of a set ) 	pagenum
AutoSegments_AnchorOnGCell (All AutoSegment Beginning and/or Stopping in a GCell ) 	pagenum
AutoSegments_InDirection (Filter to select AutoSegment in a given direction ) 	pagenum
AutoSegments_IsAccountable (Filter to select accoutable AutoSegment ) 	pagenum
AutoSegments_OnContact (All AutoSegment anchored on a Contact ) 	pagenum
AutoSegments_Perpandiculars (All perpandicular AutoSegment to a set of aligneds ) 	pagenum
AutoVertical (Concrete Vertical AutoSegment ) 	pagenum
BaseGrid::Axis (Graduations on a BaseGrid Axis (H or V) ) 	pagenum
BaseGrid (Abstract Base Class for Irregular Grid ) 	pagenum
BaseObserver (Observer Design Pattern, Observer part ) 	pagenum
ChipTools (Utilities for Chip Level Design ) 	pagenum
GCell::CompareByDensity (GCell Density Comparison Functor ) 	pagenum
GCell::CompareByIndex (GCell Index Comparison Functor ) 	pagenum
GCell (Routing Global Cell ) 	pagenum
GCellDensitySet (GCell Set, sorted by density ) 	pagenum
GCellGrid (GCell Grid ) 	pagenum
GCellTopology (Build the wiring for a Net inside a GCell (internal ) ) 	pagenum
Grid< GCellT > (Template Class for Regular Grid ) 	pagenum
KatabaticEngine (The Katabatic Tool ) 	pagenum
GCell::Key (GCell Key - Density Cache ) 	pagenum
LocatorHelper (Locator Helper Collection's Locators ) 	pagenum
Observable (Observer Design Pattern, Subject part ) 	pagenum
Observer< T > (Observer Design Pattern, Observer part ) 	pagenum
Session (Modification Session for Katabatic ) 	pagenum

Module Documentation
Synthetic Class Hierarchy

Simplificated class hierarchy. 
Simplificated class hierarchy. 

Global Routing Loading

Translation rules to build detailed routing from global. 
Classes
class GCellTopology
Build the wiring for a Net inside a GCell (internal ). 
Enumerations
enum LocalFunctionFlag { NoFlags = 0x00000000, HAccess = 0x00000002, VSmall = 0x00000004, HSmall = 0x00000008, Punctual = 0x00000010, DoSourceContact = 0x00000100, DoTargetContact = 0x00000200 }
Functions
unsigned int checkRoutingPadSize (Component *anchor)
static void doRp_AutoContacts (GCell *, Component *, AutoContact *&source, AutoContact *&target, unsigned int flags)
static AutoContact * doRp_Access (GCell *, Component *, unsigned int flags)
static AutoContact * doRp_AccessPad (RoutingPad *, unsigned int flags)
static void doRp_StairCaseH (GCell *, Component *rp1, Component *rp2)
static void doRp_StairCaseV (GCell *, Component *rp1, Component *rp2)
void _do_xG_1Pad ()
void _do_xG ()
void _do_1G_1M1 ()
void _do_1G_xM1 ()
void _do_xG_1M1_1M2 ()
void _do_xG_xM1_xM3 ()
void _do_xG_xM2 ()
void _do_1G_1M3 ()
void _do_xG_xM3 ()
void singleGCell (KatabaticEngine *ktbt, Net *net)

Detailed Description
Translation rules to build detailed routing from global. 
This module documents how the global routing built by Knik  is loaded into the Katabatic  data-base. It is intented for developpers only. 

Enumeration Type Documentation
enum LocalFunctionFlag
A set of flags for all functions of the LoadGrByNet module. They can be combined to form the flags  argument of functions. the functions will ignore flags that are not intended to them.
For HSmall , VSmall  & Punctual  see checkRoutingPadSize(). 

Enumerator:
NoFlags	A simple alias over zero to explicitly tell that no flag at all is passed to the function. 
	
HAccess	The constructed topology will be accessed through an horizontal segment. The absence of this flag tell that the access will be done trough a vertical. 
	
VSmall	The RoutingPad vertically covers a very small number of access points, so it is likely overconstrained for direct horizontal connexion. 
	
HSmall	The RoutingPad horizontally covers a very small number of access points, so it is likely overconstrained for direct vertical connexion. 
	
Punctual	The RoutingPad covers only an access point in either direction. 
	
DoSourceContact	When creating Katabatic::AutoContactTerminal on non-punctual RoutingPad, this flag request the creation of a contact on the source point . 
	
DoTargetContact	When creating Katabatic::AutoContactTerminal on non-punctual RoutingPad, this flag request the creation of a contact on the target point . 

Function Documentation
unsigned int checkRoutingPadSize (Component *  rp)
Look at the geometrical size of the Component and assess if it's span is too narrow either horizontally or vertically. Return a combination of flags indicating it's state:
HSmall : less than 3 pitches in horizontal direction.
VSmall : less than 3 pitches in vertical direction.
Punctual : one pitch in either directions.
The component can be a RoutingPad, a Vertical or an Horizontal.
 
References Component::getLayer(), anonymous_namespace{LoadGrByNet.cpp}::HSmall, anonymous_namespace{LoadGrByNet.cpp}::Punctual, toLambda(), and anonymous_namespace{LoadGrByNet.cpp}::VSmall.
Referenced by GCellTopology::doRp_Access().
void doRp_AutoContacts (GCell *  gcell, Component *  rp, AutoContact *&  source, AutoContact *&  target, unsigned int  flags)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
rp 	The Component we want to access. 	
source 	The AutoContact created on the source  (returned ). 	
target 	The AutoContact created on the target  (returned ). 	
flags 	Managed by this function:
LocalFunctionFlag::DoSourceContact
LocalFunctionFlag::DoTargetContact
	
Create the AutoContact directly anchored on the Component (terminal). Three cases are manageds:
1.	Ordinary (non-punctual) METAL1  terminal : an AutoContactTerminal is anchored on the RoutingPad.
2.	Punctual METAL1  terminal , the access must never be blocked by other routing. To ensure it, we create a fixed AutoSegment (anchored on two AutoContactTerminal) to cover it. The normal  AutoContactTerminal is also created.
3.	non METAL1  terminal , as for the punctual METAL1 , a fixed protection is added over the RoutingPad. If we access horizontally a vertical RoutingPad or vertically an horizontal one, an extra AutoContactTerminal is added (to allow is displacement along the RoutingPad).
To avoid creating a fixed protection over a RoutingPad multiple times, the RoutingPad and it's associated protection is stored in a static map  : __routingPadAutoSegments .
Conversely, because an AutoContactTerminal can only be connected to one segment, each time this function is called a new terminal will be created (or maybe two in case of non-punctual terminals). If only one AutoContact is requested, it is created centered on the RoutingPad. The initial position of AutoContact do not prevent them to move afterwards , even those created on source/target on a non-punctual RoutingPad.
Remark: For clarity we describe the layer management of this function in term
of METAL , but it is the RoutingGauge depth which is actually used.
 
References Katabatic::CntFixed, AutoContactTerminal::create(), AutoSegment::create(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), Grid< GCellT >::getGCell(), KatabaticEngine::getGCellGrid(), Session::getKatabatic(), Component::getLayer(), Katabatic::KbHorizontal, Katabatic::SegFixed, and AutoSegment::setFlags().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), GCellTopology::_do_xG_xM3(), GCellTopology::doRp_Access(), GCellTopology::doRp_StairCaseH(), GCellTopology::doRp_StairCaseV(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
AutoContact * doRp_Access (GCell *  gcell, Component *  rp, unsigned int  flags)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
rp 	The Component onto which anchor the access contact. 	
flags 	Relevant flags are:
HAccess, the terminal is to be accessed through an horizontal segment.
VSmall, force the terminal to be considered as small in the vertical direction.
	
If HAccess  is set, the Component is to be accessed trough an horizontal segment. If unset, the access is done vertically.
Create an AutoContact to access a Component (terminal). If the Component is not to be accessed through an horizontal segment, and do not cover a large span in the horizontal direction (flag VSmall ), a local horizontal AutoSegment is added to slacken the vertical constraints.
 
References anonymous_namespace{LoadGrByNet.cpp}::checkRoutingPadSize(), AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), Session::getContactLayer(), Component::getNet(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, anonymous_namespace{LoadGrByNet.cpp}::HSmall, Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::VSmall.
Referenced by GCellTopology::_do_1G_1M1(), GCellTopology::_do_1G_xM1(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), and GCellTopology::_do_xG_xM3().
AutoContact * doRp_AccessPad (RoutingPad *  rp, unsigned int  flags)[static]

Parameters:
rp 	The Component onto which anchor the access contact. 	
flags 	Relevant flags are:
HAccess, the terminal is to be accessed through an horizontal segment.
VSmall, force the terminal to be considered as small in the vertical direction. 
	
Returns:
A Katabatic::AutoContactTerminal .
The Component rp  is a RoutingPad which belongs to a pad cell. This case occurs when we are routing a complete chip. This method build, from the rp  a stack of articulated punctual segments and contacts to reach the default H/V routing layers (usually METAL2  & METAL3 ). This may be needed when the pad terminal is in METAL5 , for instance.
The returned AutoContactTerminal is anchored on the last punctual segment build.
The GCell into which the AutoContactTerminal is created may be under the pads area. However, it will be right on the border of the GCell. The global router vertexes of GCell under the pad area are marked as blocked so will never be used for routing.
Remark: The segments and contacts added to ensure the layer connexity are not
put into the Katabatic database. They are plain Hurricane objects, invisibles from it. 
References Contact::create(), Horizontal::create(), Vertical::create(), AutoContactTerminal::create(), Hook::detach(), Component::getBodyHook(), RoutingPad::getBoundingBox(), RoutingPad::getCenter(), Session::getContactLayer(), Grid< GCellT >::getGCell(), KatabaticEngine::getGCellGrid(), Box::getHeight(), Session::getKatabatic(), RoutingPad::getLayer(), Component::getNet(), RoutingPad::getOccurrence(), Transformation::getOrientation(), Occurrence::getPath(), Session::getRoutingLayer(), Path::getTransformation(), Box::getWidth(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Point::setX(), and Point::setY().
Referenced by GCellTopology::_do_xG_1Pad().
void doRp_StairCaseH (GCell *  gcell, Component *  rp1, Component *  rp2)[static]
Build the wiring to connect to horizontal Component. Two cases:
The Component are aligneds, then only a straight wire is created.
They are not  aligned, then a complete dogleg is created.
 
References AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), Component::getLayer(), Component::getNet(), Component::getX(), AutoContact::getY(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Referenced by GCellTopology::_do_xG_xM2().
void doRp_StairCaseV (GCell *  gcell, Component *  rp1, Component *  rp2)[static]
Build the wiring to connect to vertical Components. Two cases:
The Components are aligneds, then only a straight wire is created.
They are not  aligned, then a complete dogleg is created.
 
References AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), Component::getLayer(), Component::getNet(), AutoContact::getX(), Component::getY(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Referenced by GCellTopology::_do_xG_xM3().
void _do_xG_1Pad ()[private]
Construct the topology, when there is only global wires and one local terminal, but coming from a Pad. As thoses connectors will always be on one border of the GCell they can be considered as a kind of global.
So this method mostly calls GCellTopology::doRp_AccessPad() to create the AutoContactTerminal, then calls GCellTopology::_do_xG(), except for straight lines which are managed directly. 
References GCellTopology::_do_xG(), AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AccessPad(), AutoContact::getBodyHook(), Session::getContactLayer(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_xG ()[private]
Construct the topology, when there is only global wires (no local terminals).
Some topology are not handled because they must not be managed by this function: 
One global: nonsensical because there also must be a terminal. 
Two aligned globals: in that case we do a straight wire without any AutoContact (handled by the source/target of the wire). 
 
References AutoContactVTee::create(), AutoContactTurn::create(), AutoContactHTee::create(), AutoSegment::create(), Session::getContactLayer(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Referenced by GCellTopology::_do_xG_1Pad().
void _do_1G_1M1 ()[private]
Construct a topology where there is one  global and one RoutingPad in METAL1 . The METAL1  is assumed to be vertical.
Remark: When accessing the RoutingPad through an horizontal global segment
and the vertical extension of the segment is small, the global is still directly attached to the terminal, inducing a high constraint on it. We left to job of slackening it to the router.
 
References GCellTopology::doRp_Access(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, anonymous_namespace{LoadGrByNet.cpp}::NoFlags, and anonymous_namespace{LoadGrByNet.cpp}::VSmall.
void _do_1G_xM1 ()[private]
Construct a topology where there is one  global and any number of RoutingPad in METAL1 . The METAL1  is assumed to be vertical.
The RoutingPads are linked together two by two. If the horizontal segments are not aligned by the router, part of the routage will be done through the RoutingPad itself. The global incoming segment will connected to the leftmost, rightmost or centermost RoutingPad according from wich side it comes from.
 
References AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_Access(), Component::getBoundingBox(), Session::getContactLayer(), Box::getHeight(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_xG_1M1_1M2 ()[private]
Construct a topology where there is at least one global (and up to 4), one METAL1  RoutingPad (assumed V) and one METAL2  RoutingPad (assumed H).
In this topology, we want to try to reuse the METAL2  RoutingPad as a feedtrough in the horizontal routage. Thus:
The METAL1  and METAL2  RoutingPad are connected through a separate wiring.
The south & west global wiring is attached to the leftmost contact of the METAL2 .
The north & east global wiring is attached to the rightmost contact of the METAL2 .
South/west and north/south can be build independantly. Depending on the number of globals, they can consist of:
Nothing (no south nor west).
An AutoContact (west present).
An horizontal plus a turn (south present).
An horizontal plus a HTee (south & west present).
Remark: Not all configurations are represented below.

References AutoContactTurn::create(), AutoContactHTee::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), Session::getRoutingLayer(), Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_xG_xM1_xM3 ()[private]
Construct a topology where there is at least one global (and up to 4), at least one METAL1  RoutingPad (assumed V) and at least one METAL3  RoutingPad (assumed V).
In this topology, we want to try to reuse the METAL3  RoutingPad as a feedtrough in the vertical routage. Thus:
The METAL1  and METAL3  RoutingPad are connected through a separate wiring made of separate horizontals.
The south-west global wiring is attached to the leftmost RoutingPad if there isn't south or to the first METAL3  otherwise.
The north-east global wiring is attached to the rightmost RoutingPad if there isn't north or to the first METAL3  otherwise.
South/west and north/south can be build independantly. Depending on the number of globals, they can consist of:
Nothing (no south nor west).
An AutoContact on the leftmost RoutingPad (west present).
An AutoContact on the first METAL3  (only south present).
An AutoContact plus a vertical plus a VTee (south & west present).
 
References AutoContactVTee::create(), AutoContactTurn::create(), AutoContactHTee::create(), AutoSegment::create(), GCellTopology::doRp_Access(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Component::getBoundingBox(), Session::getContactLayer(), Box::getHeight(), Session::getRoutingLayer(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_xG_xM2 ()[private]
Construct a topology where there is at least one global (and up to 4), and any number of METAL2  RoutingPads (assumeds H).
In this topology, we want to try to reuse the METAL2  RoutingPad as a feedtrough in the horizontal routage. Thus:
The RoutingPad are connecteds trough a separate staircase (or straight wire if aligneds).
The south-west global wiring is attached to the leftmost RoutingPad if there isn't south or to the biggest horizontal RoutingPad otherwise.
The north-east global wiring is attached to the rightmost RoutingPad if there isn't south or to the biggest horizontal RoutingPad otherwise.
 
References AutoContactVTee::create(), AutoSegment::create(), GCellTopology::doRp_Access(), GCellTopology::doRp_AutoContacts(), GCellTopology::doRp_StairCaseH(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, Component::getBoundingBox(), Session::getContactLayer(), Box::getWidth(), Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_1G_1M3 ()[private]
Construct a topology where there is one global and one METAL3  RoutingPad (assumeds V).
In this topology, we reuse the METAL3  RoutingPad as a feedtrough in the vertical routage. Thus:
If the global is either north or south, we directly connect to the north end or south end of the RoutingPad. The vertical global will have no slack at all we assume that METAL3 terminals are only from blocks and are aligneds vertically.
If the global is east or west and  the RoutingPad is sufficiently extended in the vertical direction, we connect an horizontal in the normal way.
If the global is not sufficiently extended, we add a turn to give some slack to the global.
 
References AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), AutoContact::getX(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void _do_xG_xM3 ()[private]
Construct a topology where there at least one global and two METAL3  RoutingPad (assumed V).
In this topology, we reuse the METAL3  RoutingPad as a feedtrough in the vertical routage. We assume that the most likely relative position of the RoutingPads is to be aligned vertically. Thus:
All RoutingPads are linked two by two trough vertical staircases.
The south-west global wiring is attached to the bottommost RoutingPad (without vertical slack). If a misalignment is detected, then a dogleg is added.
The north-east global wiring is attached to the topmost RoutingPad (without vertical slack).
South/west and north/south can be build independantly. Depending on the number of globals, they can consist of:
Nothing (no south nor west).
An sliding AutoContact on the bottommost RoutingPad (west present).
An fixed AutoContact on the bottommost RoutingPad (only south present).
An fixed AutoContact plus a vertical plus a VTee (south & west present).
 
References AutoContactVTee::create(), AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_Access(), GCellTopology::doRp_AutoContacts(), GCellTopology::doRp_StairCaseV(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, anonymous_namespace{LoadGrByNet.cpp}::DoTargetContact, Session::getContactLayer(), DbU::getValueString(), AutoContact::getX(), anonymous_namespace{LoadGrByNet.cpp}::HAccess, Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.
void singleGCell (KatabaticEngine *  ktbt, Net *  net)
All the RoutingPads of the net are concentrated under a single GCell. This function assumes that all the terminals are in METAL1  (vertical), and link them two by two by horizontal wires. 
References AutoContactTurn::create(), AutoSegment::create(), GCellTopology::doRp_AutoContacts(), anonymous_namespace{LoadGrByNet.cpp}::DoSourceContact, Session::getContactLayer(), Grid< GCellT >::getGCell(), KatabaticEngine::getGCellGrid(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), Net::getRoutingPads(), Katabatic::KbHorizontal, Katabatic::KbVertical, and anonymous_namespace{LoadGrByNet.cpp}::NoFlags.

Namespace Documentation
anonymous_namespace{AutoSegment.cpp} Namespace Reference

anonymous_namespace{ChipTools.cpp} Namespace Reference

anonymous_namespace{GCell.cpp} Namespace Reference

anonymous_namespace{KatabaticEngine.cpp} Namespace Reference

anonymous_namespace{LoadGrByNet.cpp} Namespace Reference
Classes
class GCellTopology
Build the wiring for a Net inside a GCell (internal ). 
Enumerations
enum LocalFunctionFlag { NoFlags = 0x00000000, HAccess = 0x00000002, VSmall = 0x00000004, HSmall = 0x00000008, Punctual = 0x00000010, DoSourceContact = 0x00000100, DoTargetContact = 0x00000200 }
Functions
unsigned int checkRoutingPadSize (Component *anchor)
void singleGCell (KatabaticEngine *ktbt, Net *net)

anonymous_namespace{Session.cpp} Namespace Reference

Katabatic Namespace Reference

The namespace dedicated to Katabatic. 
Classes
class AutoContact
Abstract base class for AutoContact. 
class AutoContactHTee
AutoContact H-Tee (two H, one V) 
class AutoContactTerminal
AutoContact Terminal (S/T is a Terminal) 
class AutoContactTurn
AutoContact Turn (one H, one V) 
class AutoContactVTee
AutoContact V-Tee (one H, two V) 
class AutoHorizontal
Concrete Horizontal AutoSegment. 
class AutoSegment
Abstract base class for AutoSegment. 
class AutoSegments_Aligneds
All aligned AutoSegment of a set. 
class AutoSegments_AnchorOnGCell
All AutoSegment Beginning and/or Stopping in a GCell. 
class AutoSegments_InDirection
Filter to select AutoSegment in a given direction. 
class AutoSegments_IsAccountable
Filter to select accoutable AutoSegment. 
class AutoSegments_OnContact
All AutoSegment anchored on a Contact. 
class AutoSegments_Perpandiculars
All perpandicular AutoSegment to a set of aligneds. 
class AutoVertical
Concrete Vertical AutoSegment. 
class BaseGrid
Abstract Base Class for Irregular Grid. 
class BaseObserver
Observer Design Pattern, Observer part. 
class ChipTools
Utilities for Chip Level Design. 
class GCell
Routing Global Cell. 
class GCellDensitySet
GCell Set, sorted by density. 
class GCellGrid
GCell Grid. 
class Grid
Template Class for Regular Grid. 
class KatabaticEngine
The Katabatic Tool. 
class LocatorHelper
Locator Helper Collection's Locators. 
class Observable
Observer Design Pattern, Subject part. 
class Observer
Observer Design Pattern, Observer part. 
class Session
Modification Session for Katabatic. 
Typedefs
typedef Hurricane::Filter< AutoSegment * > AutoSegmentHF
typedef Hurricane::Locator< AutoSegment * > AutoSegmentHL
typedef Hurricane::Collection< AutoSegment * > AutoSegmentHC
typedef GenericCollection< AutoSegment * > AutoSegments
typedef GenericLocator< AutoSegment * > AutoSegmentLocator
typedef GenericFilter< AutoSegment * > AutoSegmentFilter
typedef GenericCollection< GCell * > GCells
typedef GenericLocator< GCell * > GCellLocator
typedef GenericFilter< GCell * > GCellFilter
Enumerations
enum FunctionFlag { , KbOpenSession = 0x00000001, KbRealignate = 0x00000002, KbNativeConstraints = 0x00000004, KbForceMove = 0x00000008, KbHorizontal = 0x00000010, KbVertical = 0x00000020, KbWithPerpands = 0x00000040, KbSource = 0x00000080, KbTarget = 0x00000100, KbWarnOnError = 0x00000200, KbPropagate = 0x00008000, KbUseAboveLayer = 0x00020000, KbUseBelowLayer = 0x00040000, KbDoglegOnLeft = 0x00080000, KbDoglegOnRight = 0x00100000, KbHalfSlacken = 0x00800000 }
enum EngineState { EngineCreation = 1, EngineGlobalLoaded = 2, EngineActive = 3, EngineDriving = 4, EnginePreDestroying = 5, EngineGutted = 6 }
enum AutoContactFlag { CntFixed = 0x00000001, CntTerminal = 0x00000002, CntTurn = 0x00000004, CntHTee = 0x00000008, CntVTee = 0x00000010, CntInvalidated = 0x00000020, CntInvalidatedCache = 0x00000040, CntInCreationStage = 0x00000080, CntBadTopology = 0x00000100 }
enum AutoSegmentFlag { , SegHorizontal = (1<< 0), SegFixed = (1<< 1), SegGlobal = (1<< 2), SegWeakGlobal = (1<< 3), SegCanonical = (1<< 4), SegBipoint = (1<< 5), SegDogleg = (1<< 6), SegStrap = (1<< 7), SegSourceTop = (1<< 8), SegSourceBottom = (1<< 9), SegTargetTop = (1<<10), SegTargetBottom = (1<<11), SegIsReduced = (1<<12), SegLayerChange = (1<<13), SegStrongTerminal = SegSourceTerminal|SegTargetTerminal, SegWeakTerminal1 = (1<<16), SegWeakTerminal2 = (1<<17), SegNotSourceAligned = (1<<18), SegNotTargetAligned = (1<<19), SegSlackened = (1<<22), SegAxisSet = (1<<23), SegInvalidated = (1<<24), SegInvalidatedLayer = (1<<27), SegCreated = (1<<28), SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2, SegNotAligned = SegNotSourceAligned|SegNotTargetAligned }

Detailed Description
The namespace dedicated to Katabatic. 

Typedef Documentation
typedef Hurricane::Filter< AutoSegment * > AutoSegmentHF
Shorthand for AutoSegment Hurricane Filter. 
typedef Hurricane::Locator< AutoSegment * > AutoSegmentHL
Shorthand for AutoSegment Hurricane Locator. 
typedef Hurricane::Collection< AutoSegment * > AutoSegmentHC
Shorthand for AutoSegment Hurricane Collection. 
typedef GenericCollection< AutoSegment * > AutoSegments
Shorthand for AutoSegment Hurricane Generic Collection (collection with unique_ptr<>  like support). 
typedef GenericLocator< AutoSegment * > AutoSegmentLocator
Shorthand for AutoSegment Hurricane Generic Locator (locator with unique_ptr<>  like support). 
typedef GenericFilter< AutoSegment * > AutoSegmentFilter
Shorthand for AutoSegment Hurricane Generic Filter (filter with unique_ptr<>  like support). 
typedef GenericCollection< GCell * > GCells
GCell Collection with auto-pointer like support. 
typedef GenericLocator< GCell * > GCellLocator
GCell Locator with auto-pointer like support. 
typedef GenericFilter< GCell * > GCellFilter
GCell Filter with auto-pointer like support. 

Enumeration Type Documentation
enum FunctionFlag
A set of flags to that can be passed to functions/methods througout all Katabatic. 

Enumerator:
KbOpenSession	Tells the function to open it's own Session, otherwise use the one that should already have been opened. 
	
KbRealignate	On AutoSegment axis manipulation, force the realignment of all the segment on an aligned set, even is the axis of the canonical is already at the right coordinate. 
	
KbNativeConstraints	Ignore user-defined constraints or terminal induced ones (for AutoContacts anchored on terminals) and return the owning GCell alone. 
	
KbForceMove	Tells the function to force move, even if it is not needed. 
	
KbHorizontal	Request some action to be done in the horizontal direction. 
	
KbVertical	Request some action to be done in the vertical direction. 
	
KbWithPerpands	Request that AutoSegments in perpandicular direction should be includeds. 
	
KbSource	Request AutoSegments anchored by their source anchor or that some operation has to be performed on the source. 
	
KbTarget	Request AutoSegments anchored by their target anchor or that some operation has to be performed on the target. 
	
KbWarnOnError	Display a warning if something has gone wrong. 
	
KbPropagate	The action will affect all the segments on an aligned set. 
	
KbUseAboveLayer	Request/tell the a above layer has been used. 
	
KbUseBelowLayer	Request/tell the a below layer has been used. 
	
KbDoglegOnLeft	The dogleg has occured on the left of something  
	
KbDoglegOnRight	The dogleg has occured on the right of something  
	
KbHalfSlacken	For AutoSegment::slacken(), change the overconstrained limit from 10 tracks down to 3 (hard-wired). 
	
enum EngineState
Describe the current state of the KatabaticEngine. 

Enumerator:
EngineCreation	The tool is created, but still in the _postCreate  stage. 
	
EngineGlobalLoaded	The global routing has been loaded from Knik. 
	
EngineActive	The Engine is in normal running mode (routing ordinary wires). 
	
EngineDriving	The Engine is transforming the AutoContact/AutoSegment into normal Contact/Segment (prior to tool deletion). 
	
EnginePreDestroying	This state is used whenever the tool is destroyed without passing through the EngineDriving state. 
	
EngineGutted	After the EngineDriving state, all the working structures are removed and the tool can no longer be used. It only awaits clean destruction. 
	
enum AutoContactFlag
Set of flags to describe the internal state of an AutoContact. 

Enumerator:
CntFixed	This contact cannot be moved. 
	
CntTerminal	This contact is anchored on a terminal (AutoContactTerminal), must not be changed . 
	
CntTurn	The object true class is AutoContactTurn, must not be changed . 
	
CntHTee	The object true class is AutoContactHTee, must not be changed . 
	
CntVTee	The object true class is AutoContactVTee, must not be changed . 
	
CntInvalidated	At least one AutoSegment of this contact has been moved, the contact position must be recomputed (in the Session revalidation). 
	
CntInvalidatedCache	At least one AutoSegment has been broken or moved up, the connexity must be checked and possibly corrected (in Session revalidation). 
	
CntInCreationStage	Sets only during the initial creation process. 
	
CntBadTopology	Something wrong has happened and the connexity of the AutoContact is no longer ensured (too much or too less AutoSegments, too wide span of AutoSegment layers). 
	
enum AutoSegmentFlag
Set of flags to describe the internal state of an AutoSegment. 

Enumerator:
SegHorizontal	This AutoSegment is associated to a Hurricane::Horizontal, if not set, it is associated to a Hurricane::Vertical. Set when the object is constructed. 
	
SegFixed	The Hurricane::Segment associated must/cannot be moved. 
	
SegGlobal	The AutoSegment span between at least two GCells (i.e. not fully enclosed in one). 
	
SegWeakGlobal	The AutoSegment is part of an aligned set which contains at least a global. The global segment is itself tagged as weak global. 
	
SegCanonical	This AutoSegment is the designated representant of a set of aligned AutoSegment. 
	
SegBipoint	This AutoSegment is a straight wire between two terminal AutoContact. 
	
SegDogleg	This AutoSegment has been created as the perpandicular part of a dogleg. 
	
SegStrap	This AutoSegment has been created to to reconnect parts of an AutoSegment after slackening. 
	
SegSourceTop	The source contact of this segment is connected to the top  layer. 
	
SegSourceBottom	The source contact of this segment is connected to the bottom  layer. 
	
SegTargetTop	The target contact of this segment is connected to the top  layer. 
	
SegTargetBottom	The target contact of this segment is connected to the bottom  layer. 
	
SegIsReduced	This segment is the perpandicular part of a dogleg which will use the same  layer as the parallels. 
	
SegLayerChange	This AutoSegment has been created to to reconnect parts of an AutoSegment after a layer change. 
	
SegStrongTerminal	This AutoSegment directly connected to a terminal. 
	
SegWeakTerminal1	This AutoSegment indirectly connected to a terminal with medium strength. 
	
SegWeakTerminal2	This AutoSegment indirectly connected to a terminal with weak strength. 
	
SegNotSourceAligned	This source contact of the segment is not the aligned part of a tee (h1  or h2  for a HTee , v1  or v2  for a VTee ).
See also:
AutoSegmentFlag::SegNotAligned 
	
SegNotTargetAligned	This target contact of the segment is not the aligned part of a tee (h1  or h2  for a HTee , v1  or v2  for a VTee ).
See also:
AutoSegmentFlag::SegNotAligned 
	
SegSlackened	This AutoSegment has been slackened, that is freed from any constraints from source or target through the insertion of straps. 
	
SegAxisSet	This AutoSegment has been explicitly positionned at least once. 
	
SegInvalidated	This position or topology of this AutoSegment has been changed, needing a revalidation. 
	
SegInvalidatedLayer	The segment has been chenged of layer, but the source & target AutoContact have not been topologicaly checked yet. This flag must  be used in whith AutoSegmentFlag::SegInvalidated. 
	
SegCreated	The AutoSegment has just been created. This flag is set only from the contruction of the object until is first  revalidation. Used to disable some tests that cannot be satisfied initially. 
	
SegWeakTerminal	A mask composed of:
Katabatic::SegStrongTerminal
Katabatic::SegWeakTerminal1
Katabatic::SegWeakTerminal2 
	
SegNotAligned	A mask composed of:
Katabatic::SegNotSourceAligned
Katabatic::SegNotTargetAligned
This mask is a quick way to know if a segment is not  part of an aligned set. It means that the segment is, on both ends, either connected to a terminal, a turn or the stem part of a tee . 

Class Documentation
AutoContact Class Reference

Abstract base class for AutoContact. 
Inheritance diagram for AutoContact:
IMAGE

Public Member Functions
Hook * getBodyHook ()
Hook * getAnchorHook ()
Component * getAnchor () const
Net * getNet () const
const Layer * getLayer () const
DbU::Unit getX () const
DbU::Unit getY () const
DbU::Unit getDx () const
DbU::Unit getDy () const
Point getCenter () const
Point getPosition () const
DbU::Unit getWidth () const
DbU::Unit getHalfWidth () const
DbU::Unit getHeight () const
DbU::Unit getHalfHeight () const
Components getSlaveComponents () const
void setLayer (const Layer *)
void setWidth (DbU::Unit)
void setHeight (DbU::Unit)
void setSizes (DbU::Unit width, DbU::Unit height)
void setX (DbU::Unit)
void setY (DbU::Unit)
void setPosition (DbU::Unit width, DbU::Unit height)
void setPosition (const Point &)
void setDx (DbU::Unit)
void setDy (DbU::Unit)
void setOffset (DbU::Unit dx, DbU::Unit dy)
virtual void translate (const DbU::Unit &tx, const DbU::Unit &ty)
bool isInCreationStage () const
bool isInvalidated () const
bool isInvalidatedCache () const
bool isTurn () const
bool isTee (unsigned int direction) const
bool isHTee () const
bool isVTee () const
bool isFixed () const
bool hasBadTopology () const
bool canDestroy (unsigned int flags=0) const
bool canMoveUp (const AutoSegment *moved) const
Contact * base () const
virtual const Name & getName () const
size_t getId () const
virtual Box getBoundingBox () const
GCell * getGCell () const
virtual AutoSegment * getOpposite (const AutoSegment *) const =0
virtual AutoSegment * getPerpandicular (const AutoSegment *) const =0
virtual AutoSegment * getSegment (unsigned int) const =0
unsigned int getMinDepth () const
unsigned int getMaxDepth () const
void getLengths (DbU::Unit *lengths, AutoSegment::DepthLengthSet &)
virtual Box getNativeConstraintBox () const
Interval getUConstraints (unsigned int direction) const
DbU::Unit getCBXMin () const
DbU::Unit getCBXMax () const
DbU::Unit getCBYMin () const
DbU::Unit getCBYMax () const
Box getConstraintBox () const
Box & intersectConstraintBox (Box &box) const
void invalidate (unsigned int flags=0)
virtual void updateGeometry ()=0
virtual void updateTopology ()=0
void showTopologyError (const std::string &, unsigned int flags=0)
virtual void checkTopology ()
void setGCell (GCell *)
void setCBXMin (DbU::Unit xMin)
void setCBXMax (DbU::Unit xMax)
void setCBYMin (DbU::Unit yMin)
void setCBYMax (DbU::Unit yMax)
void setConstraintBox (const Box &box)
bool restrictConstraintBox (DbU::Unit constraintMin, DbU::Unit constraintMax, unsigned int flags=KbWarnOnError)
void migrateConstraintBox (AutoContact *other)
Static Public Member Functions
static size_t getAllocateds ()
static const Name & getStaticName ()
Static Protected Member Functions
static void _getTopology (Contact *, Component *&anchor, Horizontal **&, Vertical **&, size_t)

Detailed Description
Abstract base class for AutoContact. 

Caching Mechanism
To bypass the Ring/Hook mechanism and  the subsequent Session::Lookup() call, the AutoSegments anchored on an AutoContact are cached in the AutoContact itself. They can be accessed through getHorizontalN()  and getVerticalN() accessors N  depending on the subtype of AutoContact.
Cached AutoSegments are updated in the AutoContact::updateTopology() function only.
Invalidate on AutoContacts
The invalidation of an AutoContact invalidate all the segments that are anchored on it.
Special Case of HTee & VTee 
When invalidating an HTee or VTee, two out of the three anchored segments are parallels. The aligned  constraint is passed on those two. By default, when we invalidate an AutoSegment, the invalidation is applied to the whole aligned set through the AutoSegment::getAligneds() collection. So if one of the parallel is invalidated and the other not, it should only be because we are already in getAligneds() , then we do not want to invalidate again the whole aligned set. In that case, we perform an atomic only invalidation (reset Katabatic::KbPropagate).
For the complete invalidation/revalidation mechanism see Session Algorithm.
Notes - Differences from Katabatic 2
From the previous version of Katabatic, AutoContact have been greatly stripped down (again). They are now always punctual objetcs with stricly fixed topologies: 
AutoContactTerminal to connect to a terminal (one segment). 
AutoContactTurn to make a turn: two perpandiculars segments. 
AutoContactHTee an horizontal tee: two aligned  horizonals and one vertical. 
AutoContactVTee an horizontal tee: two aligned  verticals and one horizontal. 

Member Function Documentation
Hook * getBodyHook ()[inline]
Base class method proxy.  
References Component::getBodyHook().
Referenced by GCellTopology::_do_xG_1Pad(), and AutoSegment::create().
Hook * getAnchorHook ()[inline]
Base class method proxy.  
References Contact::getAnchorHook().
Component * getAnchor () const[inline]
Base class method proxy.  
References Contact::getAnchor().
Referenced by AutoContactTerminal::getNativeConstraintBox(), and AutoContactTerminal::updateTopology().
Net * getNet () const[inline]
Base class method proxy.  
References Component::getNet().
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
const Layer * getLayer () const[inline]
Base class method proxy.  
References Component::getLayer().
Referenced by AutoSegment::makeDogleg(), AutoSegment::revalidate(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
DbU::Unit getX () const[inline]
Base class method proxy.  
References Component::getX().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_xG_xM3(), AutoSegment::create(), GCellTopology::doRp_StairCaseV(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry().
DbU::Unit getY () const[inline]
Base class method proxy.  
References Component::getY().
Referenced by AutoSegment::create(), GCellTopology::doRp_StairCaseH(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry().
DbU::Unit getDx () const[inline]
Base class method proxy.  
References Contact::getDx().
DbU::Unit getDy () const[inline]
Base class method proxy.  
References Contact::getDy().
Point getCenter () const[inline]
Base class method proxy.  
Point getPosition () const[inline]
Base class method proxy.  
References Component::getPosition().
DbU::Unit getWidth () const[inline]
Base class method proxy.  
References Contact::getWidth().
DbU::Unit getHalfWidth () const[inline]
Base class method proxy.  
References Contact::getHalfWidth().
DbU::Unit getHeight () const[inline]
Base class method proxy.  
References Contact::getHeight().
DbU::Unit getHalfHeight () const[inline]
Base class method proxy.  
References Contact::getHalfHeight().
Components getSlaveComponents () const[inline]
Base class method proxy.  
References Component::getSlaveComponents().
void setLayer (const Layer *  layer)[inline]
Base class method proxy.  
References Contact::setLayer().
Referenced by AutoSegment::reduceDoglegLayer(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
void setWidth (DbU::Unit  w)[inline]
Base class method proxy.  
References Contact::setWidth().
void setHeight (DbU::Unit  h)[inline]
Base class method proxy.  
References Contact::setHeight().
void setSizes (DbU::Unit  w, DbU::Unit  h)[inline]
Base class method proxy.  
References Contact::setSizes().
void setX (DbU::Unit  x)[inline]
Base class method proxy.  
References Contact::setX().
Referenced by AutoVertical::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().
void setY (DbU::Unit  y)[inline]
Base class method proxy.  
References Contact::setY().
Referenced by AutoHorizontal::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().
void setPosition (DbU::Unit  w, DbU::Unit  h)[inline]
Base class method proxy.  
References Contact::setPosition().
void setPosition (const Point &  p)[inline]
Base class method proxy.  
References Contact::setPosition().
void setDx (DbU::Unit  dx)[inline]
Base class method proxy.  
References Contact::setDx().
void setDy (DbU::Unit  dy)[inline]
Base class method proxy.  
References Contact::setDy().
void setOffset (DbU::Unit  w, DbU::Unit  h)[inline]
Base class method proxy.  
References Contact::setOffset().
void translate (const DbU::Unit &  dx, const DbU::Unit &  dy)[virtual]
Base class method proxy.  
bool isInCreationStage () const[inline]
Returns:  true  if the AutoContact is still in it's initial creation stage. 
References Katabatic::CntInCreationStage.
bool isInvalidated () const[inline]
Returns:  true  if the some AutoSegment has changed and the AutoContact needs to be repositionned (through a call to AutoContact::updateGeometry()). 
References Katabatic::CntInvalidated.
bool isInvalidatedCache () const[inline]
Returns:  true  if the some AutoSegment has changed and the AutoContact topology needs to be restored, as a gap may have appeared (through a call to AutoSegment::updateTopology()). 
References Katabatic::CntInvalidatedCache.
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
bool isTurn () const[inline]
Returns:  true  if the dynamic type of the AutoContact is of type Turn. 
References Katabatic::CntTurn.
Referenced by AutoSegment::canReduce(), and AutoSegment::revalidate().
bool isTee (unsigned int  direction) const
Returns:  true  if the dynamic type of the AutoContact is either of type AutoContactHTee or AutoContactVTee, according to direction . 
References Katabatic::KbHorizontal, and Katabatic::KbVertical.
bool isHTee () const[inline]
Returns:  true  if the dynamic type of the AutoContact is of type AutoContactHTee. 
References Katabatic::CntHTee.
bool isVTee () const[inline]
Returns:  true  if the dynamic type of the AutoContact is of type AutoContactHTee. 
References Katabatic::CntVTee.
bool isFixed () const[inline]
Returns:  true  if the AutoContact cannot be moved. 
References Katabatic::CntFixed.
Referenced by AutoSegment::create(), AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoContact::getCBYMax(), and AutoContact::getCBYMin().
bool hasBadTopology () const[inline]
Returns:  true  if the AutoContact topology has been broken and a gap has appeared. (sould not happen...) 
References Katabatic::CntBadTopology.
Referenced by AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), and AutoContactHTee::updateTopology().
bool canDestroy (unsigned int  flags = 0) const
Returns:  true  if the AutoContact could be destroyed, that is, no segments remains anchored on it. If flags  contains Katabatic::KbWarnOnError, issue an error message. 
References Katabatic::KbWarnOnError.
bool canMoveUp (const AutoSegment *  moved) const
Returns:  true  if segment  can be moved up without triggering a topological modification. It meaans that:
Without moved , the AutoContact needs only one layer.
moved  go from below  the AutoContact to above . 
References Component::getLayer(), AutoSegment::getLayer(), and RoutingGauge::getLayerDepth().
Contact * base () const[inline]
Returns:  The Hurricane::Contact which is decorated. 
Referenced by AutoVertical::_makeDogleg(), AutoSegment::create(), AutoSegment::getOppositeAnchor(), GCell::removeContact(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().
size_t getAllocateds ()[static]
Returns:  The total number of AutoContact currently allocateds. 
const Name & getStaticName ()[static]
Returns:  The name of the Hurricane::ExtensionGo slice. 
const Name & getName () const[virtual]
Returns:  The name of the Hurricane::ExtensionGo slice. 
const Name & getId () const[inline]
Returns:  The unique identifer  of the AutoSegment. 
Box getBoundingBox () const[virtual]

See also:
Contact::getBoundingBox(). 
GCell * getGCell () const[inline]
Returns:  The GCell into which the AutoContact is located. 
Referenced by AutoHorizontal::_canSlacken(), AutoVertical::_canSlacken(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), AutoHorizontal::_preDestroy(), AutoVertical::_preDestroy(), AutoSegment::AutoSegment(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoHorizontal::getGCells(), AutoVertical::getGCells(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), and AutoSegment::toConstraintAxis().
AutoSegment * getOpposite (const AutoSegment *  reference) const[pure virtual]
Returns:  The other AutoSegment the same  direction as reference , this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL  is returned. 
Implemented in AutoContactTerminal (p.pagenum), AutoContactHTee (p.pagenum), AutoContactTurn (p.pagenum), and AutoContactVTee (p.pagenum).
AutoSegment * getPerpandicular (const AutoSegment *  reference) const[pure virtual]
Returns:  The AutoSegment in the perpandicular  direction to reference , this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL  is returned. 
Implemented in AutoContactTerminal (p.pagenum), AutoContactHTee (p.pagenum), AutoContactTurn (p.pagenum), and AutoContactVTee (p.pagenum).
Referenced by AutoSegment::raise(), AutoSegment::reduce(), and AutoSegment::revalidate().
AutoSegment * getSegment (unsigned int  index) const[pure virtual]
Returns:  The nth anchored AutoSegment. The index is significant:
0  : first horizontal (h1 ).
1  : second horizontal (h2 ).
2  : first vertical (b1 ).
3  : second vertical (b2 ).
Not all the indexes are filled for every AutoContact. For example Turn  have h1  and b1 , and HTee  have h1 , h2  and v1 . 
Implemented in AutoContactTerminal (p.pagenum), AutoContactHTee (p.pagenum), AutoContactTurn (p.pagenum), and AutoContactVTee (p.pagenum).
Referenced by AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), LocatorHelper::getSegment(), LocatorHelper::LocatorHelper(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), and LocatorHelper::progress().
unsigned int getMinDepth () const
Returns:  The layer depth of the bottom layer of the AutoContact. 
References Component::getLayer().
Referenced by AutoSegment::canPivotUp().
unsigned int getMaxDepth () const
Returns:  The layer depth of the top layer of the AutoContact. 
References Component::getLayer().
Referenced by AutoSegment::canPivotDown().
void getLengths (DbU::Unit *  lengths, AutoSegment::DepthLengthSet &  processeds)

Parameters:
lengths 	A table of DbU::Unit, the size of all routing layers used. 	
processeds 	An AutoSegment sorted set holding all the already processeds AutoSegments.	
Compute the lengths over the owning GCell of all the AutoSegments anchored on this AutoContact. The lengths are added to the total length table lengths . To avoid double accounting of the local AutoSegments that have both source & target in the same GCell, we keep a set of already processeds AutoSegments in processeds . 
References Katabatic::KbHorizontal, Katabatic::KbVertical, and toLambda().
Box getNativeConstraintBox () const[virtual]
Returns:  The native constraint box (that is, whithout any user constraints applied). For AutoContactTerminal, this is the Box of the supporting external component, and for all others the bounding box of the owning GCell. 
Reimplemented in AutoContactTerminal (p.pagenum).
Interval getUConstraints (unsigned int  direction) const
Returns:  The constraint interval in direction  (that is, the relevant side of the constraint box). 
References Interval::inflate(), and Katabatic::KbHorizontal.
Referenced by AutoContactTerminal::updateGeometry().
DbU::Unit getCBXMin () const[inline]
Returns:  The X coordinate of the bottom left corner of the constraint box. 
References DbU::fromLambda(), Component::getX(), GCell::getX(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoVertical::getConstraints().
DbU::Unit getCBXMax () const[inline]
Returns:  The X coordinate of the top right corner of the constraint box. 
References DbU::fromLambda(), Component::getX(), GCell::getX(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoVertical::getConstraints().
DbU::Unit getCBYMin () const[inline]
Returns:  The Y coordinate of the bottom left corner of the constraint box. 
References DbU::fromLambda(), Component::getY(), GCell::getY(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoHorizontal::getConstraints().
DbU::Unit getCBYMax () const[inline]
Returns:  The Y coordinate of the top right corner of the constraint box. 
References DbU::fromLambda(), Component::getY(), GCell::getY(), and AutoContact::isFixed().
Referenced by AutoContact::getConstraintBox(), and AutoHorizontal::getConstraints().
Box getConstraintBox () const[inline]
Returns:  The current constraint box: the native constraint box with all the user's contraints applieds. 
References AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoContact::getCBYMax(), and AutoContact::getCBYMin().
Referenced by AutoSegment::computeOptimal(), and AutoContact::migrateConstraintBox().
Box & intersectConstraintBox (Box &  box) const
Returns:  The intersection between box  and the constraint box. The result is stored into box  and a reference to it is returned. 
References Box::getIntersection().
void invalidate (unsigned int  flags = 0)
Invalidate the AutoContact, schedule it for revalidation in the Session. If flag containt Katabatic::CntInvalidTopology, the topology of the AutoContact will also be checked and possible gap closeds.
The revalidations methods associated are:
AutoSegment::updateGeometry(), recompute the punctual contact position.
AutoSegment::updateTopology(), restore the connexity. 
References Katabatic::CntInvalidated, and Katabatic::CntInvalidatedCache.
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::AutoSegment().
void updateGeometry ()[pure virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator. 
Implemented in AutoContactTerminal (p.pagenum), AutoContactHTee (p.pagenum), AutoContactTurn (p.pagenum), and AutoContactVTee (p.pagenum).
void updateTopology ()[pure virtual]
Modificate the AutoContact topology to close any gap. This could be by changing layer or creating a new dogleg on an incident AutoSegment. 
Implemented in AutoContactTerminal (p.pagenum), AutoContactHTee (p.pagenum), AutoContactTurn (p.pagenum), and AutoContactVTee (p.pagenum).
void showTopologyError (const std::string &  message, unsigned int  flags = 0)
Comprensive display of the topology of the AutoContact to ease the debug work. Prepend with the error message message . Do no throw an error. 
References AutoSegment::isGlobal().
Referenced by AutoContactTerminal::updateGeometry(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
void checkTopology ()[virtual]
Check for topology correctness (no gaps), display an error message if needed. 
void setGCell (GCell *  gcell)
Set the owning GCell. 
References GCell::addContact(), and toLambda().
Referenced by AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().
void setCBXMin (DbU::Unit  xMin)[inline]
Set the lower left X coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box. 

References GCell::getX().
void setCBXMax (DbU::Unit  xMax)[inline]
Set the upper right X coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box. 

References GCell::getX(), and GCell::getXMax().
void setCBYMin (DbU::Unit  yMin)[inline]
Set the lower left Y coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box. 

References GCell::getY().
void setCBYMax (DbU::Unit  yMax)[inline]
Set the upper right Y coordinate of the constraint box.
Remark: It cannot go outside the GCell bounding box. 

References GCell::getY(), and GCell::getYMax().
void setConstraintBox (const Box &  box)
Set the constraint box.
Remark: It cannot go outside the GCell bounding box. 

References Box::getXMax(), Box::getXMin(), Box::getYMax(), and Box::getYMin().
bool restrictConstraintBox (DbU::Unit  min, DbU::Unit  max, unsigned int  flags = KbWarnOnError)

Parameters:
min 	The minimum of the restriction interval. 	
max 	The maximum of the restriction interval. 	
flags 	Gives the direction of the restriction. 	
Returns:
true  if the restriction was actually applied.
Restrict the current constraint box but check if the restriction will not lead to an empty interval, in that case, do nothing and return false . 
References Katabatic::KbHorizontal, Katabatic::KbVertical, Katabatic::KbWarnOnError, and toLambda().
void migrateConstraintBox (AutoContact *  other)
Transfer the user constraint box from other  to the current object this . The constraints of other  are restored to their native values. The two contacts must belong to the same GCell for this method to take effect. 
References AutoContact::getConstraintBox().
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().
void _getTopology (Contact *  support, Component *&  anchor, Horizontal **&  horizontals, Vertical **&  verticals, size_t  size)[static], [protected]

Parameters:
anchor 	The anchor, if any. 	
hs 	The Hurricane::Horizontal anchored. 	
vs 	The Hurricane::Vertical anchored. 	
sz 	The size of boths hs  & vs  table passed as arguments.	
Fill anchor  , hs  and vs  with the components anchored on this AutoContact. 
References Contact::getAnchor(), and Component::getSlaveComponents().

The documentation for this class was generated from the following files:
AutoContact.h
AutoContact.cpp
AutoContact.dox

AutoContactHTee Class Reference

AutoContact H-Tee (two H, one V) 
Inheritance diagram for AutoContactHTee:
IMAGE

Public Member Functions
virtual AutoSegment * getOpposite (const AutoSegment *) const
virtual AutoSegment * getPerpandicular (const AutoSegment *) const
virtual AutoSegment * getSegment (unsigned int) const
virtual void updateGeometry ()
virtual void updateTopology ()
Static Public Member Functions
static AutoContactHTee * create (GCell *, Net *, const Layer *)
Additional Inherited Members

Detailed Description
AutoContact H-Tee (two H, one V) 
AutoContact to build an horizontal tee (two H, one V). 

Member Function Documentation
AutoContactHTee * create (GCell *  gcell, Net *  net, const Layer *  layer)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
net 	The Net to which this AutoContact belongs. 	
layer 	The Layer of the AutoContact. 	
Returns:
The created AutoContactHTee.
Create a new AutoContactHTee. 
References Katabatic::CntInCreationStage, and Contact::create().
Referenced by GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), and GCellTopology::_do_xG_xM1_xM3().
AutoSegment * getOpposite (const AutoSegment *  reference) const[virtual]
Returns:  The other AutoSegment the same  direction as reference , this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getPerpandicular (const AutoSegment *  reference) const[virtual]
Returns:  The AutoSegment in the perpandicular  direction to reference , this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getSegment (unsigned int  index) const[virtual]
Returns:  The nth anchored AutoSegment. The index is significant:
0  : first horizontal (h1 ).
1  : second horizontal (h2 ).
2  : first vertical (b1 ).
3  : second vertical (b2 ).
Not all the indexes are filled for every AutoContact. For example Turn  have h1  and b1 , and HTee  have h1 , h2  and v1 . 
Implements AutoContact (p.pagenum).
void updateGeometry ()[virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator. 
Implements AutoContact (p.pagenum).
References AutoContact::base(), DebugSession::close(), Katabatic::CntInvalidated, AutoContact::getNet(), AutoContact::getX(), AutoContact::getY(), AutoContact::hasBadTopology(), Go::invalidate(), AutoContact::isInvalidatedCache(), DebugSession::open(), AutoContact::setX(), and AutoContact::setY().
void updateTopology ()[virtual]
Restore the topology (i.e. connexity) of the contact after any number of connected segments has changed layer (at least one, up to three).
For any configuration, the connexity can be restored by making only one dogleg.
We distinguish two kind of layer changes:
1.	The two horizontals (h1  and h2 ) are still on the same layer (either they both moved or the vertical only has moved, see figures 2 & 4). In that case, the dogleg is made on the vertical.
2.	The two horizontals no longer are on the same layer (figures 1 & 3). In that case, the dogleg is made on the horizontal which is at the greater distance (in a layer sense) from the vertical.
 
Implements AutoContact (p.pagenum).
References DebugSession::close(), Katabatic::CntBadTopology, RoutingGauge::getContactLayer(), AutoContact::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getNet(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoContact::hasBadTopology(), AutoContact::isInvalidatedCache(), DebugSession::open(), AutoContact::setLayer(), and AutoContact::showTopologyError().

The documentation for this class was generated from the following files:
AutoContactHTee.h
AutoContactHTee.cpp
AutoContactHTee.dox

AutoContactTerminal Class Reference

AutoContact Terminal (S/T is a Terminal) 
Inheritance diagram for AutoContactTerminal:
IMAGE

Public Member Functions
virtual Box getNativeConstraintBox () const
virtual AutoSegment * getSegment (unsigned int) const
virtual AutoSegment * getOpposite (const AutoSegment *) const
virtual AutoSegment * getPerpandicular (const AutoSegment *) const
virtual void updateGeometry ()
virtual void updateTopology ()
Static Public Member Functions
static AutoContactTerminal * create (GCell *gcell, Component *anchor, const Layer *layer, Point point, DbU::Unit width, DbU::Unit height)
static AutoContactTerminal * create (GCell *gcell, Component *anchor, const Layer *layer, const DbU::Unit dx, const DbU::Unit dy, const DbU::Unit width, const DbU::Unit height)
Additional Inherited Members

Detailed Description
AutoContact Terminal (S/T is a Terminal) 
AutoContact that are directly attached by either source or target or both to a terminal. 

Member Function Documentation
AutoContactTerminal * create (GCell *  gcell, Component *  rp, const Layer *  layer, Point  point, DbU::Unit  width, DbU::Unit  height)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
rp 	The RoutingPad on which to anchor the AutoContact. 	
layer 	The Layer of the AutoContact. 	
point 	The absolute position. 	
width 	The width of the AutoContact. 	
height 	The height of the AutoContact. 	
Returns:
The created AutoContact.
Create a new AutoContactTerminal anchored on rp . point  gives the absolute  position. 
References Hook::detach(), and Component::getBodyHook().
Referenced by GCellTopology::doRp_AccessPad(), and GCellTopology::doRp_AutoContacts().
AutoContactTerminal * create (GCell *  gcell, Component *  rp, const Layer *  layer, const DbU::Unit  x, const DbU::Unit  y, const DbU::Unit  width, const DbU::Unit  height)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
rp 	The Component on which to anchor the AutoContact. 	
layer 	The Layer of the AutoContact. 	
x 	The absolute X position. 	
y 	The absolute Y position. 	
width 	The width of the AutoContact. 	
height 	The height of the AutoContact. 	
Returns:
The created AutoContact.
Create a new AutoContactTerminal anchored on rp . (x,y)  gives the absolute  position.
The anchor component rp  is most often a Hurricane::RoutingPad (occurrencing a Hurricane::Segment) or directly a Hurricane::Segment, in case of RoutingPad layer promotion. 
References Katabatic::CntInCreationStage, Contact::create(), Component::getPosition(), and DbU::getValueString().
Box getNativeConstraintBox () const[virtual]
Returns:  The native constraint box (that is, whithout any user constraints applied). For AutoContactTerminal, this is the Box of the supporting external component, and for all others the bounding box of the owning GCell. 
Reimplemented from AutoContact (p.pagenum).
References AutoContact::getAnchor(), GCell::getBoundingBox(), Occurrence::getEntity(), RoutingPad::getOccurrence(), Transformation::getOrientation(), Occurrence::getPath(), Component::getPosition(), RoutingPad::getSourcePosition(), Segment::getSourcePosition(), RoutingPad::getTargetPosition(), Segment::getTargetPosition(), Path::getTransformation(), and DbU::getValueString().
AutoSegment * getSegment (unsigned int  index) const[virtual]
Returns:  The nth anchored AutoSegment. The index is significant:
0  : first horizontal (h1 ).
1  : second horizontal (h2 ).
2  : first vertical (b1 ).
3  : second vertical (b2 ).
Not all the indexes are filled for every AutoContact. For example Turn  have h1  and b1 , and HTee  have h1 , h2  and v1 . 
Implements AutoContact (p.pagenum).
References AutoSegment::isHorizontal(), and AutoSegment::isVertical().
AutoSegment * getOpposite (const AutoSegment *  reference) const[virtual]
Returns:  The other AutoSegment the same  direction as reference , this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getPerpandicular (const AutoSegment *  reference) const[virtual]
Returns:  The AutoSegment in the perpandicular  direction to reference , this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL  is returned. 
Implements AutoContact (p.pagenum).
void updateGeometry ()[virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator. 
Implements AutoContact (p.pagenum).
References AutoContact::base(), DebugSession::close(), Katabatic::CntInvalidated, Interval::contains(), AutoContact::getNet(), AutoContact::getUConstraints(), DbU::getValueString(), AutoSegment::getX(), AutoSegment::getY(), AutoContact::hasBadTopology(), Go::invalidate(), AutoSegment::isCreated(), AutoSegment::isHorizontal(), AutoContact::isInvalidatedCache(), Katabatic::KbHorizontal, Katabatic::KbVertical, DebugSession::open(), AutoContact::setX(), AutoContact::setY(), and AutoContact::showTopologyError().
void updateTopology ()[virtual]
Restore the topology (i.e. connexity) of the contact after the incident segment has changed layer.
Based on the layer depth delta between the terminal and the segment three case can occurs:
The delta is zero , then just sets the layer of the contact to the common metal layer.
The delta is one , then sets the contact layer to VIA connecting the two layers.
The delta is two , then create a dogleg to restore the connexity. Depending on whether the terminal was attached to the source or target, sets the layer of the segments.
A delta of more than two  is an error, and must never occurs.
As, by default, the perpandicular is set in the layer above the parallel, it may be necessary to adjust his layer as well (to the one below).
 
Implements AutoContact (p.pagenum).
References DebugSession::close(), Katabatic::CntBadTopology, AutoContact::getAnchor(), RoutingGauge::getContactLayer(), AutoContact::getLayer(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getNet(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoSegment::invalidate(), AutoContact::isInvalidatedCache(), AutoSegment::makeDogleg(), DebugSession::open(), AutoContact::setLayer(), and AutoContact::showTopologyError().

The documentation for this class was generated from the following files:
AutoContactTerminal.h
AutoContactTerminal.cpp
AutoContactTerminal.dox

AutoContactTurn Class Reference

AutoContact Turn (one H, one V) 
Inheritance diagram for AutoContactTurn:
IMAGE

Public Member Functions
virtual AutoSegment * getOpposite (const AutoSegment *) const
virtual AutoSegment * getPerpandicular (const AutoSegment *) const
virtual AutoSegment * getSegment (unsigned int) const
virtual void updateGeometry ()
virtual void updateTopology ()
Static Public Member Functions
static AutoContactTurn * create (GCell *, Net *, const Layer *)
Additional Inherited Members

Detailed Description
AutoContact Turn (one H, one V) 
AutoContact to make a turn (one H, one V). 

Member Function Documentation
AutoContactTurn * create (GCell *  gcell, Net *  net, const Layer *  layer)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
net 	The Net to which this AutoContact belongs. 	
layer 	The Layer of the AutoContact. 	
Returns:
The created AutoContactTurn.
Create a new AutoContactTurn. 
References Katabatic::CntInCreationStage, and Contact::create().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_1G_xM1(), GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_1Pad(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM3(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), GCellTopology::doRp_Access(), GCellTopology::doRp_StairCaseH(), GCellTopology::doRp_StairCaseV(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
AutoSegment * getOpposite (const AutoSegment *  reference) const[virtual]
Returns:  The other AutoSegment the same  direction as reference , this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getPerpandicular (const AutoSegment *  reference) const[virtual]
Returns:  The AutoSegment in the perpandicular  direction to reference , this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getSegment (unsigned int  index) const[virtual]
Returns:  The nth anchored AutoSegment. The index is significant:
0  : first horizontal (h1 ).
1  : second horizontal (h2 ).
2  : first vertical (b1 ).
3  : second vertical (b2 ).
Not all the indexes are filled for every AutoContact. For example Turn  have h1  and b1 , and HTee  have h1 , h2  and v1 . 
Implements AutoContact (p.pagenum).
void updateGeometry ()[virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator. 
Implements AutoContact (p.pagenum).
References AutoContact::base(), DebugSession::close(), Katabatic::CntInvalidated, AutoContact::getNet(), AutoContact::getX(), AutoContact::getY(), AutoContact::hasBadTopology(), Go::invalidate(), AutoContact::isInvalidatedCache(), DebugSession::open(), AutoContact::setX(), and AutoContact::setY().
void updateTopology ()[virtual]
Restore the topology (i.e. connexity) of the contact after one or both connected segments has changed layer.
Based on the layer depth delta between the two perpandiculars segments. Three case can occurs:
The delta is zero , then just sets the layer of the contact to the common metal layer (turn in same layer).
The delta is one , then sets the contact layer to VIA connecting the two layers.
The delta cannot be equal to two , due to the alternatives routing directions, it would mean a turn  connecting two horizontals  (or verticals) in different layers.
The delta is three , then create a dogleg to restore the connexity. The dogleg will be created on the connected segment which as been layer invalidated . If both of them have been invalidated, the horizontal one is preferred.
A delta of more than three  is an error, and must never occurs.
 
Implements AutoContact (p.pagenum).
References DebugSession::close(), Katabatic::CntBadTopology, RoutingGauge::getContactLayer(), AutoContact::getLayer(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getNet(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoContact::hasBadTopology(), AutoSegment::invalidate(), AutoContact::isInvalidatedCache(), AutoSegment::isInvalidatedLayer(), AutoSegment::makeDogleg(), DebugSession::open(), AutoContact::setLayer(), and AutoContact::showTopologyError().

The documentation for this class was generated from the following files:
AutoContactTurn.h
AutoContactTurn.cpp
AutoContactTurn.dox

AutoContactVTee Class Reference

AutoContact V-Tee (one H, two V) 
Inheritance diagram for AutoContactVTee:
IMAGE

Public Member Functions
virtual AutoSegment * getOpposite (const AutoSegment *) const
virtual AutoSegment * getPerpandicular (const AutoSegment *) const
virtual AutoSegment * getSegment (unsigned int) const
virtual void updateGeometry ()
virtual void updateTopology ()
Static Public Member Functions
static AutoContactVTee * create (GCell *, Net *, const Layer *)
Additional Inherited Members

Detailed Description
AutoContact V-Tee (one H, two V) 
AutoContact to build a vertical tee (two V, one H). 

Member Function Documentation
AutoContactVTee * create (GCell *  gcell, Net *  net, const Layer *  layer)[static]

Parameters:
gcell 	The GCell into which create the AutoContact. 	
net 	The Net to which this AutoContact belongs. 	
layer 	The Layer of the AutoContact. 	
Returns:
The created AutoContactVTee.
Create a new AutoContactVTee. 
References Katabatic::CntInCreationStage, and Contact::create().
Referenced by GCellTopology::_do_xG(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), and GCellTopology::_do_xG_xM3().
AutoSegment * getOpposite (const AutoSegment *  reference) const[virtual]
Returns:  The other AutoSegment the same  direction as reference , this is only meaningful on AutoContactHTee or AutoContactVTee. If there is no opposite, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getPerpandicular (const AutoSegment *  reference) const[virtual]
Returns:  The AutoSegment in the perpandicular  direction to reference , this is only meaningful on AutoContacTurn. It there is no unique perpandicular, NULL  is returned. 
Implements AutoContact (p.pagenum).
AutoSegment * getSegment (unsigned int  index) const[virtual]
Returns:  The nth anchored AutoSegment. The index is significant:
0  : first horizontal (h1 ).
1  : second horizontal (h2 ).
2  : first vertical (b1 ).
3  : second vertical (b2 ).
Not all the indexes are filled for every AutoContact. For example Turn  have h1  and b1 , and HTee  have h1 , h2  and v1 . 
Implements AutoContact (p.pagenum).
void updateGeometry ()[virtual]
Compute the new position of the AutoContact based on the AutoSegment positions. The Session mechanism ensure that all AutoSegment are set into their final positions before calling this updator. 
Implements AutoContact (p.pagenum).
References AutoContact::base(), DebugSession::close(), Katabatic::CntInvalidated, AutoContact::getNet(), AutoContact::getX(), AutoContact::getY(), AutoContact::hasBadTopology(), Go::invalidate(), AutoContact::isInvalidatedCache(), DebugSession::open(), AutoContact::setX(), and AutoContact::setY().
void updateTopology ()[virtual]
Restore the topology (i.e. connexity) of the contact after any number of connected segments has changed layer (at least one, up to three).
For a detailed explanation, see AutoContactHTee::updateTopology() and sawp horizontal & vertical... 
Implements AutoContact (p.pagenum).
References DebugSession::close(), Katabatic::CntBadTopology, RoutingGauge::getContactLayer(), AutoContact::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getNet(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoContact::hasBadTopology(), AutoSegment::invalidate(), AutoContact::isInvalidatedCache(), DebugSession::open(), AutoContact::setLayer(), and AutoContact::showTopologyError().

The documentation for this class was generated from the following files:
AutoContactVTee.h
AutoContactVTee.cpp
AutoContactVTee.dox

AutoHorizontal Class Reference

Concrete Horizontal AutoSegment. 
Inheritance diagram for AutoHorizontal:
IMAGE

Public Member Functions
virtual bool _canSlacken () const
virtual bool canMoveULeft (float reserve=0.0) const
virtual bool canMoveURight (float reserve=0.0) const
virtual Segment * base ()
virtual Segment * base () const
virtual Horizontal * getHorizontal ()
virtual DbU::Unit getSourceU () const
virtual DbU::Unit getTargetU () const
virtual DbU::Unit getDuSource () const
virtual DbU::Unit getDuTarget () const
virtual Interval getSpanU () const
virtual bool getConstraints (DbU::Unit &min, DbU::Unit &max) const
virtual Interval getSourceConstraints (unsigned int flags=0) const
virtual Interval getTargetConstraints (unsigned int flags=0) const
virtual unsigned int getDirection () const
virtual size_t getGCells (vector< GCell *> &) const
virtual void setDuSource (DbU::Unit)
virtual void setDuTarget (DbU::Unit)
virtual void updateOrient ()
virtual void updatePositions ()
virtual bool checkPositions () const
virtual bool checkConstraints () const
virtual unsigned int _makeDogleg (GCell *, unsigned int flags)
virtual bool moveULeft ()
virtual bool moveURight ()
Protected Member Functions
virtual void _postCreate ()
virtual void _preDestroy ()
Additional Inherited Members

Detailed Description
Concrete Horizontal AutoSegment. 

Member Function Documentation
bool _canSlacken () const[virtual]
Returns:  true  if the segment can be slackened. That is, source or target constraints are less than three pitches. 
Implements AutoSegment (p.pagenum).
References Interval::contains(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getSide(), Interval::getSize(), DbU::getValueString(), Interval::inflate(), and Katabatic::KbVertical.
bool canMoveULeft (float  reserve = 0.0) const[virtual]

Returns:
true  if the global  segment can be moved on the left GCell (for a vertical) or down (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the target . That is, it's a global which extends toward left.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), GCell::getDown(), AutoContact::getGCell(), AutoSegment::getGCell(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), GCell::getRight(), Session::getRoutingGauge(), AutoContact::getSegment(), GCell::getWDensity(), and AutoSegment::isGlobal().
bool canMoveURight (float  reserve = 0.0) const[virtual]

Returns:
true  if the global  segment can be moved on the right GCell (for a vertical) or up (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the source . That is, it's a global which extends toward right.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), GCell::getRight(), Session::getRoutingGauge(), AutoContact::getSegment(), GCell::getUp(), GCell::getWDensity(), and AutoSegment::isGlobal().
Segment * base ()[virtual]
Returns:  the decorated Hurricane::Segment. 
Implements AutoSegment (p.pagenum).
Segment * base () const[virtual]
Returns:  the decorated Hurricane::Segment (const flavor). 
Implements AutoSegment (p.pagenum).
Horizontal * getHorizontal ()[virtual]
Returns:  If the decorated segment is a Hurricane::Horizontal, return it. NULL  otherwise. 
Reimplemented from AutoSegment (p.pagenum).
DbU::Unit getSourceU () const[virtual]
Returns:  The AutoSegment uniform  source position. (X for an horizontal and Y for a Vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getSourceX().
DbU::Unit getTargetU () const[virtual]
Returns:  The AutoSegment uniform  target position. (X for an horizontal and Y for a Vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getTargetX().
DbU::Unit getDuSource () const[virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implements AutoSegment (p.pagenum).
References Horizontal::getDxSource().
DbU::Unit getDuTarget () const[virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implements AutoSegment (p.pagenum).
References Horizontal::getDxTarget().
Interval getSpanU () const[virtual]
Returns:  The AutoSegment uniform  occupying interval (on X for horizontal and on Y for vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getSourceX(), and Segment::getTargetX().
bool getConstraints (DbU::Unit &  min, DbU::Unit &  max) const[virtual]
Returns:  in min  & max  the allowed range for the segment axis. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getCBYMax(), AutoContact::getCBYMin(), AutoSegment::getUserConstraints(), and DbU::getValueString().
Interval getSourceConstraints (unsigned int  flags = 0) const[virtual]

Returns:
The Interval into witch the source AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), Box::getYMax(), Box::getYMin(), and Katabatic::KbNativeConstraints.
Interval getTargetConstraints (unsigned int  flags = 0) const[virtual]

Returns:
The Interval into witch the target AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoTarget(), Box::getYMax(), Box::getYMin(), and Katabatic::KbNativeConstraints.
unsigned int getDirection () const[virtual]
Returns:  Katabatic::KbHorizontal or Katabatic::KbVertical according to the decorated segment. 
Implements AutoSegment (p.pagenum).
References Katabatic::KbHorizontal.
size_t getGCells (vector< GCell *> &  gcells) const[virtual]

Parameters:
gcells 	A vector that will be filled by all the GCells that the segment overlap. In increasing order, from source to target. 	
Returns:
The vector's size. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), and GCell::getRight().
void setDuSource (DbU::Unit  du)[virtual]
Set the uniform  dU  from source anchor (dX for Horizontal, dY for Vertical). 
Implements AutoSegment (p.pagenum).
void setDuTarget (DbU::Unit  du)[virtual]
Set the uniform  dU  from target anchor (dX for Horizontal, dY for Vertical). 
Implements AutoSegment (p.pagenum).
void updateOrient ()[virtual]
Ensure that source is lower than target. Swap them if needed. Swap never occurs on global segment because their source and target anchors are from different GCell, which are already ordered. 
Implements AutoSegment (p.pagenum).
References Segment::getSourceX(), Segment::getTargetX(), Segment::invert(), Katabatic::SegSourceBottom, Katabatic::SegSourceTop, Katabatic::SegStrongTerminal, Katabatic::SegTargetBottom, Katabatic::SegTargetTop, AutoSegment::setFlags(), and AutoSegment::unsetFlags().
void updatePositions ()[virtual]
Update the segment begenning and ending positions. The positions takes into account the extension caps and reflect the real space used by the segment under it's long axis. 
Implements AutoSegment (p.pagenum).
References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceX(), and Segment::getTargetX().
bool checkPositions () const[virtual]
Returns:  true  if the relative positions of source & target are coherent. (source <= target). 
Implements AutoSegment (p.pagenum).
References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceX(), Segment::getTargetX(), and DbU::getValueString().
bool checkConstraints () const[virtual]
Returns:  true  if the constraint intervel is coherent (non-empty or punctual in the worst case). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), and Interval::intersect().
unsigned int _makeDogleg (GCell *  doglegGCell, unsigned int  flags)[virtual]
This method is the workhorse for the various dogleg and topology restauration methods.  It is the atomic method that actually make the dogleg on this  segment.
Returns:  Katabatic::KbUseAboveLayer if the dogleg is using the above  layer (Katabatic::KbUseBelowLayer for the below layer).
Break the current segment in two (a.k.a. making a dogleg).
The segment is broken inside doglegGCell .
Two new segments are createds, one perpandicular and one parallel.
The original segment is always kept attached to the source . (the new parallel fragment is attached to the target ).
The perpandicular segment is in the layer above  by default. If we are already on the topmost routing layer, the below  layer is used.
If the segment pass through the breaking GCell, it's axis is set into the center. If the segment is local, the axis is the middle of the segment.
The Local/Global kind of the original segment is updated. The local/global status is computed by the constructor of the AutoSegment for the perpandicular and the new parallel.
The terminal state is updated. If the segment is a strong terminal the part that is no longer directly connected to the terminal is demoted to Katabatic::SegWeakTerminal1.
The perpandicular is obviously a canonical. If the broken segment is canonical, the original is  left canonical and only the new parallel is re-canonized. Otherwise, we re-canonise both sets of aligned segments (the one on the source and the one on the target).
The three segments are added to the session dogleg stack.
After this method call the net topology is guarantee to be valid.
  
Implements AutoSegment (p.pagenum).
References AutoSegment::canonize(), DebugSession::close(), AutoContactTurn::create(), AutoSegment::create(), Session::dogleg(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), Session::getConfiguration(), RoutingGauge::getContactLayer(), AutoContact::getGCell(), Component::getLayer(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), Component::getNet(), AutoSegment::getNet(), GCell::getRight(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoSegment::getSourceX(), AutoSegment::getTargetX(), GCell::getX(), GCell::getXMax(), AutoSegment::getY(), AutoContact::invalidate(), AutoSegment::invalidate(), AutoSegment::isCanonical(), AutoSegment::isLocal(), AutoSegment::isSlackened(), AutoSegment::isWeakTerminal(), Katabatic::KbHorizontal, Katabatic::KbUseAboveLayer, Katabatic::KbUseBelowLayer, Katabatic::KbVertical, AutoContact::migrateConstraintBox(), DebugSession::open(), GCell::removeHSegment(), Katabatic::SegCanonical, Katabatic::SegDogleg, Katabatic::SegGlobal, Katabatic::SegNotAligned, Katabatic::SegSlackened, Katabatic::SegWeakTerminal1, AutoSegment::setFlags(), AutoSegment::setLayer(), and AutoSegment::unsetFlags().
bool moveULeft ()[virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell below (a.k.a. lower or inferior). Rules for displacement:
The segment must be connected at both end to a turn contact (we do not want to manage more complex cases for the time beeing).
And, of course, the segment must not already by on the bottomost GCell...
The displacement take care of:
Managing the status of the various perpandiculars. The stretched one are made global if needed. The shrinked one made local, if needed.
The supporting AutoContact (source & target) are changed of GCell.
If the segment is global, the go-through GCells are updateds.
Returns:  true  if the move has succeeded.
 
Implements AutoSegment (p.pagenum).
References GCell::addVSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), GCell::getDown(), AutoContact::getGCell(), AutoSegment::getGCell(), GCell::getRight(), AutoContact::getSegment(), GCell::getSide(), Interval::getVMax(), AutoSegment::isLocal(), Katabatic::KbVertical, GCell::removeVSegment(), Katabatic::SegGlobal, AutoSegment::setAxis(), AutoSegment::setFlags(), AutoContact::setGCell(), and AutoSegment::unsetFlags().
bool moveURight ()[virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell above (a.k.a. upper or superior). Rules for displacement:
See also:
AutoSegment::moveULeft() for a complete description. 
Implements AutoSegment (p.pagenum).
References GCell::addVSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), GCell::getRight(), AutoContact::getSegment(), GCell::getSide(), GCell::getUp(), Interval::getVMin(), AutoSegment::isLocal(), Katabatic::KbVertical, GCell::removeVSegment(), Katabatic::SegGlobal, AutoSegment::setAxis(), AutoSegment::setFlags(), AutoContact::setGCell(), and AutoSegment::unsetFlags().
void _postCreate ()[protected], [virtual]
In addition to AutoSegment::_postCreate(), detect whether the segment is global or local and register it in the relevant GCells (if needed).
If the segment is anchored directly on a terminal, adjust the axis so it's connected. 
Reimplemented from AutoSegment (p.pagenum).
References AutoSegment::_postCreate(), GCell::addHSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getRight(), GCell::getX(), Component::getY(), Katabatic::SegGlobal, AutoSegment::setFlags(), and AutoContact::setY().
void _preDestroy ()[protected], [virtual]
Perform operations that must be done before the actual destructor is called. Merely whidrawn the AutoSegment from the lookup/Session mechanism. 
Reimplemented from AutoSegment (p.pagenum).
References AutoSegment::_preDestroy(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getId(), GCell::getRight(), GCell::getX(), and GCell::removeHSegment().

The documentation for this class was generated from the following files:
AutoHorizontal.h
AutoHorizontal.cpp
AutoHorizontal.dox

AutoSegment Class Reference

Abstract base class for AutoSegment. 
Inheritance diagram for AutoSegment:
IMAGE

Public Member Functions
virtual Segment * base () const =0
virtual Segment * base ()=0
virtual Horizontal * getHorizontal ()
virtual Vertical * getVertical ()
Cell * getCell () const
Net * getNet () const
const Layer * getLayer () const
Box getBoundingBox () const
Hook * getSourceHook ()
Hook * getTargetHook ()
Contact * getSource () const
Contact * getTarget () const
Component * getOppositeAnchor (Component *) const
Components getAnchors () const
virtual DbU::Unit getX () const
virtual DbU::Unit getY () const
DbU::Unit getWidth () const
DbU::Unit getLength () const
DbU::Unit getSourcePosition () const
DbU::Unit getTargetPosition () const
DbU::Unit getSourceX () const
DbU::Unit getSourceY () const
DbU::Unit getTargetX () const
DbU::Unit getTargetY () const
void invert ()
void setLayer (const Layer *)
bool isHorizontal () const
bool isVertical () const
bool isGlobal () const
bool isLocal () const
bool isFixed () const
bool isBipoint () const
bool isWeakTerminal () const
bool isStrongTerminal (unsigned int flags=0) const
bool isLayerChange () const
bool isSpinTop () const
bool isSpinBottom () const
bool isSpinTopOrBottom () const
bool isReduced () const
bool isStrap () const
bool isDogleg () const
bool isInvalidated () const
bool isInvalidatedLayer () const
bool isCreated () const
bool isCanonical () const
bool isUnsetAxis () const
bool isSlackened () const
virtual bool _canSlacken () const =0
bool canReduce () const
bool mustRaise () const
unsigned int canDogleg (Interval)
virtual bool canMoveULeft (float reserve=0.0) const =0
virtual bool canMoveURight (float reserve=0.0) const =0
bool canMoveUp (float reserve=0.0, unsigned int flags=0) const
bool canPivotUp (float reserve=0.0, unsigned int flags=0) const
bool canPivotDown (float reserve=0.0, unsigned int flags=0) const
bool canSlacken (unsigned int flags=0) const
virtual bool checkPositions () const =0
virtual bool checkConstraints () const =0
unsigned long getId () const
virtual unsigned int getDirection () const =0
GCell * getGCell () const
virtual size_t getGCells (vector< GCell *> &) const =0
AutoContact * getAutoSource () const
AutoContact * getAutoTarget () const
AutoContact * getOppositeAnchor (AutoContact *) const
size_t getPerpandicularsBound (set< AutoSegment *> &)
AutoSegment * getParent () const
DbU::Unit getAxis () const
virtual DbU::Unit getSourceU () const =0
virtual DbU::Unit getTargetU () const =0
virtual DbU::Unit getDuSource () const =0
virtual DbU::Unit getDuTarget () const =0
DbU::Unit getOrigin () const
DbU::Unit getExtremity () const
virtual Interval getSpanU () const =0
Interval getMinSpanU () const
virtual Interval getSourceConstraints (unsigned int flags=0) const =0
virtual Interval getTargetConstraints (unsigned int flags=0) const =0
virtual bool getConstraints (DbU::Unit &min, DbU::Unit &max) const =0
bool getConstraints (Interval &i) const
const Interval & getUserConstraints () const
virtual DbU::Unit getSlack () const
DbU::Unit getOptimalMin () const
DbU::Unit getOptimalMax () const
Interval & getOptimal (Interval &i) const
virtual DbU::Unit getCost (DbU::Unit axis) const
virtual AutoSegment * getCanonical (DbU::Unit &min, DbU::Unit &max)
AutoSegment * getCanonical (Interval &i)
void unsetFlags (unsigned int)
void setFlags (unsigned int)
virtual void setDuSource (DbU::Unit du)=0
virtual void setDuTarget (DbU::Unit du)=0
void computeTerminal ()
virtual void updateOrient ()=0
virtual void updatePositions ()=0
void mergeUserConstraints (const Interval &)
void resetUserConstraints ()
void setOptimalMin (DbU::Unit min)
void setOptimalMax (DbU::Unit max)
void revalidate ()
AutoSegment * makeDogleg (AutoContact *)
unsigned int makeDogleg (Interval, unsigned int flags=KbNoFlags)
unsigned int makeDogleg (GCell *, unsigned int flags=KbNoFlags)
virtual unsigned int _makeDogleg (GCell *, unsigned int flags)=0
virtual bool moveULeft ()=0
virtual bool moveURight ()=0
bool slacken (unsigned int flags)
bool reduceDoglegLayer ()
bool reduce ()
bool raise ()
AutoSegment * canonize (unsigned int flags=KbNoFlags)
virtual void invalidate (unsigned int flags=KbPropagate)
void computeOptimal (set< AutoSegment *> &processeds)
void setAxis (DbU::Unit, unsigned int flags=KbNoFlags)
bool toConstraintAxis (unsigned int flags=KbRealignate)
bool toOptimalAxis (unsigned int flags=KbRealignate)
AutoSegments getOnSourceContact (unsigned int direction)
AutoSegments getOnTargetContact (unsigned int direction)
AutoSegments getAligneds (unsigned int flags=KbNoFlags)
AutoSegments getPerpandiculars ()
Static Public Member Functions
static AutoSegment * create (AutoContact *source, AutoContact *target, Segment *hurricaneSegment)
static AutoSegment * create (AutoContact *source, AutoContact *target, unsigned int dir, size_t depth=RoutingGauge::nlayerdepth)
Protected Member Functions
AutoSegment (Segment *segment)
virtual ~AutoSegment ()
virtual void _postCreate ()
virtual void _preDestroy ()
void _invalidate ()
unsigned int _getFlags () const
Static Protected Member Functions
static void _preCreate (AutoContact *source, AutoContact *target)

Detailed Description
Abstract base class for AutoSegment. 

Creating AutoHorizontal & AutoVertical
AutoSegment is the abstract base class for AutoHorizontal and AutoVertical. They are must be created only through the factory method: AutoSegment::create().
Characteristics of AutoSegments

Unique ID: to ease the enforcing of a deterministic behavior and to gain some independance from the pointers, each AutoSegment is associated with an unique identifier. IDs  are now directly taken from the Hurricane::Segment. 
Source contact is always lesser than Target contact (Xs,Ys) < (Xt,Yt) . 
When assembled through AutoContactVTee or AutoContactHTee, AutoSegments became (i.e. must be kept) aligneds. Among a set of aligned AutoSegments, we distinguish a representative trough which we can manipulate the whole set. This representative is called the canonical  AutoSegment and is the one with the lowest id ). 
When an aligned set contains at least one global, all the segments of the set are tagged Katabatic::SegWeakGlobal. This is especially useful on local ones to know if they are part of a much longer wire.
Conversely, a set of aligned may contains only local segments and thus will not have the flag set. 
To allow some optimization, the Katabatic::SegNotAligned tells if a segment is part of an aligned set. It is deduced from the type of both source and target contact: not on the parallel branch of a tee. 
The Ever Fragmenting Data Structure 
All the transformations applied to the database, after it's initial building, can be reduced to making new doglegs (and layer changes). Another way to put it, is that no Tee is ever created after the initial stage. The consequence is that the segments are only fragmenting more and more (up to a certain limit). The aligneds sets are progessively broken apart as needed, and until there remains only one tee per set (the two segments on the aligned branch).
Operations on AutoSegments

Slackening.  Constraints transmited through either source or target AutoContact are too tight (tighter than the GCell), by adding straps in the perpandicular direction, the full slack of the segment is restored. 
Layer Change.  One or two layers above or below the current layer. One up/down may means into the perpandicular routing direction. 
Dogleg Creation.  Mean breaking the segment in two. This operation is used to slacken the constraints on a segment or restore connexity on source/target contact after a layer change. The new segment is always created on the source. 
Reduction/Raising.  When a segment is a short dogleg, no greater than one picth, it can use the layer of the perpandiculars. 

Invalidate on AutoSegments
The simple invalidation of an AutoSegment do not  invalidate it's source & target contact.
An axis position change or a layer change both invalidate the AutoSegment and  it's source & target contacts.
For the complete invalidation/revalidation mechanism see Session Algorithm.
Main Attributes of AutoSegments
AutoSegment retains all attributes from Segment. The Segment itself beeing accessible through the base() methods. 
An unique Id  (for determinism). 
The GCell from wich it starts from. It is the GCell of the source AutoContact. 
A state, combination of flags from Katabatic::AutoSegmentFlag. 
An interval for the optimal range of the AutoSegment axis. 
An interval for user's defined constraint on the axis. 
The interval giving the complete length of the AutoSegment, that is, with all extentions cap taken into account. This interval is refered as the span . 
A small counter, of the number of reduced neighbors (never exceed two). 

Implementation Details
AutoSegment / AutoHorizontal & AutoVertical are kind of decorators of Hurricane::Segment (they do not scrictly respect the pattern).
Canonical AutoSegment can should be considered as a kind of Composite.
Thoses objects are created using a Factory method.
Methods Classification

Wrapper methods  on the underlying Hurricane::Segment. 

Atomic methods  on AutoSegment, that is, which applies exactly on the current AutoSegment. 

Canonical methods  that applies on the set of aligned AutoSegments. There are two kind of those, the methods part of the API, and the ones that make the link with the atomic methods. Those intermediate methods hide some cumbersome AutoSegment list parameters. 
AutoSegment::invalidate() 
AutoSegment::computeOptimal() 
AutoSegment::setAxis() 
AutoSegment::toConstraintAxis() 
AutoSegment::toOptimalAxis() 

Uniform access , to simplify the managment of AutoHorizontal and AutoVertical through AutoSegment, a set of uniformized methods is introduced. For instance, to avoid to check the dynamic type to choose to call getSourceX() or getSourceY(), we may call getSourceU(). Uniform methods are named by replacing X/Y  with U . 
AutoSegment::getSourceU() 
AutoSegment::getTargetU() 
AutoSegment::getDuSource() 
AutoSegment::getDuTarget() 
AutoSegment::getSpanU() 
AutoSegment::setDuSource() 
AutoSegment::setDuTarget() 

Constructor & Destructor Documentation
AutoSegment (Segment *  segment)[protected]
AutoSegment constructor. It is not directly accessible, instead use one flavor of the AutoSegment::create(). 
References GCell::getBoundingBox(), AutoContact::getGCell(), Segment::getSource(), Segment::getTarget(), Box::getXMax(), Box::getYMax(), AutoContact::invalidate(), AutoSegment::isGlobal(), AutoSegment::isHorizontal(), Session::lookup(), Katabatic::SegCreated, Katabatic::SegHorizontal, AutoSegment::setFlags(), and AutoSegment::setOptimalMax().
~AutoSegment ()[protected], [virtual]
AutoSegment destructor. It is not directly accessible, instead use one flavor of the AutoSegment::create(). 
References AutoSegment::isGlobal().

Member Function Documentation
AutoSegment * create (AutoContact *  source, AutoContact *  target, Segment *  hurricaneSegment)[static]

Parameters:
source 	The source AutoContact. 	
target 	The target AutoContact. 	
hurricaneSegment 	The Hurricane::Segment to decorate. 	
Returns:
The AutoHorizontal/AutoVertical decorator segment.
Factory method to create AutoHorizontal or AutoVertical. It is important to note that this function may modify the underlying Hurricane::Segment.
Layer is set to the default (bottom) routing Layers.
Source & target anchor of hurricaneSegment  are set on source  and target . If the hurricaneSegment  is already anchored and source  or target  are not the one decorating the anchors, an exception is thrown. 
References AutoSegment::_postCreate(), Hook::attach(), Hook::detach(), AutoContact::getBodyHook(), Session::getKatabatic(), Component::getLayer(), Session::getRoutingLayer(), Segment::getSource(), Segment::getSourceHook(), Segment::getTarget(), Segment::getTargetHook(), DbU::getValueString(), Segment::getWidth(), AutoContact::getX(), AutoContact::getY(), AutoContact::isFixed(), KatabaticEngine::isGMetal(), Session::lookup(), Segment::setLayer(), Segment::setWidth(), Vertical::setX(), and Horizontal::setY().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_1G_xM1(), GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_1Pad(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), GCellTopology::_do_xG_xM3(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoSegment::create(), GCellTopology::doRp_Access(), GCellTopology::doRp_AutoContacts(), GCellTopology::doRp_StairCaseH(), GCellTopology::doRp_StairCaseV(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
AutoSegment * create (AutoContact *  source, AutoContact *  target, unsigned int  dir, size_t  depth = RoutingGauge::nlayerdepth)[static]

Parameters:
source 	The source AutoContact. 	
target 	The target AutoContact. 	
dir 	Specify the segment direction. 	
depth 	The layer, given by it's depth in the RoutingGauge. 	
Returns:
The AutoHorizontal/AutoVertical.
Factory method to create AutoHorizontal or AutoVertical. flags  indicate the direction (KbHorizontal or KbVertical). The underlying Hurricane segment is also created. 
References AutoContact::base(), Horizontal::create(), Vertical::create(), AutoSegment::create(), Session::getRoutingLayer(), AutoContact::getX(), AutoContact::getY(), AutoContact::isFixed(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Segment * base () const[pure virtual]
Returns:  the decorated Hurricane::Segment (const flavor). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::getAxis(), AutoSegment::getBoundingBox(), AutoSegment::getCanonical(), AutoSegment::getCell(), AutoSegment::getLayer(), AutoSegment::getLength(), AutoSegment::getNet(), AutoSegment::getOppositeAnchor(), AutoSegment::getSource(), AutoSegment::getSourceHook(), AutoSegment::getSourceX(), AutoSegment::getSourceY(), AutoSegment::getTarget(), AutoSegment::getTargetHook(), AutoSegment::getTargetX(), AutoSegment::getTargetY(), AutoSegment::getWidth(), AutoSegment::getX(), AutoSegment::getY(), AutoSegment::invert(), and AutoSegment::setLayer().
Segment * base ()[pure virtual]
Returns:  the decorated Hurricane::Segment. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Horizontal * getHorizontal ()[inline], [virtual]
Returns:  If the decorated segment is a Hurricane::Horizontal, return it. NULL  otherwise. 
Reimplemented in AutoHorizontal (p.pagenum).
Vertical * getVertical ()[inline], [virtual]
Returns:  If the decorated segment is a Hurricane::Vertical, return it. NULL  otherwise. 
Reimplemented in AutoVertical (p.pagenum).
Cell * getCell () const[inline]

See also:
Segment::getCell(). 
References AutoSegment::base(), and Entity::getCell().
Net * getNet () const[inline]

See also:
Segment::getNet(). 
References AutoSegment::base(), and Component::getNet().
Referenced by AutoHorizontal::_makeDogleg(), and AutoSegment::_postCreate().
const Layer * getLayer () const[inline]

See also:
Segment::getLayer(). 
References AutoSegment::base(), and Component::getLayer().
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoContact::canMoveUp(), AutoSegment::canMoveUp(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), AutoHorizontal::checkPositions(), AutoVertical::checkPositions(), AutoSegment::makeDogleg(), AutoSegment::revalidate(), AutoHorizontal::updatePositions(), AutoVertical::updatePositions(), AutoContactTurn::updateTopology(), and AutoContactTerminal::updateTopology().
BoundingBox * getBoundingBox () const[inline]

See also:
Segment::getBoundingBox(). 
References AutoSegment::base(), and Component::getBoundingBox().
Hook * getSourceHook ()[inline]

See also:
Segment::getSourceHook(). 
References AutoSegment::base(), and Segment::getSourceHook().
Hook * getTargetHook ()[inline]

See also:
Segment::getTargetHook(). 
References AutoSegment::base(), and Segment::getTargetHook().
Contact * getSource () const[inline]

See also:
Segment::getSource(). 
References AutoSegment::base(), and Segment::getSource().
Referenced by AutoSegment::getAutoSource(), and AutoSegment::getOnSourceContact().
Contact * getTarget () const[inline]

See also:
Segment::getTarget(). 
References AutoSegment::base(), and Segment::getTarget().
Referenced by AutoSegment::getAutoTarget(), and AutoSegment::getOnTargetContact().
Component * getOppositeAnchor (Component *  anchor) const[inline]

See also:
Segment::getNet(). 
References AutoSegment::base(), and Segment::getOppositeAnchor().
Referenced by AutoSegment::getOppositeAnchor().
Components getAnchors () const[inline]

See also:
Segment::getAnchors(). 
DbU::Unit getX () const[virtual]

See also:
Segment::getX(). 
References AutoSegment::base(), and Component::getX().
Referenced by AutoVertical::_makeDogleg(), and AutoContactTerminal::updateGeometry().
DbU::Unit getY () const[virtual]

See also:
Segment::getY(). 
References AutoSegment::base(), and Component::getY().
Referenced by AutoHorizontal::_makeDogleg(), and AutoContactTerminal::updateGeometry().
DbU::Unit getWidth () const[inline]

See also:
Segment::getWidth(). 
References AutoSegment::base(), and Segment::getWidth().
DbU::Unit getLength () const[inline]

See also:
Segment::getLength(). 
References AutoSegment::base(), and Segment::getLength().
Referenced by AutoSegment::canReduce(), and AutoSegment::mustRaise().
DbU::Unit getSourcePosition () const[inline]

See also:
Segment::getSourcePosition(). 
Referenced by AutoSegment::getCanonical().
DbU::Unit getTargetPosition () const[inline]

See also:
Segment::getTargetPosition(). 
Referenced by AutoSegment::getCanonical().
DbU::Unit getSourceX () const[inline]

See also:
Segment::getSourceX(). 
References AutoSegment::base(), and Segment::getSourceX().
Referenced by AutoHorizontal::_makeDogleg().
DbU::Unit getSourceY () const[inline]

See also:
Segment::getSourceY(). 
References AutoSegment::base(), and Segment::getSourceY().
Referenced by AutoVertical::_makeDogleg().
DbU::Unit getTargetX () const[inline]

See also:
Segment::getTargetX(). 
References AutoSegment::base(), and Segment::getTargetX().
Referenced by AutoHorizontal::_makeDogleg().
DbU::Unit getTargetY () const[inline]

See also:
Segment::getTargetY(). 
References AutoSegment::base(), and Segment::getTargetY().
Referenced by AutoVertical::_makeDogleg().
DbU::Unit invert ()[inline]

See also:
Segment::invert(). 
References AutoSegment::base(), and Segment::invert().
void setLayer (const Layer *  layer)[inline]

See also:
Segment::setLayer(). 
References AutoSegment::base(), and Segment::setLayer().
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::reduceDoglegLayer().
bool isHorizontal () const[inline]
Returns:  true  if the Hurricane::Segment is Horizontal. 
References Katabatic::SegHorizontal.
Referenced by AutoSegment::AutoSegment(), AutoSegment::computeOptimal(), AutoSegment::getAxis(), AutoSegment::getExtremity(), AutoSegment::getOrigin(), AutoContactTerminal::getSegment(), AutoSegment::makeDogleg(), AutoSegment::setAxis(), AutoSegment::toConstraintAxis(), and AutoContactTerminal::updateGeometry().
bool isVertical () const[inline]
Returns:  true  if the Hurricane::Segment is Vertical. 
References Katabatic::SegHorizontal.
Referenced by AutoSegment::computeOptimal(), and AutoContactTerminal::getSegment().
bool isGlobal () const[inline]
Returns:  true  if the segment is global (span over more than one GCell). 
References Katabatic::SegGlobal.
Referenced by AutoSegment::AutoSegment(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoSegment::canonize(), AutoSegment::canReduce(), AutoSegment::canSlacken(), AutoContact::showTopologyError(), and AutoSegment::~AutoSegment().
bool isLocal () const[inline]
Returns:  true  if the segment is local (fully enclosed in one GCell). 
References Katabatic::SegGlobal.
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoSegment::canMoveUp(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), GCell::checkEdgeSaturation(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().
bool isFixed () const[inline]
Returns:  true  if segment must not be moved by the router. 
References Katabatic::SegFixed.
Referenced by AutoSegment::canMoveUp(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), and AutoSegment::makeDogleg().
bool isBipoint () const[inline]
Returns:  true  if the segment straigh join two terminals. 
References Katabatic::SegBipoint.
bool isWeakTerminal () const[inline]
Returns:  true  if segment is indirectly connected to a terminal. 
References Katabatic::SegWeakTerminal.
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().
bool isStrongTerminal (unsigned int  flags = 0) const
Returns:  true  if segment is directly connected to a terminal. 
References AutoSegment::getAligneds(), Katabatic::KbPropagate, and Katabatic::SegStrongTerminal.
Referenced by AutoSegment::canMoveUp(), AutoSegment::canPivotDown(), and AutoSegment::canPivotUp().
bool isLayerChange () const[inline]
Returns:  true  if segment is a strap used only to connect between two different metal layers on the way up or down. 
References Katabatic::SegLayerChange.
Referenced by AutoSegment::canMoveUp(), AutoSegment::canPivotDown(), and AutoSegment::canPivotUp().
bool isSpinTop () const[inline]
Returns:  true  if segment is connected to turns and both perpandiculars segments are in the top  layer (candidate for reduction). 
Referenced by AutoSegment::canReduce(), AutoSegment::isSpinTopOrBottom(), AutoSegment::mustRaise(), and AutoSegment::reduceDoglegLayer().
bool isSpinBottom () const[inline]
Returns:  true  if segment is connected to turns and both perpandiculars segments are in the bottom  layer (candidate for reduction). 
Referenced by AutoSegment::canReduce(), AutoSegment::isSpinTopOrBottom(), AutoSegment::mustRaise(), and AutoSegment::reduceDoglegLayer().
bool isSpinTopOrBottom () const[inline]
Returns:  true  if segment is either spin top  or spin bottom  (candidate for reduction). 
References AutoSegment::isSpinBottom(), and AutoSegment::isSpinTop().
Referenced by AutoSegment::canReduce().
bool isReduced () const[inline]
Returns:  true  if segment is actually in a reduced state: it's effective layer will be the one of it's perpandiculars. 
References Katabatic::SegIsReduced.
Referenced by AutoSegment::reduceDoglegLayer(), and AutoSegment::revalidate().
bool isStrap () const[inline]
Returns:  true  if segment has been created from a slackening operation to restore the slack of another segment. 
References Katabatic::SegStrap.
bool isDogleg () const[inline]
Returns:  true  if segment has been created as the perpandicular part of a dogleg. 
References Katabatic::SegDogleg.
Referenced by AutoSegment::toConstraintAxis().
bool isInvalidated () const[inline]
Returns:  true  if segment has been moved or topologicaly altered. 
References Katabatic::SegInvalidated.
Referenced by AutoSegment::_invalidate(), AutoSegment::invalidate(), and AutoSegment::revalidate().
bool isInvalidatedLayer () const[inline]
Returns:  true  if segment has been changed of layer. Source and Target AutoContact may need to be altered. 
References Katabatic::SegInvalidatedLayer.
Referenced by AutoContactTurn::updateTopology().
bool isCreated () const[inline]
Returns:  true  if segment has just been created and is not revalidated for the first time 
References Katabatic::SegCreated.
Referenced by AutoContactTerminal::updateGeometry().
bool isCanonical () const[inline]
Returns:  true  if segment is the representant of an aligned set. 
References Katabatic::SegCanonical.
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoSegment::canonize(), AutoSegment::getCanonical(), AutoSegment::setAxis(), AutoSegment::toConstraintAxis(), and AutoSegment::toOptimalAxis().
bool isUnsetAxis () const[inline]
Returns:  true  if the segment axis has never been set. 
References Katabatic::SegAxisSet.
bool isSlackened () const[inline]
Returns:  true  if the segment has already been slackened. 
References Katabatic::SegSlackened.
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().
bool _canSlacken () const[pure virtual]
Returns:  true  if the segment can be slackened. That is, source or target constraints are less than three pitches. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::canSlacken().
bool canReduce () const
Returns:  true  if the segment can be reduced. That is:
Source & target are AutoContactTurn.
It is either spin top  or spin bottom , that is connecting perpandiculars both in the same layer.
Has a length less or equal one pitch in the perpandicular direction.
Neither of the perpandicular are also reduceds. 
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getLength(), AutoSegment::isGlobal(), AutoSegment::isSpinBottom(), AutoSegment::isSpinTop(), AutoSegment::isSpinTopOrBottom(), and AutoContact::isTurn().
Referenced by AutoSegment::reduce().
bool mustRaise () const
Returns:  true  if the segment must be  reduced. That is:
It is in reduced state...
It is no longer spin top  or spin bottom .
It's length exceed one pitch in the perpandicular direction. 
References AutoSegment::getLength(), AutoSegment::isSpinBottom(), AutoSegment::isSpinTop(), and Katabatic::SegIsReduced.
unsigned int canDogleg (Interval  interval)
Returns:  non-zero if the aligned set of segment can be broken outside  interval . The returned value could be zero (failure) or Katabatic::KbDoglegOnLeft or Katabatic::KbDoglegOnRight menaing that the aligned set could be broken on the left of the interval  (resp. right of it). 
References Interval::contains(), AutoSegment::getAligneds(), AutoSegment::getSpanU(), Interval::getVMax(), Interval::getVMin(), Katabatic::KbDoglegOnLeft, and Katabatic::KbDoglegOnRight.
bool canMoveULeft (float  reserve = 0.0) const[pure virtual]

Returns:
true  if the global  segment can be moved on the left GCell (for a vertical) or down (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the target . That is, it's a global which extends toward left.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
bool canMoveURight (float  reserve = 0.0) const[pure virtual]

Returns:
true  if the global  segment can be moved on the right GCell (for a vertical) or up (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the source . That is, it's a global which extends toward right.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
bool canMoveUp (float  reserve = 0.0, unsigned int  flags = 0) const

Parameters:
reserve 	Number of track that must remains free after  the move. 	
flags 	Modificate the method behavior, see below. 	
Returns:
true  if the segment can be moved up, that is to the next layer above in the same preferred routing direction. This method will check that in every GCell of the segment, at least reserve  tracks are still avalaible after  the segment has been moved up (reserve  can be less than 1.0 ).
Possible (bitwise) value for flags  :
KbAllowTerminal  : allow strong terminal to be moved up.
KbAllowLocal  : allow local segments to be moved up.
KbPropagate  : perform the check on the whole aligned set.
KbWithPerpands  : also check the density on the perpandiculars begin & end GCell, there must be at least a 0.5  density reserve on them. 
References AutoSegment::getAligneds(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), Session::getConfiguration(), GCell::getFragmentation(), AutoSegment::getGCells(), GCell::getIndex(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), AutoSegment::isFixed(), AutoSegment::isLayerChange(), AutoSegment::isLocal(), AutoSegment::isStrongTerminal(), Katabatic::KbPropagate, and Katabatic::KbWithPerpands.
bool canPivotUp (float  reserve = 0.0, unsigned int  flags = 0) const

Parameters:
reserve 	Number of track that must remains free after  the move. 	
flags 	Modificate the method behavior, see below.	
Checks of the segment can be pivoted  up. The difference between canMoveUp()  and canPivotUp()  lies in the fact that no perpandicular segment needs to be altered if the current segment is moved up. For example an M3  segment connected to only M4  can be pivoted up (in M5 ), but if connected to M2 , it cannot.
Possible (bitwise) value for flags  :
KbPropagate  : perform the check on the whole aligned set.
KbIgnoreContacts  : do not check the source & target layers to know if the segment can be pivoted up. 
References AutoSegment::getAligneds(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getGCells(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getMinDepth(), Session::getRoutingGauge(), AutoSegment::isFixed(), AutoSegment::isLayerChange(), AutoSegment::isLocal(), AutoSegment::isStrongTerminal(), and Katabatic::KbPropagate.
bool canPivotDown (float  reserve = 0.0, unsigned int  flags = 0) const

Parameters:
reserve 	Number of track that must remains free after  the move. 	
flags 	Modificate the method behavior, see below.	
Checks of the segment can be pivoted  down. The difference between canMoveDown()  and canPivotDown()  lies in the fact that no perpandicular segment needs to be altered if the current segment is moved down.
Possible (bitwise) value for flags  :
KbPropagate  : perform the check on the whole aligned set. 
References AutoSegment::getAligneds(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getGCells(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), AutoContact::getMaxDepth(), Session::getRoutingGauge(), AutoSegment::isFixed(), AutoSegment::isLayerChange(), AutoSegment::isLocal(), AutoSegment::isStrongTerminal(), and Katabatic::KbPropagate.
bool canSlacken (unsigned int  flags = 0) const
Returns:  true  if the segment can be slackened. That is, source or target constraints are less than three pitches.
If flags  contains KbPropagate, look on the whole aligned set. 
References AutoSegment::_canSlacken(), AutoSegment::getAligneds(), AutoSegment::isGlobal(), and Katabatic::KbPropagate.
bool checkPositions () const[pure virtual]
Returns:  true  if the relative positions of source & target are coherent. (source <= target). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
bool checkConstraints () const[pure virtual]
Returns:  true  if the constraint intervel is coherent (non-empty or punctual in the worst case). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
unsigned long getId () const[inline]
Returns:  The AutoSegment unique identifier. 
Referenced by AutoHorizontal::_preDestroy(), and AutoVertical::_preDestroy().
unsigned int getDirection () const[pure virtual]
Returns:  Katabatic::KbHorizontal or Katabatic::KbVertical according to the decorated segment. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::getMinSpanU(), AutoSegment::getPerpandicularsBound(), and AutoSegment::makeDogleg().
GCell * getGCell () const[inline]
Returns:  The GCell into which the AutoSegment starts (the one of the source). 
Referenced by AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoHorizontal::getGCells(), AutoVertical::getGCells(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().
size_t getGCells (vector< GCell *> &  gcells) const[pure virtual]

Parameters:
gcells 	A vector that will be filled by all the GCells that the segment overlap. In increasing order, from source to target. 	
Returns:
The vector's size. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::canMoveUp(), AutoSegment::canPivotDown(), and AutoSegment::canPivotUp().
AutoContact * getAutoSource () const[inline]
Returns:  The source AutoContact. 
References AutoSegment::getSource(), and Session::lookup().
Referenced by AutoHorizontal::_canSlacken(), AutoVertical::_canSlacken(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), AutoHorizontal::_preDestroy(), AutoVertical::_preDestroy(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoSegment::canMoveUp(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), AutoSegment::canReduce(), AutoHorizontal::checkConstraints(), AutoVertical::checkConstraints(), AutoSegment::computeOptimal(), AutoSegment::computeTerminal(), AutoHorizontal::getConstraints(), AutoVertical::getConstraints(), AutoHorizontal::getGCells(), AutoVertical::getGCells(), AutoHorizontal::getSourceConstraints(), AutoVertical::getSourceConstraints(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), AutoSegment::raise(), AutoSegment::reduce(), AutoSegment::reduceDoglegLayer(), AutoSegment::revalidate(), and AutoSegment::toConstraintAxis().
AutoContact * getAutoTarget () const[inline]
Returns:  The target AutoContact. 
References AutoSegment::getTarget(), and Session::lookup().
Referenced by AutoHorizontal::_canSlacken(), AutoVertical::_canSlacken(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), AutoHorizontal::_preDestroy(), AutoVertical::_preDestroy(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoSegment::canMoveUp(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), AutoSegment::canReduce(), AutoHorizontal::checkConstraints(), AutoVertical::checkConstraints(), AutoSegment::computeOptimal(), AutoSegment::computeTerminal(), AutoHorizontal::getConstraints(), AutoVertical::getConstraints(), AutoHorizontal::getGCells(), AutoVertical::getGCells(), AutoHorizontal::getTargetConstraints(), AutoVertical::getTargetConstraints(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), AutoSegment::raise(), AutoSegment::reduce(), AutoSegment::reduceDoglegLayer(), and AutoSegment::revalidate().
AutoContact * getOppositeAnchor (AutoContact *  contact) const
Returns:  The source or target AutoContact opposite to contact . 
References AutoContact::base(), AutoSegment::getOppositeAnchor(), and Session::lookup().
size_t getPerpandicularsBound (set< AutoSegment *> &  bounds)

Parameters:
bounds 	A vector that will be filled by all the AutoSegments perpandicular to this one that induce a constraint. 	
Returns:
The vector's size. 
References AutoSegment::getDirection(), Component::getSlaveComponents(), Collection< Type >::getSubSet(), and Session::lookup().
AutoSegment * getParent () const[inline]
Returns:  If this segment has been created by a dogleg operation, the parent is the one from which we fragmented. 
DbU::Unit getAxis () const[inline]
Returns:  The AutoSegment axis position. 
References AutoSegment::base(), Component::getX(), Component::getY(), and AutoSegment::isHorizontal().
Referenced by AutoSegment::computeOptimal(), AutoSegment::setAxis(), AutoSegment::toConstraintAxis(), and AutoSegment::toOptimalAxis().
DbU::Unit getSourceU () const[pure virtual]
Returns:  The AutoSegment uniform  source position. (X for an horizontal and Y for a Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
DbU::Unit getTargetU () const[pure virtual]
Returns:  The AutoSegment uniform  target position. (X for an horizontal and Y for a Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
DbU::Unit getDuSource () const[pure virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
DbU::Unit getDuTarget () const[pure virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
DbU::Unit getOrigin () const[inline]
Returns:  The AutoSegment uniform  source (lowest) GCell coordinate. (dX for an horizontal and dY for a Vertical). 
References GCell::getX(), GCell::getY(), and AutoSegment::isHorizontal().
Referenced by AutoSegment::computeOptimal(), AutoSegment::getOptimalMax(), AutoSegment::getOptimalMin(), AutoSegment::setOptimalMax(), and AutoSegment::setOptimalMin().
DbU::Unit getExtremity () const[inline]
Returns:  The AutoSegment uniform  target (greatest) GCell coordinate. (dX for an horizontal and dY for a Vertical). 
References GCell::getXMax(), GCell::getYMax(), and AutoSegment::isHorizontal().
Referenced by AutoSegment::computeOptimal().
Interval getSpanU () const[pure virtual]
Returns:  The AutoSegment uniform  occupying interval (on X for horizontal and on Y for vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::canDogleg(), and AutoSegment::makeDogleg().
Interval getMinSpanU () const

Returns:
The AutoSegment uniform  minimum occupying interval, computed from the constraints of all the supporting aligned AutoContacts. (on X for horizontal and on Y for vertical). 
References AutoSegment::getDirection(), Interval::getVMax(), and Interval::getVMin().
Interval getSourceConstraints (unsigned int  flags = 0) const[pure virtual]

Returns:
The Interval into witch the source AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::makeDogleg().
Interval getTargetConstraints (unsigned int  flags = 0) const[pure virtual]

Returns:
The Interval into witch the target AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::makeDogleg().
bool getConstraints (DbU::Unit &  min, DbU::Unit &  max) const[pure virtual]
Returns:  in min  & max  the allowed range for the segment axis. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::computeOptimal(), AutoSegment::getConstraints(), AutoSegment::getSlack(), AutoSegment::toConstraintAxis(), and AutoSegment::toOptimalAxis().
bool getConstraints (Interval &  i) const[inline]
Returns:  in i  the allowed range for the segment axis. 
References AutoSegment::getConstraints(), Interval::getVMax(), and Interval::getVMin().
const Interval & getUserConstraints () const[inline]
Returns:  A reference to the additional constraints added to the axis of the segment. 
Referenced by AutoHorizontal::getConstraints(), and AutoVertical::getConstraints().
DbU::Unit getSlack () const[virtual]
Returns:  The length of the axis constraint interval. 
References AutoSegment::getConstraints().
DbU::Unit getOptimalMin () const[inline]
Returns:  The AutoSegment minimum axis optimal range. 
References AutoSegment::getOrigin(), and DbU::lambda().
Referenced by AutoSegment::getCost(), AutoSegment::getOptimal(), and AutoSegment::toOptimalAxis().
DbU::Unit getOptimalMax () const[inline]
Returns:  The AutoSegment maximum axis optimal range. 
References AutoSegment::getOrigin(), and DbU::lambda().
Referenced by AutoSegment::getCost(), AutoSegment::getOptimal(), and AutoSegment::toOptimalAxis().
Interval & getOptimal (Interval &  i) const
Inialize i  with the AutoSegment axis optimal range. 
References AutoSegment::getOptimalMax(), AutoSegment::getOptimalMin(), Interval::getVMax(), and Interval::getVMin().
DbU::Unit getCost (DbU::Unit  axis) const[virtual]

Returns:
The cost if this segment is placed at axis . The cost is null if axis  is inside the optimal interval and is the distance toward the nearest bound outside. 
References AutoSegment::getOptimalMax(), and AutoSegment::getOptimalMin().
AutoSegment * getCanonical (DbU::Unit &  min, DbU::Unit &  max)[virtual]

Returns:
The canonical segment associated to this one. Additionnaly compute the source & target position of the whole set of aligned segments. 
References AutoSegment::base(), AutoSegment::getAligneds(), AutoSegment::getSourcePosition(), AutoSegment::getTargetPosition(), and AutoSegment::isCanonical().
Referenced by AutoSegment::getCanonical().
AutoSegment * getCanonical (Interval &  i)[inline]

Returns:
The canonical segment associated to this one. Additionnaly compute the source & target position of the whole set of aligned segments. 
References AutoSegment::getCanonical(), Interval::getVMax(), and Interval::getVMin().
void unsetFlags (unsigned int  flags)[inline]
Unsets flags  given as arguments. 
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoSegment::canonize(), AutoSegment::computeTerminal(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), AutoSegment::revalidate(), AutoHorizontal::updateOrient(), and AutoVertical::updateOrient().
void setFlags (unsigned int  flags)[inline]
Sets flags  given as arguments. 
Referenced by AutoSegment::_invalidate(), AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), AutoSegment::AutoSegment(), AutoSegment::canonize(), AutoSegment::computeTerminal(), GCellTopology::doRp_AutoContacts(), AutoSegment::invalidate(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), AutoSegment::revalidate(), AutoHorizontal::updateOrient(), and AutoVertical::updateOrient().
void setDuSource (DbU::Unit  du)[pure virtual]
Set the uniform  dU  from source anchor (dX for Horizontal, dY for Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
void setDuTarget (DbU::Unit  du)[pure virtual]
Set the uniform  dU  from target anchor (dX for Horizontal, dY for Vertical). 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
void computeTerminal ()
Recompute the terminal status of an AutoSegment. Initially, a segment which source or target is a terminal is flagged as SegStrongTerminal. After a topological modification, if the segment is no longer directly attached to a terminal, the status is progessively weakened. Once it reaches the weakest level, it stays on it so the algorithm can work out which segments is a start to a path toward a terminal.
Status from stronger to weaker:
Katabatic::SegStrongTerminal.
Katabatic::SegWeakTerminal1
Katabatic::SegWeakTerminal2
Remark: The weakening is poorly done. After making a dogleg we do not
know which of the segment must be weakened if not directly attached on a terminal. We must examinate source & target. 
References AutoSegment::_getFlags(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), Katabatic::SegWeakTerminal, Katabatic::SegWeakTerminal1, Katabatic::SegWeakTerminal2, AutoSegment::setFlags(), and AutoSegment::unsetFlags().
void updateOrient ()[pure virtual]
Ensure that source is lower than target. Swap them if needed. Swap never occurs on global segment because their source and target anchors are from different GCell, which are already ordered. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::_postCreate(), and AutoSegment::revalidate().
void updatePositions ()[pure virtual]
Update the segment begenning and ending positions. The positions takes into account the extension caps and reflect the real space used by the segment under it's long axis. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::_postCreate(), and AutoSegment::revalidate().
void mergeUserConstraints (const Interval &  constraints)
Constraints applies on the valid axis interval. Merge in constraints  with the user's constraints. The resulting constraints is the intersection of the former user's contraints and the one given as argument. 
References Interval::intersection().
void resetUserConstraints ()[inline]
Constraints applies on the valid axis interval. Suppress all user's constraints. 
void setOptimalMin (DbU::Unit  min)[inline]
Sets the lower bound of the optimal axis interval. 
References DbU::getLambda(), and AutoSegment::getOrigin().
Referenced by AutoSegment::computeOptimal().
void setOptimalMax (DbU::Unit  max)[inline]
Sets the lower bound of the optimal axis interval. 
References DbU::getLambda(), and AutoSegment::getOrigin().
Referenced by AutoSegment::AutoSegment(), and AutoSegment::computeOptimal().
Interval revalidate ()
Mark this segment as valid (unset the Invalidated flag) and update positions. Unlike AutoSegment::invalidate(), it's an atomic method. 
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getLayer(), AutoSegment::getLayer(), AutoContact::getPerpandicular(), Layer::getTop(), AutoSegment::isInvalidated(), AutoSegment::isReduced(), AutoContact::isTurn(), Observable::notify(), Katabatic::SegCreated, Katabatic::SegInvalidated, Katabatic::SegInvalidatedLayer, Katabatic::SegSourceBottom, Katabatic::SegSourceTop, Katabatic::SegTargetBottom, Katabatic::SegTargetTop, AutoSegment::setFlags(), AutoSegment::unsetFlags(), AutoSegment::updateOrient(), and AutoSegment::updatePositions().
AutoSegment * makeDogleg (AutoContact *  from)

Parameters:
from 	The AutoContact from  which we want to make a dogleg.	
This method is dedicated for the restauration of topology connexity on AutoContcact after a layer change on one of their connected AutoSegment.
It perform three operations:
1.	Create a dogleg on the AutoSegment (using the normal GCell variant).
2.	Adjust the layers of the dogleg according whether we are going up  or down  from the AutoContact from  to the segment.
3.	Returns the new AutoSegment connected to from  (it may be the same as before, if  the AutoContact is the source of the segment). 
References Layer::contains(), AutoSegment::getAutoSource(), RoutingGauge::getContactLayer(), Session::getDoglegs(), AutoContact::getGCell(), AutoContact::getLayer(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoContact::getX(), AutoContact::getY(), and AutoSegment::isHorizontal().
Referenced by AutoContactTurn::updateTopology(), and AutoContactTerminal::updateTopology().
unsigned int makeDogleg (Interval  interval, unsigned int  flags = KbNoFlags)
Make a dogleg in a set of aligned segments , thus the dogleg may not be created on this  segment but in one which span intersect interval .
Returns:  A set of flags telling if the break has occured on the left candidate (Katabatic::KbDoglegOnLeft) or right (Katabatic::KbDoglegOnRight). it is combined with the flag telling if the above or below layer was used for the dogleg. In case of failure, zero is returned.
Break the set of aligned segments so the break point is outside  interval . The break point so can occurs on the left  of the interval (Katabatic::KbDoglegOnLeft) or on the right  of the interval (Katabatic::KbDoglegOnRight). When the set of aligned segments fully enclose interval , a choice has to be made between the left and right candidate. The rules are as follow:
A left  candidate include the min  of the interval into it's span.
A right  candidate include the max  of the interval into it's span.
In certain topologies, there can be more than left or right candidates (more than one segment of the set intersect the bounds of the interval). Thoses candidates are ecludeds.
If the two candidates are avalaibles, we choose the one with the greated native  constraints.
In case of strict equality, the left candidate is choosen.
 
References AutoSegment::_makeDogleg(), Interval::contains(), AutoSegment::getAligneds(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getDirection(), Session::getDoglegs(), AutoContact::getGCell(), GCell::getRight(), GCell::getSide(), Interval::getSize(), AutoSegment::getSourceConstraints(), AutoSegment::getSpanU(), AutoSegment::getTargetConstraints(), GCell::getUp(), DbU::getValueString(), Interval::getVMax(), Interval::getVMin(), Katabatic::KbDoglegOnLeft, Katabatic::KbDoglegOnRight, Katabatic::KbHorizontal, and Katabatic::KbNativeConstraints.
unsigned int makeDogleg (GCell *  doglegGCell, unsigned int  flags = KbNoFlags)
Make a dogleg in a set of aligned segments , thus the dogleg may not be created on this  segment but in the one which is under doglegGCell .
Returns:  A flag telling if the above or below layer was used for the perpandicular segment (Katabatic::KbUseAboveLayer or Katabatic::KbUseBelowLayer). 
References AutoSegment::_makeDogleg(), Katabatic::EngineGlobalLoaded, AutoSegment::getAligneds(), AutoSegment::getDirection(), Session::getKatabatic(), GCell::getSide(), AutoSegment::getSpanU(), Interval::intersect(), and AutoSegment::isFixed().
unsigned int _makeDogleg (GCell *  doglegGCell, unsigned int  flags)[pure virtual]
This method is the workhorse for the various dogleg and topology restauration methods.  It is the atomic method that actually make the dogleg on this  segment.
Returns:  Katabatic::KbUseAboveLayer if the dogleg is using the above  layer (Katabatic::KbUseBelowLayer for the below layer).
Break the current segment in two (a.k.a. making a dogleg).
The segment is broken inside doglegGCell .
Two new segments are createds, one perpandicular and one parallel.
The original segment is always kept attached to the source . (the new parallel fragment is attached to the target ).
The perpandicular segment is in the layer above  by default. If we are already on the topmost routing layer, the below  layer is used.
If the segment pass through the breaking GCell, it's axis is set into the center. If the segment is local, the axis is the middle of the segment.
The Local/Global kind of the original segment is updated. The local/global status is computed by the constructor of the AutoSegment for the perpandicular and the new parallel.
The terminal state is updated. If the segment is a strong terminal the part that is no longer directly connected to the terminal is demoted to Katabatic::SegWeakTerminal1.
The perpandicular is obviously a canonical. If the broken segment is canonical, the original is  left canonical and only the new parallel is re-canonized. Otherwise, we re-canonise both sets of aligned segments (the one on the source and the one on the target).
The three segments are added to the session dogleg stack.
After this method call the net topology is guarantee to be valid.
  
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
Referenced by AutoSegment::makeDogleg().
bool moveULeft ()[pure virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell below (a.k.a. lower or inferior). Rules for displacement:
The segment must be connected at both end to a turn contact (we do not want to manage more complex cases for the time beeing).
And, of course, the segment must not already by on the bottomost GCell...
The displacement take care of:
Managing the status of the various perpandiculars. The stretched one are made global if needed. The shrinked one made local, if needed.
The supporting AutoContact (source & target) are changed of GCell.
If the segment is global, the go-through GCells are updateds.
Returns:  true  if the move has succeeded.
 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
bool moveURight ()[pure virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell above (a.k.a. upper or superior). Rules for displacement:
See also:
AutoSegment::moveULeft() for a complete description. 
Implemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
void slacken (unsigned int  flags)
If the the AutoSegment is attached trough source and/or target to a terminal with too tight constraints, create a dogleg on overconstrained extremities.
If flags  contains Katabatic::KbPropagate, not only the current segment will be looked up, but the whole aligned set. Note that due to the structure of the database, there can be no more than two terminal connected segments on the whole set (one on each extremity).
If flags  contains Katabatic::KbHalfSlacken, the number of tracks under which the constraints are considered too tight is 3. Otherwise it is 10, that is a whole GCell side span. This flag should be used when a long set of global wire is overconstrained by only one of it's terminal, the other one offering sufficient slack (typically: 8).
The segment will also be slackened from it's terminal if the difference between the current slack (resulting from all the constraints of the aligned set) and the native slack is less than 3 tracks. This case means that we are already near the native slack and it not sufficent enough a degree of freedom.
 The slacken()  method reject the slackening of short locals as shown in figure 2.a . One way or another, we must connect to the terminal through this  short local. If we cannot place it, breaking it in two other short local wouldn't help. In fact, it will only clutter more the GCell and make subsequent routing more difficult.
The figures 2.b  and 2.c  shows the special case of slackening an horizontal from an horizontal  terminal. In the original configuration, the slack on segment id:10  is null, it's only choice is to be aligned with the terminal. If a slackening is requested, it generally implies that the horizontal track is blocked, and close to the terminal. Based on thoses hypothesis, when we slacken the segment id:10  we impose that the source  contact is fixed  on the terminal itself. That is, the segment id:10  will be reduced to a zero-length and we made an immediate turn (see 2.c  ).
 
References AutoSegment::getAligneds(), and Katabatic::KbPropagate.
bool reduceDoglegLayer ()
Perform the actual layer change on a reduced segment. This method is to be called juste before destroying the Katabatic database.
Returns:  true  if a change occurs. 
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), Session::getRoutingLayer(), AutoSegment::isReduced(), AutoSegment::isSpinBottom(), AutoSegment::isSpinTop(), AutoContact::setLayer(), and AutoSegment::setLayer().
bool reduce ()
Sets the segment into reduced state.
Returns:  true  if the operation did succeed. The layer will not be actually changed until the Katabatic database is saved/destroyed.
A segment can be reduced if:
Source & target are AutoContactTurn.
It is either spin top  or spin bottom , that is connecting perpandiculars both in the same layer.
Has a length less or equal one pitch in the perpandicular direction.
Neither of the perpandicular are also reduceds.
 If segment id:12  is reduced, it prevents id:10  & id:14  to be also reduced, by increasing the _reduced  counter. In this example id:14  is spin top  and id:12  is spin bottom .
If we reduce two adjacent segments, one will go up while the other will go down (they will actually exchange their layers), it will thus defeat the purpose of creating a same layer  dogleg. Besides, the turn contact between them will be changed into a pure metal one, generating a disconnexion...
See also:
AutoSegment::raise() 
References AutoSegment::canReduce(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getPerpandicular(), and Katabatic::SegIsReduced.
bool raise ()
Get a segment out of reduced  state.
Returns:  true  if a state change did really take place.
See also:
AutoSegment::reduce() 
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getPerpandicular(), and Katabatic::SegIsReduced.
AutoSegment * canonize (unsigned int  flags = KbNoFlags)
Find and set the canonical AutoSegment from a set of aligneds. For the time beeing we assumes that there is no merging process, so the Segments will only gets more and more fragmented. This implies that a segment can become canonical but it will never revert to normal status.
The canonical AutoSegment is the one with the lowest Id . This a way of ensuring reproductible results. Note that the canonical one may not be the geometrically  lowest one.
Remark: Canonical aware method. 

References AutoSegment::getAligneds(), AutoSegment::isCanonical(), AutoSegment::isGlobal(), Katabatic::SegCanonical, Katabatic::SegNotAligned, Katabatic::SegWeakGlobal, AutoSegment::setFlags(), and AutoSegment::unsetFlags().
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().
void invalidate (unsigned int  flags = KbPropagate)[virtual]
Invalidate this AutoSegment, or if the Katabatic::KbPropagate flags is set, the whole set of aligned segments.
Remark: If Katabatic is in the destruction stage, this function does nothing.

Remark: Canonical aware method. 

References AutoSegment::_invalidate(), AutoSegment::getAligneds(), AutoSegment::isInvalidated(), Katabatic::KbPropagate, Katabatic::KbSource, Katabatic::KbTarget, and AutoSegment::setFlags().
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoSegment::_postCreate(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), and AutoContactTerminal::updateTopology().
Interval computeOptimal (set< AutoSegment *> &  processeds)

Parameters:
processeds 	A set of already processeds AutoSegment. Used by the caller function to avoid doing again the computation on an AutoSegment from an already proccessed aligned set. Compute the optimal axis interval for the aligned set.	
Remark: Canonical aware method. 

References AutoSegment::getAligneds(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getAxis(), GCell::getBoundingBox(), GCell::getColumn(), AutoContact::getConstraintBox(), AutoSegment::getConstraints(), AutoSegment::getExtremity(), AutoSegment::getOrigin(), AutoSegment::getPerpandiculars(), GCell::getRow(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), AutoSegment::isHorizontal(), AutoSegment::isVertical(), AutoSegment::setOptimalMax(), AutoSegment::setOptimalMin(), and DbU::toLambda().
void setAxis (DbU::Unit  axis, unsigned int  flags = KbNoFlags)

Parameters:
axis 	The new position of the axis. 	
flags 	See KbRealignate.	
Set the axis of an aligned set. This method does nothing if not called on the canonical AutoSegment of the set. If the new value of the axis is equal to the previous one, nothing is done (non-canonical AutoSegment are not looked after). To force an actual axis set, with invalidation of the whole AutoSegment set, set the KbRealignate flag.
Remark: Canonical aware method. 

References AutoSegment::getAligneds(), AutoSegment::getAxis(), AutoSegment::isCanonical(), AutoSegment::isHorizontal(), Katabatic::KbRealignate, and DbU::toLambda().
Referenced by AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), AutoSegment::toConstraintAxis(), and AutoSegment::toOptimalAxis().
bool toConstraintAxis (unsigned int  flags = KbRealignate)
If the AutoSegment axis is outside the constraint interval, put it on nearest bound. This method is active only on canonical AutoSegments.
Returns:
true  if an actual axis change is made.
Remark: Canonical aware method. 

References AutoSegment::getAutoSource(), AutoSegment::getAxis(), AutoSegment::getConstraints(), AutoContact::getGCell(), Interval::getHalfSize(), GCell::getSide(), AutoSegment::isCanonical(), AutoSegment::isDogleg(), AutoSegment::isHorizontal(), Katabatic::KbHorizontal, Katabatic::KbVertical, and AutoSegment::setAxis().
bool toOptimalAxis (unsigned int  flags = KbRealignate)
If the AutoSegment axis is outside the optimal interval, put it on nearest bound. This method is active only on canonical AutoSegments.
Returns:
true  if an actual axis change is made.
Remark: Canonical aware method. 

References AutoSegment::getAxis(), AutoSegment::getConstraints(), AutoSegment::getOptimalMax(), AutoSegment::getOptimalMin(), AutoSegment::isCanonical(), Katabatic::KbRealignate, and AutoSegment::setAxis().
AutoSegments getOnSourceContact (unsigned int  direction)
Returns:  The Collection of AutoSegment in direction  that are on this segment source contact. 
References AutoSegment::getSource(), and Collection< Type >::getSubSet().
AutoSegments getOnTargetContact (unsigned int  direction)
Returns:  The Collection of AutoSegment in direction  that are on this segment target contact. 
References Collection< Type >::getSubSet(), and AutoSegment::getTarget().
AutoSegments getAligneds (unsigned int  flags = KbNoFlags)
The Collection of AutoSegments that are aligned on this one through AutoContactHTee or AutoContactVTee. If the flags  contains Katabatic::KbWithPerpands, the Collection will also includes the AutoSegments directly perpandiculars to the whole aligned set. 
Referenced by AutoSegment::canDogleg(), AutoSegment::canMoveUp(), AutoSegment::canonize(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), AutoSegment::canSlacken(), AutoSegment::computeOptimal(), AutoSegment::getCanonical(), AutoSegment::invalidate(), AutoSegment::isStrongTerminal(), AutoSegment::makeDogleg(), AutoSegment::setAxis(), and AutoSegment::slacken().
AutoSegments getPerpandiculars ()
The Collection of all AutoSegments directly perpandiculars to the whole aligned set. 
Referenced by AutoSegment::computeOptimal().
void _preCreate (AutoContact *  source, AutoContact *  target)[static], [protected]
Perform sanity checks before allowing the actual creation of an AutoSegment. If an error occurs throw an exception.
Check for:
source  and target  must not be NULL .
source  and target  must be different. 
void _postCreate ()[protected], [virtual]
Perform operations that, given the data structure cannot be done in the constructor. Also allows for sharing code with the derived classes. Currently:
Invalidate the whole net (topology change).
Insert the AutoSegment in the lookup/Session machanism.
Call AutoSegment::invalidate().
Call AutoSegment::updateOrient().
Call AutoSegment::updatePositions(). 
Reimplemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
References AutoSegment::getNet(), Session::invalidate(), AutoSegment::invalidate(), Session::link(), Observable::notify(), AutoSegment::updateOrient(), and AutoSegment::updatePositions().
Referenced by AutoHorizontal::_postCreate(), AutoVertical::_postCreate(), and AutoSegment::create().
void _preDestroy ()[protected], [virtual]
Perform operations that must be done before the actual destructor is called. Merely whidrawn the AutoSegment from the lookup/Session mechanism. 
Reimplemented in AutoVertical (p.pagenum), and AutoHorizontal (p.pagenum).
References Observable::notify(), and Session::unlink().
Referenced by AutoHorizontal::_preDestroy(), and AutoVertical::_preDestroy().
Interval _invalidate ()[protected]
Invalidate this segment. The segment is scheduled into the Session revalidation mechanism. 
References Session::invalidate(), AutoSegment::isInvalidated(), Observable::notify(), Katabatic::SegInvalidated, and AutoSegment::setFlags().
Referenced by AutoSegment::invalidate().
unsigned int _getFlags () const[inline], [protected]
Sets flags  given as arguments. 
Referenced by AutoSegment::computeTerminal().

The documentation for this class was generated from the following files:
AutoSegment.h
AutoSegment.cpp
AutoSegment.dox

AutoSegments_Aligneds Class Reference

All aligned AutoSegment of a set. 
Inheritance diagram for AutoSegments_Aligneds:
IMAGE

Public Member Functions
AutoSegments_Aligneds (AutoSegment *, unsigned int flags=KbNoFlags)
AutoSegments_Aligneds (const AutoSegments_Aligneds &)
virtual AutoSegmentHC * getClone () const
virtual AutoSegmentHL * getLocator () const

Detailed Description
All aligned AutoSegment of a set. 
A Collection to iterate over all the AutoSegment aligned with master . The master  itself will not be included in the walkthrough. If the Katabatic::KbWithPerpands flag is passed as argument, the collection will also includes the AutoSegments directly perpandicular to the aligned set.
Remark: AutoSegments are forced to be aligneds only when connected through
AutoContactHTee or AutoContactVTee. 

Constructor & Destructor Documentation
AutoSegments_Aligneds (AutoSegment *  master, unsigned int  flags = KbNoFlags)[inline]
Create a collection of all the AutoSegment aligned on master  (master itself is excluded from the Collection). If the flag Katabatic::KbWithPerpands is given the directly perpandicular AutoSegment will also be includeds. 
AutoSegments_Aligneds (const AutoSegments_Aligneds &  autosegments)[inline]
Copy constructor. 

Member Function Documentation
AutoSegmentHC * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Collection< Type >.
AutoSegmentHC * getLocator () const[virtual]
Returns:  A deep copy of the Collection Locator. 
Implements Collection< Type >.

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoSegments_AnchorOnGCell Class Reference

All AutoSegment Beginning and/or Stopping in a GCell. 
Inheritance diagram for AutoSegments_AnchorOnGCell:
IMAGE

Public Member Functions
AutoSegments_AnchorOnGCell (GCell *fcell, unsigned int flags)
AutoSegments_AnchorOnGCell (const AutoSegments_AnchorOnGCell &)
virtual AutoSegmentHC * getClone () const
virtual AutoSegmentHL * getLocator () const

Detailed Description
All AutoSegment Beginning and/or Stopping in a GCell. 
A Collection to iterate over all the AutoSegment that begin from and/or end in a GCell. 

Constructor & Destructor Documentation
AutoSegments_AnchorOnGCell (GCell *  fcell, unsigned int  flags)[inline]
Create a collection of all the AutoSegment beginning from and/or ending in fcell . The set returned by the Collection is selected through flags  :
Katabatic::KbBySource : include AutoSegment starting from fcell .
Katabatic::KbByTarget : include AutoSegment ending in fcell .
Katabatic::KbHorizontal : include horizontal AutoSegment.
Katabatic::KbVertical : include vertical AutoSegment. 
AutoSegments_AnchorOnGCell (const AutoSegments_AnchorOnGCell &  autosegments)[inline]
Copy constructor. 

Member Function Documentation
AutoSegmentHC * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Collection< Type >.
AutoSegmentHC * getLocator () const[virtual]
Returns:  A deep copy of the Collection Locator. 
Implements Collection< Type >.

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoSegments_InDirection Class Reference

Filter to select AutoSegment in a given direction. 
Inheritance diagram for AutoSegments_InDirection:
IMAGE

Public Member Functions
AutoSegments_InDirection (unsigned int direction)
virtual AutoSegmentHF * getClone () const
virtual bool accept (AutoSegment *segment) const

Detailed Description
Filter to select AutoSegment in a given direction. 
A Filter to select AutoSegment in a specific direction. 

Constructor & Destructor Documentation
AutoSegments_InDirection (unsigned int  direction)[inline]
Create a filter for AutoSegment in direction  (Katabatic::KbHorizontal or Katabatic::KbVertical). 

Member Function Documentation
AutoSegmentHF * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Filter< Type >.
bool accept (AutoSegment *  segment) const[virtual]
Returns:  true  if the segment  is in the correct direction. 

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoSegments_IsAccountable Class Reference

Filter to select accoutable AutoSegment. 
Inheritance diagram for AutoSegments_IsAccountable:
IMAGE

Public Member Functions
virtual AutoSegmentHF * getClone () const
virtual bool accept (AutoSegment *) const

Detailed Description
Filter to select accoutable AutoSegment. 
A Filter to select accoutable AutoSegment. An AutoSegment is said to be accountable if it is canonical (in the sense of an aligned set). 

Member Function Documentation
AutoSegmentHF * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Filter< Type >.
bool accept (AutoSegment *  segment) const[virtual]
Returns:  true  if the segment  is accountable (i.e. canonical). 

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoSegments_OnContact Class Reference

All AutoSegment anchored on a Contact. 
Inheritance diagram for AutoSegments_OnContact:
IMAGE

Public Member Functions
AutoSegments_OnContact (AutoSegment *master, Contact *contact)
AutoSegments_OnContact (const AutoSegments_OnContact &)
virtual AutoSegmentHC * getClone () const
virtual AutoSegmentHL * getLocator () const

Detailed Description
All AutoSegment anchored on a Contact. 
All AutoSegment Beginning from an AutoContact.
A Collection to iterate over all the AutoSegment anchored on contact . If supplied, the AutoSegment master  will be excluded from the list.
Remark: If a Hurricane::Segment is anchored on the contact , but is not
associated to an AutoSegment, it will be silently skipped.
A Collection to iterate over all the AutoSegment that begin from AutoContact. As AutoSegments are kept orienteds (source anchor must be lower than target), selecting source anchored AutoSegments implies that they are starting from this AutoContact. 

Constructor & Destructor Documentation
AutoSegments_OnContact (AutoSegment *  master, Contact *  contact)[inline]

Parameters:
master 	Exclude this AutoSegment from the Collection. 	
contact 	The Hurricane Contact over which to iterate.	
Construct a Collection of all the AutoSegment anchored on contact .
Create the collection of all AutoSegments direcly anchored on contact , with exclusion of master . 
AutoSegments_OnContact (const AutoSegments_OnContact &  segments)[inline]
Copy constructor. 

Member Function Documentation
AutoSegmentHC * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Collection< Type >.
AutoSegmentHC * getLocator () const[virtual]
Returns:  A deep copy of the Collection Locator. 
Implements Collection< Type >.

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoSegments_Perpandiculars Class Reference

All perpandicular AutoSegment to a set of aligneds. 
Inheritance diagram for AutoSegments_Perpandiculars:
IMAGE

Public Member Functions
AutoSegments_Perpandiculars (AutoSegment *master)
AutoSegments_Perpandiculars (const AutoSegments_Perpandiculars &)
virtual AutoSegmentHC * getClone () const
virtual AutoSegmentHL * getLocator () const

Detailed Description
All perpandicular AutoSegment to a set of aligneds. 
A Collection to iterate over all the AutoSegment perpandicular to the set of aligned AutoSegment of master .
Remark: This Collection is canonical aware (work on the aligned set).

Constructor & Destructor Documentation
AutoSegments_Perpandiculars (AutoSegment *  master)[inline]
Create a collection of all the AutoSegment perpandicular to the aligned set of master . 
AutoSegments_Perpandiculars (const AutoSegments_Perpandiculars &  autosegments)[inline]
Copy constructor. 

Member Function Documentation
AutoSegmentHC * getClone () const[virtual]
Returns:  A deep copy of the Collection. 
Implements Collection< Type >.
AutoSegmentHC * getLocator () const[virtual]
Returns:  A deep copy of the Collection Locator. 
Implements Collection< Type >.

The documentation for this class was generated from the following files:
AutoSegments.h
AutoSegments.dox

AutoVertical Class Reference

Concrete Vertical AutoSegment. 
Inheritance diagram for AutoVertical:
IMAGE

Public Member Functions
virtual bool _canSlacken () const
virtual bool canMoveULeft (float reserve=0.0) const
virtual bool canMoveURight (float reserve=0.0) const
virtual Segment * base ()
virtual Segment * base () const
virtual Vertical * getVertical ()
virtual DbU::Unit getSourceU () const
virtual DbU::Unit getTargetU () const
virtual DbU::Unit getDuSource () const
virtual DbU::Unit getDuTarget () const
virtual Interval getSpanU () const
virtual bool getConstraints (DbU::Unit &min, DbU::Unit &max) const
virtual Interval getSourceConstraints (unsigned int flags=0) const
virtual Interval getTargetConstraints (unsigned int flags=0) const
virtual unsigned int getDirection () const
virtual size_t getGCells (vector< GCell *> &) const
virtual void setDuSource (DbU::Unit)
virtual void setDuTarget (DbU::Unit)
virtual void updateOrient ()
virtual void updatePositions ()
virtual bool checkPositions () const
virtual bool checkConstraints () const
virtual unsigned int _makeDogleg (GCell *, unsigned int flags)
virtual bool moveULeft ()
virtual bool moveURight ()
Protected Member Functions
virtual void _postCreate ()
virtual void _preDestroy ()
Additional Inherited Members

Detailed Description
Concrete Vertical AutoSegment. 

Member Function Documentation
bool _canSlacken () const[virtual]
Returns:  true  if the segment can be slackened. That is, source or target constraints are less than three pitches. 
Implements AutoSegment (p.pagenum).
References Interval::contains(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getSide(), Interval::inflate(), and Katabatic::KbHorizontal.
bool canMoveULeft (float  reserve = 0.0) const[virtual]

Returns:
true  if the global  segment can be moved on the left GCell (for a vertical) or down (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the target . That is, it's a global which extends toward left.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), GCell::getLeft(), Session::getRoutingGauge(), AutoContact::getSegment(), GCell::getUp(), GCell::getWDensity(), and AutoSegment::isGlobal().
bool canMoveURight (float  reserve = 0.0) const[virtual]

Returns:
true  if the global  segment can be moved on the right GCell (for a vertical) or up (for an horizontal). The move is accepted only if it do not change the amount of global wiring. Thus the following conditions:
The segment mustn't be on the leftmost GCell (obvious...).
The segment must be global.
The source and target contacts must be AutoContactTurn(s).
At least one of the perpandicular must be global and  connected through the source . That is, it's a global which extends toward right.
The GCell of maximum density on the left must remains below the current GCell of maximum density, with a margin of reserve  (expressed in total saturation percentage). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), GCell::getRight(), Session::getRoutingGauge(), AutoContact::getSegment(), GCell::getUp(), GCell::getWDensity(), and AutoSegment::isGlobal().
Segment * base ()[virtual]
Returns:  the decorated Hurricane::Segment. 
Implements AutoSegment (p.pagenum).
Segment * base () const[virtual]
Returns:  the decorated Hurricane::Segment (const flavor). 
Implements AutoSegment (p.pagenum).
Vertical * getVertical ()[virtual]
Returns:  If the decorated segment is a Hurricane::Vertical, return it. NULL  otherwise. 
Reimplemented from AutoSegment (p.pagenum).
DbU::Unit getSourceU () const[virtual]
Returns:  The AutoSegment uniform  source position. (X for an horizontal and Y for a Vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getSourceY().
DbU::Unit getTargetU () const[virtual]
Returns:  The AutoSegment uniform  target position. (X for an horizontal and Y for a Vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getTargetY().
DbU::Unit getDuSource () const[virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implements AutoSegment (p.pagenum).
References Vertical::getDySource().
DbU::Unit getDuTarget () const[virtual]
Returns:  The AutoSegment uniform  delta from source. (dX for an horizontal and dY for a Vertical). 
Implements AutoSegment (p.pagenum).
References Vertical::getDyTarget().
Interval getSpanU () const[virtual]
Returns:  The AutoSegment uniform  occupying interval (on X for horizontal and on Y for vertical). 
Implements AutoSegment (p.pagenum).
References Segment::getSourceY(), and Segment::getTargetY().
bool getConstraints (DbU::Unit &  min, DbU::Unit &  max) const[virtual]
Returns:  in min  & max  the allowed range for the segment axis. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoSegment::getUserConstraints(), and DbU::getValueString().
Interval getSourceConstraints (unsigned int  flags = 0) const[virtual]

Returns:
The Interval into witch the source AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), Box::getXMax(), Box::getXMin(), and Katabatic::KbNativeConstraints.
Interval getTargetConstraints (unsigned int  flags = 0) const[virtual]

Returns:
The Interval into witch the target AutoContact can vary. By default all deduced constraints and user constraints are took into account. If flags  contains KbNativeConstraints  the constraint returned is only the enclosing GCell. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoTarget(), Box::getXMax(), Box::getXMin(), and Katabatic::KbNativeConstraints.
unsigned int getDirection () const[virtual]
Returns:  Katabatic::KbHorizontal or Katabatic::KbVertical according to the decorated segment. 
Implements AutoSegment (p.pagenum).
References Katabatic::KbVertical.
size_t getGCells (vector< GCell *> &  gcells) const[virtual]

Parameters:
gcells 	A vector that will be filled by all the GCells that the segment overlap. In increasing order, from source to target. 	
Returns:
The vector's size. 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), and GCell::getUp().
void setDuSource (DbU::Unit  du)[virtual]
Set the uniform  dU  from source anchor (dX for Horizontal, dY for Vertical). 
Implements AutoSegment (p.pagenum).
void setDuTarget (DbU::Unit  du)[virtual]
Set the uniform  dU  from target anchor (dX for Horizontal, dY for Vertical). 
Implements AutoSegment (p.pagenum).
void updateOrient ()[virtual]
Ensure that source is lower than target. Swap them if needed. Swap never occurs on global segment because their source and target anchors are from different GCell, which are already ordered. 
Implements AutoSegment (p.pagenum).
References Segment::getSourceY(), Segment::getTargetY(), Segment::invert(), Katabatic::SegSourceBottom, Katabatic::SegSourceTop, Katabatic::SegTargetBottom, Katabatic::SegTargetTop, AutoSegment::setFlags(), and AutoSegment::unsetFlags().
void updatePositions ()[virtual]
Update the segment begenning and ending positions. The positions takes into account the extension caps and reflect the real space used by the segment under it's long axis. 
Implements AutoSegment (p.pagenum).
References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceY(), and Segment::getTargetY().
bool checkPositions () const[virtual]
Returns:  true  if the relative positions of source & target are coherent. (source <= target). 
Implements AutoSegment (p.pagenum).
References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceY(), Segment::getTargetY(), and DbU::getValueString().
bool checkConstraints () const[virtual]
Returns:  true  if the constraint intervel is coherent (non-empty or punctual in the worst case). 
Implements AutoSegment (p.pagenum).
References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), and Interval::intersect().
unsigned int _makeDogleg (GCell *  doglegGCell, unsigned int  flags)[virtual]
This method is the workhorse for the various dogleg and topology restauration methods.  It is the atomic method that actually make the dogleg on this  segment.
Returns:  Katabatic::KbUseAboveLayer if the dogleg is using the above  layer (Katabatic::KbUseBelowLayer for the below layer).
Break the current segment in two (a.k.a. making a dogleg).
The segment is broken inside doglegGCell .
Two new segments are createds, one perpandicular and one parallel.
The original segment is always kept attached to the source . (the new parallel fragment is attached to the target ).
The perpandicular segment is in the layer above  by default. If we are already on the topmost routing layer, the below  layer is used.
If the segment pass through the breaking GCell, it's axis is set into the center. If the segment is local, the axis is the middle of the segment.
The Local/Global kind of the original segment is updated. The local/global status is computed by the constructor of the AutoSegment for the perpandicular and the new parallel.
The terminal state is updated. If the segment is a strong terminal the part that is no longer directly connected to the terminal is demoted to Katabatic::SegWeakTerminal1.
The perpandicular is obviously a canonical. If the broken segment is canonical, the original is  left canonical and only the new parallel is re-canonized. Otherwise, we re-canonise both sets of aligned segments (the one on the source and the one on the target).
The three segments are added to the session dogleg stack.
After this method call the net topology is guarantee to be valid.
  
Implements AutoSegment (p.pagenum).
References AutoContact::base(), AutoSegment::canonize(), AutoContactTurn::create(), AutoSegment::create(), Session::dogleg(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), Session::getConfiguration(), RoutingGauge::getContactLayer(), AutoContact::getGCell(), Component::getLayer(), AutoSegment::getLayer(), RoutingGauge::getLayerDepth(), Component::getNet(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), AutoSegment::getSourceY(), AutoSegment::getTargetY(), GCell::getUp(), AutoSegment::getX(), GCell::getY(), GCell::getYMax(), AutoContact::invalidate(), AutoSegment::invalidate(), AutoSegment::isCanonical(), AutoSegment::isLocal(), AutoSegment::isSlackened(), AutoSegment::isWeakTerminal(), Katabatic::KbHorizontal, Katabatic::KbUseAboveLayer, Katabatic::KbUseBelowLayer, Katabatic::KbVertical, AutoContact::migrateConstraintBox(), GCell::removeVSegment(), Katabatic::SegCanonical, Katabatic::SegDogleg, Katabatic::SegGlobal, Katabatic::SegNotAligned, Katabatic::SegSlackened, Katabatic::SegWeakTerminal1, AutoSegment::setFlags(), AutoSegment::setLayer(), and AutoSegment::unsetFlags().
bool moveULeft ()[virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell below (a.k.a. lower or inferior). Rules for displacement:
The segment must be connected at both end to a turn contact (we do not want to manage more complex cases for the time beeing).
And, of course, the segment must not already by on the bottomost GCell...
The displacement take care of:
Managing the status of the various perpandiculars. The stretched one are made global if needed. The shrinked one made local, if needed.
The supporting AutoContact (source & target) are changed of GCell.
If the segment is global, the go-through GCells are updateds.
Returns:  true  if the move has succeeded.
 
Implements AutoSegment (p.pagenum).
References GCell::addHSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), GCell::getLeft(), AutoContact::getSegment(), GCell::getSide(), GCell::getUp(), Interval::getVMax(), AutoSegment::isLocal(), Katabatic::KbHorizontal, GCell::removeHSegment(), Katabatic::SegGlobal, AutoSegment::setAxis(), AutoSegment::setFlags(), AutoContact::setGCell(), and AutoSegment::unsetFlags().
bool moveURight ()[virtual]
This function do not manage an aligned set. It applies on this  segment only. 
Displace an Horizontal or Vertical segment to the GCell above (a.k.a. upper or superior). Rules for displacement:
See also:
AutoSegment::moveULeft() for a complete description. 
Implements AutoSegment (p.pagenum).
References GCell::addHSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), GCell::getRight(), AutoContact::getSegment(), GCell::getSide(), GCell::getUp(), DbU::getValueString(), Interval::getVMin(), AutoSegment::isLocal(), Katabatic::KbHorizontal, GCell::removeHSegment(), Katabatic::SegGlobal, AutoSegment::setAxis(), AutoSegment::setFlags(), AutoContact::setGCell(), and AutoSegment::unsetFlags().
void _postCreate ()[protected], [virtual]
In addition to AutoSegment::_postCreate(), detect whether the segment is global or local and register it in the relevant GCells (if needed).
If the segment is anchored directly on a terminal, adjust the axis so it's connected. 
Reimplemented from AutoSegment (p.pagenum).
References AutoSegment::_postCreate(), GCell::addVSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getUp(), Component::getX(), GCell::getY(), Katabatic::SegGlobal, AutoSegment::setFlags(), and AutoContact::setX().
void _preDestroy ()[protected], [virtual]
Perform operations that must be done before the actual destructor is called. Merely whidrawn the AutoSegment from the lookup/Session mechanism. 
Reimplemented from AutoSegment (p.pagenum).
References AutoSegment::_preDestroy(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getId(), GCell::getUp(), GCell::getY(), and GCell::removeVSegment().

The documentation for this class was generated from the following files:
AutoVertical.h
AutoVertical.cpp
AutoVertical.dox

BaseGrid::Axis Class Reference

Graduations on a BaseGrid Axis (H or V). 
Public Member Functions
void addGraduation (DbU::Unit)
void sort ()
unsigned int getSize () const
unsigned int getGraduationNumber (DbU::Unit pos, bool &onGraduation) const
const DbU::Unit & operator[] (unsigned int i) const

Detailed Description
Graduations on a BaseGrid Axis (H or V). 
Describe the list of graduations on either X or Y axis of a BaseGrid. Graduations correspond to cut lines and may not be evenly spaced.
Graduations are internally stored into a vector that needs to be sorted whenever new graduations are added (BaseGrid::Axis::sort()). 

Member Function Documentation
void addGraduation (DbU::Unit  pos)[inline]
Adds a new graduation. After adding new graduations, do not forget to perform a sort. 
Referenced by GCellGrid::_postCreate().
void sort ()
Re-order the graduations after an addition. 
Referenced by GCellGrid::_postCreate().
size_t getSize () const[inline]
Returns:  The number of graduations on the axis. 
Referenced by GCellGrid::_postCreate().
DbU::Unit getGraduationNumber (DbU::Unit  pos, bool &  onGraduation) const
Returns:  The index of the graduation which is immediatly inferior or equal to pos . In case of strict equality, onGraduation  is set to true . 
DbU::Unit operator[] (unsigned int  index) const[inline]
Returns:  The graduation at index . 

The documentation for this class was generated from the following files:
Grid.h
Grid.cpp
Grid.dox

BaseGrid Class Reference

Abstract Base Class for Irregular Grid. 
Inheritance diagram for BaseGrid:
IMAGE

Classes
class Axis
Graduations on a BaseGrid Axis (H or V). 
Public Member Functions
void destroy ()
const Box & getBoundingBox () const
unsigned int getColumns () const
unsigned int getRows () const
unsigned int getRawSize () const
unsigned int getIndex (unsigned int c, unsigned int r) const
unsigned int getRow (unsigned int) const
unsigned int getColumn (unsigned int) const
const Axis & getXGrads () const
const Axis & getYGrads () const
Protected Member Functions
BaseGrid (const Box &)

Detailed Description
Abstract Base Class for Irregular Grid. 
An abstract class for a 2-D matrix of objects. The grid is irregular in the sense that the horizontal and vertical cut lines may not be evenly spaced.
The coordinates of cut lines in horizontal and vertical direction are stored BaseGrid::Axis structure.
The BaseGrid contains all the non-template methods of the Grid, that is that do not depend of the matrix element type.
The internal storage implemented in derived classes is expected to store "row by row" (rows are put one after another in the vector). 

Constructor & Destructor Documentation
BaseGrid (const Box &  bb)[protected]
Construct a new BaseGrid on area bb . Graduations, rows & columns are sets to zero. 

Member Function Documentation
void destroy ()[inline]
The user-level destructor. 
const Box & getBoundingBox () const[inline]
Returns:  The grid bounding box. 
unsigned int getColumns () const[inline]
Returns:  The numbers of columns in the grid. 
Referenced by GCellGrid::_postCreate(), KatabaticEngine::createDetailedGrid(), BaseGrid::getColumn(), BaseGrid::getIndex(), BaseGrid::getRawSize(), and BaseGrid::getRow().
unsigned int getRows () const[inline]
Returns:  The numbers of rows in the grid. 
Referenced by GCellGrid::_postCreate(), KatabaticEngine::createDetailedGrid(), and BaseGrid::getRawSize().
unsigned int getRawSize () const[inline]
Returns:  The total number of elements in the grid (i.e. $ rows columns $) 
References BaseGrid::getColumns(), and BaseGrid::getRows().
unsigned int getIndex (unsigned int  c, unsigned int  r) const[inline]
An helper function that compute the linear index in the element vector from a  (c,r) coordinate pair:  index = c + r columns  
References BaseGrid::getColumns().
Referenced by Grid< GCell >::getGCellDown(), Grid< GCell >::getGCellLeft(), Grid< GCell >::getGCellRight(), and Grid< GCell >::getGCellUp().
unsigned int getRow (unsigned int  i) const[inline]
An helper function that compute the row number from the linear index in the vector:  row = index / columns  
References BaseGrid::getColumns().
Referenced by GCell::getRow().
unsigned int getColumn (unsigned int  i) const[inline]
An helper function that compute the column number from the linear index in the vector:  column = index columns  
References BaseGrid::getColumns().
Referenced by GCell::getColumn().
const Axis & getXGrads () const[inline]
Returns:  The graduations on the X axis. 
const Axis & getYGrads () const[inline]
Returns:  The graduations on the Y axis. 

The documentation for this class was generated from the following files:
Grid.h
Grid.cpp
Grid.dox

BaseObserver Class Reference

Observer Design Pattern, Observer part. 
Inheritance diagram for BaseObserver:
IMAGE

Public Member Functions
virtual void notify (unsigned int flags)

Detailed Description
Observer Design Pattern, Observer part. 
This class is used as a non-template base class for the templatized Observer one. It is used to avoid propagating template to the whole Observable class. It only contains the Observer::notify() virtual method. 

Member Function Documentation
void notify (unsigned int  flags)[virtual]
The method which will be called whenever a change occurs on the Observable. 
Referenced by Observable::notify().

The documentation for this class was generated from the following files:
Observer.h
Observer.cpp
Observer.dox

ChipTools Class Reference

Utilities for Chip Level Design. 
Public Member Functions
ChipTools (Cell *)
bool isChip () const
Cell * getCell () const
Instance * getCore () const
const Box & getChipBb () const
const Box & getLeftPadsBb () const
const Box & getRightPadsBb () const
const Box & getTopPadsBb () const
const Box & getBottomPadsBb () const
const Torus & getCorona () const
bool intersectVPads (const Box &) const
bool intersectHPads (const Box &) const

Detailed Description
Utilities for Chip Level Design. 
The ChipTools class provides a small set of utilities to ease the managment of a complete chip following the Alliance top hierarchical structure. 

Constructor & Destructor Documentation
ChipTools (Cell *  cell)
Create a ChipTool for cell . 
References Cell::getAbutmentBox(), Entity::getBoundingBox(), DataBase::getDB(), Box::getHeight(), Net::getHorizontals(), Technology::getLayer(), Instance::getMasterCell(), Instance::getName(), Cell::getName(), Cell::getNet(), DataBase::getTechnology(), Box::getWidth(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), Box::inflate(), and ChipTools::isChip().

Member Function Documentation
bool isChip () const[inline]
Returns:  true  if the Cell is truly a top level design. If not, this object is useless and does nothing. 
Referenced by ChipTools::ChipTools(), KatabaticEngine::createDetailedGrid(), and KatabaticEngine::isChip().
Cell * getCell () const[inline]
Returns:  The top-level design. 
Instance * getCore () const[inline]
Returns:  The instance of the core, that is, the only instance that is not  a pad... 
const Box & getChipBb () const[inline]
Returns:  The chip complete bounding box, this *is* simply the Cell bounding box. 
const Box & getLeftPadsBb () const[inline]
Returns:  The bounding box enclosing all the pads on the left side of the chip.
Remark: This box is computed from the chip bounding box and the pad height. 

const Box & getRightPadsBb () const[inline]
Returns:  The bounding box enclosing all the pads on the right side of the chip.
Remark: This box is computed from the chip bounding box and the pad height. 

const Box & getTopPadsBb () const[inline]
Returns:  The bounding box enclosing all the pads on the top side of the chip.
Remark: This box is computed from the chip bounding box and the pad height. 

const Box & getBottomPadsBb () const[inline]
Returns:  The bounding box enclosing all the pads on the bottom side of the chip.
Remark: This box is computed from the chip bounding box and the pad height. 

const Torus & getCorona () const[inline]
Returns:  The torus (in term of manhanttan distance) enclosed between the pad area and the core area. 
bool intersectVPads (const Box &  box) const[inline]
Returns:  true  if box  intersect either the left or right pad box. 
References Box::intersect().
bool intersectHPads (const Box &  box) const[inline]
Returns:  true  if box  intersect either the top or bottom pad box. 
References Box::intersect().

The documentation for this class was generated from the following files:
ChipTools.h
ChipTools.cpp
ChipTools.dox

GCell::CompareByDensity Class Reference

GCell Density Comparison Functor. 
Inherits binary_function< GCell *, GCell *, bool >.
Public Member Functions
CompareByDensity (unsigned int depth)

Detailed Description
GCell Density Comparison Functor. 
A comparison functor for GCell, compare by density on layer depth . 

Constructor & Destructor Documentation
CompareByDensity (unsigned int  depth)
Build a density comparator for GCells on layer depth . 

The documentation for this class was generated from the following files:
GCell.h
GCell.cpp
GCell.dox

GCell::CompareByIndex Class Reference

GCell Index Comparison Functor. 
Inherits binary_function< const GCell *, const GCell *, bool >.

Detailed Description
GCell Index Comparison Functor. 
A comparison functor for GCell, compare by index  (the linear index in the GCellGrid vector. 

The documentation for this class was generated from the following file:
GCell.h

GCell Class Reference

Routing Global Cell. 
Inherits ExtensionGo.
Classes
class CompareByDensity
GCell Density Comparison Functor. 
class CompareByIndex
GCell Index Comparison Functor. 
class Key
GCell Key - Density Cache. 
Public Types
typedef set< GCell *, CompareByIndex > SetIndex
Public Member Functions
virtual const Name & getName () const
bool isSaturated () const
bool isSaturated (unsigned int depth) const
bool isValid () const
bool isAboveDensity (float threshold) const
bool hasFreeTrack (size_t depth, float reserve) const
GCellGrid * getGCellGrid () const
unsigned int getDepth () const
unsigned int getIndex () const
unsigned int getRow () const
unsigned int getColumn () const
GCell * getLeft () const
GCell * getRight () const
GCell * getUp () const
GCell * getDown () const
virtual void translate (const DbU::Unit &, const DbU::Unit &)
virtual Box getBoundingBox () const
DbU::Unit getX () const
DbU::Unit getY () const
DbU::Unit getXMax () const
DbU::Unit getYMax () const
Interval getSide (unsigned int) const
float getHCapacity () const
float getVCapacity () const
float getDensity (unsigned int flags=0) const
float getCDensity (unsigned int flags=0) const
float getWDensity (unsigned int depth, unsigned int flags=0) const
DbU::Unit getBlockage (unsigned int depth) const
float getFragmentation (unsigned int depth) const
float getFeedthroughs (unsigned int depth) const
float getGlobalsCount (unsigned int depth) const
const vector< AutoSegment * > & getHSegments () const
const vector< AutoSegment * > & getVSegments () const
const vector< AutoContact * > & getContacts () const
AutoSegments getHStartSegments ()
AutoSegments getVStartSegments ()
AutoSegments getHStopSegments ()
AutoSegments getVStopSegments ()
AutoSegments getStartSegments (unsigned int direction)
AutoSegments getStopSegments (unsigned int direction)
size_t getRoutingPads (set< RoutingPad *> &)
const Key & getKey () const
size_t checkDensity () const
bool checkEdgeSaturation (size_t hreserved, size_t vreserved) const
void addBlockage (unsigned int depth, DbU::Unit)
void addHSegment (AutoSegment *)
void addVSegment (AutoSegment *)
void addContact (AutoContact *)
void removeVSegment (AutoSegment *)
void removeHSegment (AutoSegment *)
void removeContact (AutoContact *)
void updateContacts ()
size_t updateDensity ()
void updateKey (unsigned int depth)
void rpDesaturate (set< Net *> &)
bool stepDesaturate (unsigned int depth, set< Net *> &, AutoSegment *&moved, unsigned int flags=0)
bool stepNetDesaturate (unsigned int depth, set< Net *> &globalNets, SetIndex &invalidateds)
Static Public Member Functions
static size_t getAllocateds ()
static DbU::Unit getTopRightShrink ()
static const Name & getStaticName ()

Detailed Description
Routing Global Cell. 

GCell Description
Please note that there are two kind of Global Cells (or GCell for short):
The GCell used by the global router Knik.
The GCell used by the detailed router (Katabatic & Kite). Although the information they hold is obviously related, they are two separate kind of objects.
The area of the design to be routed is divided in a regular grid of rectangular area, the GCellGrid. Each rectangular area is a GCell.
The GCell contains the following informations:
The AutoSegments that begins or ends in it. The list of segments is not avalaible directly but through the AutoContacts that are owned by the GCell.
The AutoSegments that go straight through  it (or over  it). Horizontal & Vertical segments are stored in two separeted list. Those two lists are sorted by layer depth (the deepest layers first).
A lot of synthetic information about the density of tracks used in the GCell.
AutoContacts are affected to GCells, the area of the GCell is the one into which the AutoContact is allowed to be placed. It is this that way that the respect of the global routing choosen by Knik is enforced. See the AutoContact constraint box.
When tracks are aligned with the GCell boundaries they one exactly on the boundary can belong to the GCell on either side of the boundary. But we want a clear and mutually exclusive ownership of each GCell area. So, we choose that one GCell do not own the topmost and rightmost track. And to implement it, we shrink top and right coordinates by the amount of GCell::getTopRightShrink(), which must be less than the track spacing.
Saturation & Density Computation
At any depth (i.e. layer), in the preferred routing direction, a GCell can pass a finite length of wire. For example on an horizontal preferred layer:  WL_max = width(GCell) Htracks(GCell)  Then the density, is the ratio between $WL_max$ and the actually used wirelength:  Wdensity(depth) = WL_used(depth)WL_max(depth)  Normally, the ratio musn't exceed 1.0, but the occupied wire length computation, for now, doesn't merge overlapping wires belonging to the same net, so the ratio may be slightly inaccurate. Thus in some pathological cases may be greater than 1.0 whithout truly been overloaded.
A Cell is considered as saturated  if the overall density is above the saturation ratio given by Session::getSaturateRatio().
Contact density is calculated as follow:  Cont_density = |Contacts|Htracks Vtracks 4  It is a ratio over the number of actual contacts in the GCell and the maximal number. The maximal number being the product of the number of tracks in both direction and 4 stands for the hardwired number of layers (the depth).
Should not be hardwired... To be corrected in future versions. 
Feedthrough Computation
The feedtrough value is an estimate is of how many complete tracks have been used on a given layer of the GCell. It varies between zero and the number of track on the GCell (complete saturation). As an estimate, it doesn't tell you the actual number of free track, but how many you may expect  assuming the routing is reasonably well done.
Computation is done as follow: 
Wire type	Estimated Cost 	
Straight wire (feedthrough) 	1.0  	
Beginning or ending global wire 	0.5  	
Local wire. 	1/3  	
Blockage wire 	The exact percentage of the track 	

Track Computation
The number of track that can go through a GCell in the horizontal direction is computed as follow:  Htracks = heigth(GCell)Vpitch + 1 
The pitch is assumed to be the same for every layer and is hardwired to 5.0 lambda.
This is a bad architectural choice. The informations pertaining to routing should be held at Kite level, not be hardwired and the pitch should be made variable with the layer... To be corrected in future versions .

GCell Lazy Evaluation
To save processing time, the densities are not recomputed every time a segment is modified (added, removed or moved). Instead a lazy evaluation mechanism is used. Densities are recomputed each time a density is queried and  the lazy evaluation not  explicitly disabled (flag NoUpdate).
GCell Sorting Key
In order to perform a lexicographical sort on the tuple $(density(depth),id)$ of a GCell, a specific slave object GCell::Key is introduced. It is the density on one specific depth, not the average density.
GCell Desaturation / Layer Assignment
In addition to it's geometrical and density functionality, the GCell provides desaturation  capabilities. Desaturation is the operation of moving up feedthough AutoSegment from the bottom layers towards the upper ones in order to balance the densities in the different densities. Thoses operations provides building blocks for the layer assignment stage which is provided by the Kabatic tool.
Two strategies are avalaibles, moving one global AutoSegment at a time with GCell::stepDesaturate() or, when one AutoSegment is moved up, move up the whole net trunk with GCell::stepNetDesaturate().
GCell Implantation
GCell derives from Hurricane::ExtensionGo to allow a graphical rendering of the routing density. 

Member Typedef Documentation
typedef set< GCell *, CompareByIndex > SetIndex
Shorthand for a set of GCell sorted on their index. 

Member Function Documentation
size_t getAllocateds ()[static]
Returns:  The number of allocated GCells. 
DbU::Unit getTopRightShrink ()[static]
Returns:  The amount of shrink on the top and right boundaries. 
const Name & getStaticName ()[static]
Returns:  The name of the Go slice: "Katabatic::GCell" .
See also:
Hurricane::ExtensionGo 
const Name & getName () const[virtual]
Returns:  The name of the Go slice: "Katabatic::GCell" .
See also:
Hurricane::ExtensionGo 
Referenced by GCell::checkDensity().
bool isSaturated () const[inline]
Returns:  true  if at least one layer exceed a saturation of 1.0  (more wirelength that it can hold). 
Referenced by GCell::checkDensity(), GCell::stepDesaturate(), and GCell::updateDensity().
bool isSaturated (unsigned int  depth) const
Returns:  true  if the saturation ratio of layer depth  is over the threshold defined for the GCells. 
References GCell::getDensity(), and Session::getSaturateRatio().
bool isValid () const[inline]
Returns:  true  if all the AutoContact/AutoSegment of the GCell are valids. 
Referenced by GCell::checkDensity(), GCell::getCDensity(), GCell::getDensity(), GCell::getFeedthroughs(), GCell::getFragmentation(), GCell::getGlobalsCount(), GCell::getWDensity(), GCell::hasFreeTrack(), GCell::isAboveDensity(), and GCell::updateDensity().
bool isAboveDensity (float  threshold) const
Returns:  true  if the overall saturation ratio greater than threshold . 
References GCell::getDensity(), GCell::isValid(), and GCell::updateDensity().
bool hasFreeTrack (size_t  depth, float  reserve) const
Returns:  true  if there should be enough wire length to pass a wire completly trough this GCell. 
References GCell::getHCapacity(), GCell::getIndex(), RoutingGauge::getLayerDepth(), Layer::getName(), Session::getRoutingGauge(), RoutingGauge::getRoutingLayer(), GCell::getVCapacity(), GCell::isValid(), Katabatic::KbHorizontal, Katabatic::KbVertical, and GCell::updateDensity().
GCellGrid * getGCellGrid () const[inline]
Returns:  The Grid of which GCell is part of. 
Referenced by GCell::checkEdgeSaturation(), GCell::getDensity(), GCell::getDown(), GCell::getLeft(), GCell::getRight(), GCell::getUp(), and GCell::stepNetDesaturate().
unsigned int getDepth () const[inline]
Returns:  The depth (i.e. number of routing layers) of the GCell. 
unsigned int getIndex () const[inline]
Returns:  The linear index of the GCell in the GCellGrid vector.
See also:
GCellGrid for the meaning of the index. 
Referenced by AutoSegment::canMoveUp(), GCell::hasFreeTrack(), and GCell::stepDesaturate().
unsigned int getRow () const
Returns:  The row of the GCell in the GCellGrid. 
References BaseGrid::getRow().
Referenced by GCell::checkDensity(), and AutoSegment::computeOptimal().
unsigned int getColumn () const
Returns:  The Column of the GCell in the GCellGrid. 
References BaseGrid::getColumn().
Referenced by GCell::checkDensity(), and AutoSegment::computeOptimal().
GCell * getLeft () const
Returns:  The left neighbor of the GCell (NULL  if it is the leftmost GCell). 
References GCell::getGCellGrid(), and Grid< GCellT >::getGCellLeft().
Referenced by AutoVertical::canMoveULeft(), and AutoVertical::moveULeft().
GCell * getRight () const
Returns:  The right neighbor of the GCell (NULL  if it is the rightmost GCell). 
References GCell::getGCellGrid(), and Grid< GCellT >::getGCellRight().
Referenced by AutoHorizontal::_makeDogleg(), AutoHorizontal::_postCreate(), AutoHorizontal::_preDestroy(), AutoHorizontal::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), GCell::checkEdgeSaturation(), AutoHorizontal::getGCells(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().
GCell * getUp () const
Returns:  The top neighbor of the GCell (NULL  if it is the topmost GCell). 
References GCell::getGCellGrid(), and Grid< GCellT >::getGCellUp().
Referenced by AutoVertical::_makeDogleg(), AutoVertical::_postCreate(), AutoVertical::_preDestroy(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), GCell::checkEdgeSaturation(), AutoVertical::getGCells(), AutoSegment::makeDogleg(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), and AutoVertical::moveURight().
GCell * getDown () const
Returns:  The bottom neighbor of the GCell (NULL  if it is the bottommost GCell). 
References Grid< GCellT >::getGCellDown(), and GCell::getGCellGrid().
Referenced by AutoHorizontal::canMoveULeft(), and AutoHorizontal::moveULeft().
void translate (const DbU::Unit & , const DbU::Unit & )[virtual]
Required to exists as a Hurricane::Go derived class. But must never be used... 
Box getBoundingBox () const[virtual]
Returns:  The bounding box of the GCell, with the top right shrink applied. 
Referenced by AutoSegment::AutoSegment(), AutoSegment::computeOptimal(), and AutoContactTerminal::getNativeConstraintBox().
DbU::Unit getX () const[inline]
Returns:  The lower left X coordinate of the GCell box. 
References Box::getXMin().
Referenced by AutoHorizontal::_makeDogleg(), AutoHorizontal::_postCreate(), AutoHorizontal::_preDestroy(), AutoContact::getCBXMax(), AutoContact::getCBXMin(), AutoSegment::getOrigin(), AutoContact::setCBXMax(), and AutoContact::setCBXMin().
DbU::Unit getY () const[inline]
Returns:  The lower left Y coordinate of the GCell box. 
References Box::getYMin().
Referenced by AutoVertical::_makeDogleg(), AutoVertical::_postCreate(), AutoVertical::_preDestroy(), AutoContact::getCBYMax(), AutoContact::getCBYMin(), AutoSegment::getOrigin(), AutoContact::setCBYMax(), and AutoContact::setCBYMin().
DbU::Unit getXMax () const[inline]
Returns:  The upper right X coordinate of the GCell box (top right shrink applied). 
References Box::getXMax().
Referenced by AutoHorizontal::_makeDogleg(), AutoSegment::getExtremity(), and AutoContact::setCBXMax().
DbU::Unit getYMax () const[inline]
Returns:  The upper right Y coordinate of the GCell box (top right shrink applied). 
References Box::getYMax().
Referenced by AutoVertical::_makeDogleg(), AutoSegment::getExtremity(), and AutoContact::setCBYMax().
Interval getSide (unsigned int  direction) const
Returns:  The interval corresponding to the side position of the GCell box, in direction . 
References Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Referenced by AutoHorizontal::_canSlacken(), AutoVertical::_canSlacken(), AutoSegment::makeDogleg(), AutoHorizontal::moveULeft(), AutoVertical::moveULeft(), AutoHorizontal::moveURight(), AutoVertical::moveURight(), and AutoSegment::toConstraintAxis().
float getHCapacity () const

Returns:
The number of track that can go through the GCell in the horizontal direction. For a detailed explanation of the computation see Track Computation. 
References Box::getHeight().
Referenced by GCell::hasFreeTrack(), and GCell::updateDensity().
float getVCapacity () const

Returns:
The number of track that can go through the GCell in the vertical direction. For a detailed explanation of the computation see Track Computation. 
References Box::getWidth().
Referenced by GCell::hasFreeTrack(), and GCell::updateDensity().
float getDensity (unsigned int  flags = 0) const
Returns:  The average density of the GCell, for all the depths.
Saturation & Density Computation, GCell Lazy Evaluation. 
References GCellGrid::AverageHDensity, GCellGrid::AverageHVDensity, GCellGrid::AverageVDensity, GCellGrid::getDensityMode(), GCell::getGCellGrid(), GCell::isValid(), GCellGrid::MaxDensity, GCellGrid::MaxHDensity, GCellGrid::MaxHVDensity, GCellGrid::MaxVDensity, and GCell::updateDensity().
Referenced by GCell::isAboveDensity(), and GCell::isSaturated().
float getCDensity (unsigned int  flags = 0) const[inline]
Returns:  The density of contacts.
Saturation & Density Computation, GCell Lazy Evaluation. 
References GCell::isValid(), and GCell::updateDensity().
float getWDensity (unsigned int  depth, unsigned int  flags = 0) const[inline]
Returns:  The density of wires at depth .
Saturation & Density Computation, GCell Lazy Evaluation. 
References GCell::isValid(), and GCell::updateDensity().
Referenced by AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoHorizontal::canMoveURight(), and AutoVertical::canMoveURight().
DbU::Unit getBlockage (unsigned int  depth) const[inline]
Returns:  The total length of blockage wire on layer at depth . 
float getFragmentation (unsigned int  depth) const[inline]
Returns:  The longest free fragment size on layer depth  (in percent). 
References GCell::isValid(), and GCell::updateDensity().
Referenced by AutoSegment::canMoveUp().
float getFeedthroughs (unsigned int  depth) const[inline]
Returns:  The estimate number of occupied  tracks on layer depth .
See also:
Feedthrough Computation 
References GCell::isValid(), and GCell::updateDensity().
float getGlobalsCount (unsigned int  depth) const[inline]
Returns:  The number of global wires that go completly through the GCell at layer depth . This do not includes the global wires that begins or ends in the GCell. 
References GCell::isValid(), and GCell::updateDensity().
const vector< AutoSegment * > & getHSegments () const[inline]

Returns:
The vector of all horizontal AutoSegments that completly goes through the GCell. 
const vector< AutoSegment * > & getVSegments () const[inline]

Returns:
The vector of all vertical AutoSegments that completly goes through the GCell. 
const vector< AutoContact * > & getContacts () const[inline]

Returns:
The vector of all AutoContacts owned by the GCell. 
AutoSegments getHStartSegments ()

Returns:
A Collection of the horizontal AutoSegments that starts from this GCell. 
References Katabatic::KbHorizontal, and Katabatic::KbSource.
Referenced by GCell::getStartSegments().
AutoSegments getVStartSegments ()

Returns:
A Collection of the vertical AutoSegments that starts from this GCell. 
References Katabatic::KbSource, and Katabatic::KbVertical.
Referenced by GCell::getStartSegments().
AutoSegments getHStopSegments ()

Returns:
A Collection of the horizontal AutoSegments that stops in this GCell. 
References Katabatic::KbHorizontal, and Katabatic::KbTarget.
Referenced by GCell::getStopSegments().
AutoSegments getVStopSegments ()

Returns:
A Collection of the vertical AutoSegments that stops in this GCell. 
References Katabatic::KbTarget, and Katabatic::KbVertical.
Referenced by GCell::getStopSegments().
AutoSegments getStartSegments (unsigned int  direction)[inline]

Returns:
A Collection of the horizontal or vertical AutoSegments that starts from this GCell according to direction . 
References GCell::getHStartSegments(), GCell::getVStartSegments(), and Katabatic::KbHorizontal.
AutoSegments getStopSegments (unsigned int  direction)[inline]

Returns:
A Collection of the horizontal or vertical AutoSegments that stops in this GCell according to direction . 
References GCell::getHStopSegments(), GCell::getVStopSegments(), and Katabatic::KbHorizontal.
size_t getRoutingPads (set< RoutingPad *> &  rps)

Returns:
The size of the RoutingPad set.
Fills the rps  set with all the RoutingPads that appears in this GCell. (looks at all the anchors of the owned AutoContact) 
Referenced by GCell::rpDesaturate().
const Key & getKey () const[inline]

Returns:
The sorting key of the GCell.
See also:
GCell Sorting Key 
size_t checkDensity () const

Returns:
1  if the GCell is saturated, 0 otherwise.
Check, if the GCell is saturated, layer by layer. Issue a warning if that is the case. 
References Session::doWarnGCellOverload(), GCell::getColumn(), GCell::getName(), Session::getRoutingGauge(), GCell::getRow(), Session::isInDemoMode(), GCell::isSaturated(), GCell::isValid(), and GCell::updateDensity().
Referenced by GCell::updateDensity().
bool checkEdgeSaturation (size_t  hreserved, size_t  vreserved) const

Returns:
true  if the Up/Right edge is over the threshold .
Check if the number of AutoSegments crossing the Up & Right edges of the GCell exceed threshold . The thresold  must be expressed as a percentage of the full capacity of the edges. The overload is computed as a whole and not depth by depth. 
References GCell::getGCellGrid(), GCellGrid::getHEdgeCapacity(), GCell::getRight(), GCell::getUp(), GCellGrid::getVEdgeCapacity(), AutoSegment::isLocal(), and Session::lookup().
void addBlockage (unsigned int  depth, DbU::Unit  length)
Adds length  of wire blockage to layer depth . 
References DbU::getValueString().
void addHSegment (AutoSegment *  segment)[inline]
Adds segment  to the list of horizontal feedthroughs. 
Referenced by AutoHorizontal::_postCreate(), AutoVertical::moveULeft(), and AutoVertical::moveURight().
void addVSegment (AutoSegment *  segment)[inline]
Adds segment  to the list of vertical feedthroughs. 
Referenced by AutoVertical::_postCreate(), AutoHorizontal::moveULeft(), and AutoHorizontal::moveURight().
void addContact (AutoContact *  contact)[inline]
Adds contact  to the list of contacts owned by this GCell. 
Referenced by AutoContact::setGCell().
void removeVSegment (AutoSegment *  segment)
Removes segment  to the list of vertical feedthroughs. 
Referenced by AutoVertical::_makeDogleg(), AutoVertical::_preDestroy(), AutoHorizontal::moveULeft(), and AutoHorizontal::moveURight().
void removeHSegment (AutoSegment *  segment)
Removes segment  to the list of horizontal feedthroughs. 
Referenced by AutoHorizontal::_makeDogleg(), AutoHorizontal::_preDestroy(), AutoVertical::moveULeft(), and AutoVertical::moveURight().
void removeContact (AutoContact *  contact)
Removes contact  to the list of contacts owned by this GCell. 
References AutoContact::base().
void updateContacts ()
Force a geometry update on all the AutoContact of the GCell. 
size_t updateDensity ()
Returns:  true  if the GCell is saturated.
Update the various densities of the GCell. No actual computation is performed if the GCell is not  invalidated. 
References GCell::checkDensity(), GCell::getHCapacity(), Box::getHeight(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), GCell::getVCapacity(), Box::getWidth(), Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), GCell::isSaturated(), GCell::isValid(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
Referenced by GCell::checkDensity(), GCell::getCDensity(), GCell::getDensity(), GCell::getFeedthroughs(), GCell::getFragmentation(), GCell::getGlobalsCount(), GCell::getWDensity(), GCell::hasFreeTrack(), GCell::isAboveDensity(), GCell::stepDesaturate(), and GCell::stepNetDesaturate().
void updateKey (unsigned int  depth)[inline]
Update the GCell key with the new density at layer depth .
See also:
GCell Sorting Key. 
References GCell::Key::update().
bool rpDesaturate (set< Net *> &  nets)
If the number of RoutingPad in the first routing layer exceed the Session::getSaturateRp() threshold, force a desaturation of layer depth  1 until it is below 0.5.
See also:
GCell Desaturation / Layer Assignment 
References Session::getRoutingLayer(), GCell::getRoutingPads(), Session::getSaturateRp(), Katabatic::KbForceMove, and GCell::stepDesaturate().
bool stepDesaturate (unsigned int  depth, set< Net *> &  globalNets, AutoSegment *&  moved, unsigned int  flags = 0)

Parameters:
depth 	The depth to desaturate. 	
globalNets 	The set of Nets of which at least one segment has been moved up. 	
moved 	The moved up AutoSegment. 	
flags 	If KbForceMove is set, force one AutoSegment to move up, event if the GCell is not saturated in the relevant depth.	
Returns:  true  if an AutoSegment has actually been moved up.
Perform the atomic desaturation, that is move up one AutoSegment from layer depth  to layer depth+2 , longuests AutoSegments are moved first. Only global feedthrough AutoSegments are candidates to be moved up. The Net owning the moved up segment is added to the globalNets  set. If the GCell is not saturated on layer depth , nothing is done. If the forced  flag is set, one global AutoSegment is moved up regardless of the saturation status.
See also:
GCell Desaturation / Layer Assignment 
References GCell::getIndex(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), GCell::isSaturated(), Katabatic::KbForceMove, Katabatic::KbHorizontal, Katabatic::KbVertical, and GCell::updateDensity().
Referenced by GCell::rpDesaturate().
bool stepNetDesaturate (unsigned int  depth, set< Net *> &  globalNets, GCell::SetIndex &  invalidateds)

Parameters:
depth 	The depth to desaturate. 	
globalNets 	The set of Nets of which at least one segment has been moved up. 	
invalidateds 	The set of GCell ids that have been invalidateds.	
Returns:  true  if a Net has been moved up.
Perform a desaturation by whole Net trunk. Select the longest feedthrough AutoSegment in layer depth , then attempt to move up the whole Net (all it's global AutoSegments are moved up).
See also:
GCell Desaturation / Layer Assignment 
References GCell::getGCellGrid(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), Katabatic::KbHorizontal, Katabatic::KbVertical, and GCell::updateDensity().

The documentation for this class was generated from the following files:
GCell.h
GCell.cpp
GCell.dox

GCellDensitySet Class Reference

GCell Set, sorted by density. 
Public Member Functions
GCellDensitySet (unsigned int depth)
GCellDensitySet (unsigned int depth, const std::vector< GCell *> &)
~GCellDensitySet ()
bool empty () const
size_t size () const
const std::set< GCell *, GCell::CompareByKey > & getGCells () const
void insert (GCell *)
void erase (GCell *)
void unqueue (GCell *)
void requeue ()

Detailed Description
GCell Set, sorted by density. 
A small container helper to manage a set of GCell sorted by density on a specific layer depth .
The helper is implemented in term of a set. Once inserted in a set an element must not have is sorting key changed. But GCell density may change due to AutoSegment modifications during the lifetime of the set. To circumvent this problem, the GCell provide a key attribute to be used specifically with GCellDensitySet. This key act as a cached copy of the GCell density which is updated only  by a call to GCell::updateKey() (and not  GCell::updateDensity()). GCell which density have changed and key has to be updated must be signaled to set with the GCellDensityQueue::unqueue() method. When we want to update the sorting of the set on the new densities, we call GCellDensitySet::requeue() which, for each invalidated GCell do:
Remove the GCell from the set.
Update the key (call GCell::updateKey()).
Reinsert the GCell in the set (thus with the updated key).
Typical usage: 
GCellDensitySet gcells ( 2, *(getGCellGrid()->getGCellVector()) );

while ( true ) {
    bool optimized = false;

    std::set<GCell*,GCell::CompareByKey>::const_iterator igcell = gcells.getGCells().begin();
    for ( ; igcell != gcells.getGCells().end() ; ++igcell ) {
        if ( doSomeOptimization(*igcell) ) {
          optimized = true;
          gcells.unqueue( *igcell );
        }
    }

    if (not optimized) break;

    gcells.requeue();
}

Constructor & Destructor Documentation
GCellDensitySet (unsigned int  depth)
Create a new empty GCellDensitySet, sorting on density of layer depth . 
GCellDensitySet (unsigned int  depth, const std::vector< GCell *> &  gcells)
Create a new empty GCellDensitySet, sorting on density of layer depth . Load the queue with the GCells supplied in the gcells  vector. 
References GCellDensitySet::requeue().
~GCellDensitySet ()
Delete a GCellDensitySet, if the queue is not empty, issue a warning. 

Member Function Documentation
bool empty () const[inline]
Returns:  true  if the queue is empty. 
size_t size () const[inline]
Returns:  the numbers of elements in the queue. 
const std::set< GCell *, GCell::CompareByKey > & getGCells () const[inline]
Returns:  the list of GCells currently in the queue. 
size_t insert (GCell *  gcell)[inline]
Insert gcell  into the set. 
size_t erase (GCell *  gcell)[inline]
Remove gcell  from the set. 
void unqueue (GCell *  gcell)[inline]
Invalidate gcell . The density of gcell  may have changed and needs to be reinserted into the queue. It is temporarily set asides until the next call to GCellDensitySet::requeue(). 
void requeue ()
Reinsert in the queue all the GCells that have been previously invalidated by a call to GCellDensitySet::unqueue(). This function calls GCell::updateKey() before reinserting the GCell. 
Referenced by GCellDensitySet::GCellDensitySet().

The documentation for this class was generated from the following files:
GCell.h
GCell.cpp
GCell.dox

GCellGrid Class Reference

GCell Grid. 
Inheritance diagram for GCellGrid:
IMAGE

Public Types
enum DensityMode { AverageHVDensity =1, AverageHDensity =2, AverageVDensity =3, MaxHVDensity =4, MaxVDensity =5, MaxHDensity =6, MaxDensity =7 }
Public Member Functions
Cell * getCell () const
KatabaticEngine * getKatabatic () const
unsigned int getDensityMode () const
size_t getHEdgeCapacity () const
size_t getVEdgeCapacity () const
Interval getUSide (unsigned int) const
size_t checkDensity () const
size_t updateDensity ()
void updateContacts (unsigned int flags=KbOpenSession)
void setDensityMode (unsigned int)
Protected Member Functions
void _postCreate ()
void _preDestroy ()
Static Protected Member Functions
static GCellGrid * create (KatabaticEngine *)

Detailed Description
GCell Grid. 
The GCell Grid of Katabatic. Although the base template class Grid support irregular grid, the GCellGrid is regular, following the Knik global router GCells. Only the topmost row and leftmost column may have different height or width to cope with the design real size.
Due to the regular nature of the grid, the horizontal & vertical edges capacities are all identical, and initialized from the Katabatic Configuration.
The grid is build from the Knik global routing, so obviously a KnikEngine must be attached to the Cell when building the GCellGrid. An error is thrown otherwise. 

Member Enumeration Documentation
enum DensityMode
Various ways of computing the overall density of a GCell. 

Enumerator:
AverageHVDensity	The average density all depths accounted. 
	
AverageHDensity	The average density of horizontal layers. 
	
AverageVDensity	The average density of horizontal layers. 
	
MaxHVDensity	The maximum of the average horizontal & vertical densities taken as a whole. 
	
MaxVDensity	The maximum of the average vertical densities taken depth by depth. 
	
MaxHDensity	The maximum of the average horizontal densities taken depth by depth. 
	
MaxDensity	The maximum of the average horizontal & vertical densities taken depth by depth. 

Member Function Documentation
Cell * getCell () const
Returns:  The associated Cell. 
Referenced by GCellGrid::_postCreate().
KatabaticEngine * getKatabatic () const[inline]
Returns:  The associated KatabaticEngine. 
unsigned int getDensityMode () const[inline]
Returns:  The computation mode of the GCell densities. 
Referenced by GCell::getDensity().
size_t getHEdgeCapacity () const[inline]
Returns:  The horizontal edge capacity. As the matrix is regular it is identical for all horizontal edges. 
Referenced by GCell::checkEdgeSaturation().
size_t getVEdgeCapacity () const[inline]
Returns:  The vertical edge capacity. As the matrix is regular it is identical for all vertical edges. 
Referenced by GCell::checkEdgeSaturation().
Interval getUSide (unsigned int  direction) const
Returns:  The side of the whole grid in direction . 
References Box::getXMax(), Box::getXMin(), Box::getYMax(), Box::getYMin(), Katabatic::KbHorizontal, and Katabatic::KbVertical.
size_t checkDensity () const
Returns:  The number of GCell saturateds.
Check all GCells for saturations. 
References Grid< GCell >::getGCells().
size_t updateDensity ()
Returns:  The number of GCell saturateds.
Force a density update on all the GCells. 
References Grid< GCell >::getGCells().
void updateContacts (unsigned int  flags = KbOpenSession)
Force an update on all AutoContact on all the GCells. if openSession  is true , enclose the update in a Session. 
References Session::close(), Grid< GCell >::getGCells(), Katabatic::KbOpenSession, and Session::open().
Referenced by KatabaticEngine::refresh().
void setDensityMode (unsigned int  mode)[inline]
Sets the density computation mode. 
void _postCreate ()[protected], [virtual]
Perform the GCell & GCell vector allocation.
Read the horizontal and vertical cut lines from Knik and translate them into BaseGrid::Axis.
From the BaseGrid::Axis, deduces the exact positions of the GCells and allocate them.
The GCell allocation is done in a "row by row" fashion consistent with BaseGrid implicit assumptions. 
Reimplemented from BaseGrid (p.pagenum).
References BaseGrid::Axis::addGraduation(), GCellGrid::getCell(), BaseGrid::getColumns(), BaseGrid::getRows(), BaseGrid::Axis::getSize(), and BaseGrid::Axis::sort().
void _preDestroy ()[protected], [virtual]
The GCells are deleted at this point. 
Reimplemented from BaseGrid (p.pagenum).
GCellGrid * create (KatabaticEngine *  ktbt)[static], [protected]
API-space contructor. 
References grid().
Referenced by KatabaticEngine::createDetailedGrid().

The documentation for this class was generated from the following files:
GCellGrid.h
GCellGrid.cpp
GCellGrid.dox

GCellTopology Class Reference

Build the wiring for a Net inside a GCell (internal ). 
Static Public Member Functions
static void doRp_AutoContacts (GCell *, Component *, AutoContact *&source, AutoContact *&target, unsigned int flags)
static AutoContact * doRp_Access (GCell *, Component *, unsigned int flags)
static AutoContact * doRp_AccessPad (RoutingPad *, unsigned int flags)
static void doRp_StairCaseH (GCell *, Component *rp1, Component *rp2)
static void doRp_StairCaseV (GCell *, Component *rp1, Component *rp2)
Private Member Functions
void _do_xG ()
void _do_xG_1Pad ()
void _do_1G_1M1 ()
void _do_1G_xM1 ()
void _do_xG_xM1_xM3 ()
void _do_xG_1M1_1M2 ()
void _do_xG_xM2 ()
void _do_1G_1M3 ()
void _do_xG_xM3 ()

Detailed Description
Build the wiring for a Net inside a GCell (internal ). 
As this class is called to initially construct the Katabatic wiring, it must build a connex  wiring. That is without gaps in layer depth, because the topology restauration mechanism (AutoContact::updateTopology()) of the AutoContact cannot work until all AutoSegments are revalidated at least once. The topology restauration work by creating doglegs which in turn, call the canonization, which needs all the caches to be up to date. 

The documentation for this class was generated from the following file:
LoadGrByNet.cpp

Grid< GCellT > Class Template Reference

Template Class for Regular Grid. 
Inheritance diagram for Grid< GCellT >:
IMAGE

Public Member Functions
GCellT * getGCell (unsigned int index) const
GCellT * getGCell (const Point p) const
GCellT * getGCell (const Point p1, const Point p2) const
GCellT * getGCellLeft (const GCellT *gcell) const
GCellT * getGCellRight (const GCellT *gcell) const
GCellT * getGCellUp (const GCellT *gcell) const
GCellT * getGCellDown (const GCellT *gcell) const
GenericCollection< GCellT * > getGCells ()
GenericCollection< GCellT * > getGCellsColumn (unsigned int column, unsigned int rowStart, unsigned int rowStop)
GenericCollection< GCellT * > getGCellsRow (unsigned int row, unsigned int columnStart, unsigned int columnStop)
Protected Member Functions
Grid (const Box &)

Detailed Description
template<typename GCellT>
class Katabatic::Grid< GCellT >
Template Class for Regular Grid. 
Contains all general purpose methods depending on the GCell type and geometrical computations. The internal storage is still not implemented in this class. 

Constructor & Destructor Documentation
Grid (const Box &  bb)[inline], [protected]
Grid constructor. 

Member Function Documentation
CGellT * getGCell (unsigned int  index) const[inline]
Returns:  The grid object at linear index index  in the vector. If index  is out of bounds, return NULL . 
Referenced by GCellTopology::doRp_AccessPad(), GCellTopology::doRp_AutoContacts(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
CGellT * getGCell (const Point  p) const[inline]
Returns:  The grid object which is under position p . 
CGellT * getGCell (const Point  p1, const Point  p2) const[inline]
Returns:  The grid object which is under position p1  and p2 . Not very clear though. 
CGellT * getGCellLeft (const GCellT *  gcell) const[inline]
Returns:  The left neighbor of gcell , NULL  if it is the leftmost one. 
Referenced by GCell::getLeft().
CGellT * getGCellRight (const GCellT *  gcell) const[inline]
Returns:  The rigth neighbor of gcell , NULL  if it is the rightmost one. 
Referenced by GCell::getRight().
CGellT * getGCellUp (const GCellT *  gcell) const[inline]
Returns:  The upper neighbor of gcell , NULL  if it is the uppermost one. 
Referenced by GCell::getUp().
CGellT * getGCellDown (const GCellT *  gcell) const[inline]
Returns:  The down neighbor of gcell , NULL  if it is the downmost one. 
Referenced by GCell::getDown().
GenericCollection< CGellT * > getGCells ()[inline]
Returns:  A GCellT Hurricane collection built upon the linear GCellT vector of the grid. 
GenericCollection< CGellT * > getGCellsColumn (unsigned int  column, unsigned int  rowStart, unsigned int  rowStop)[inline]
Returns:  A GCellT Hurricane collection that contains the part of column  starting from rowStart  to rowStop  inclusive. 
Referenced by KatabaticEngine::createDetailedGrid().
GenericCollection< CGellT * > getGCellsRow (unsigned int  row, unsigned int  columnStart, unsigned int  columnStop)[inline]
Returns:  A GCellT Hurricane collection that contains the part of row  starting from columnStart  to columnStop  inclusive. 
Referenced by KatabaticEngine::createDetailedGrid().

The documentation for this class was generated from the following files:
Grid.h
Grid.dox

KatabaticEngine Class Reference

The Katabatic Tool. 
Inheritance diagram for KatabaticEngine:
IMAGE

Public Types
typedef set< Net *, NetCompareByName > NetSet
Public Member Functions
bool isGMetal (const Layer *) const
bool isChip () const
bool isInDemoMode () const
bool doWarnOnGCellOverload () const
bool doDestroyBaseContact () const
bool doDestroyBaseSegment () const
bool doDestroyTool () const
virtual const Name & getName () const
EngineState getState () const
unsigned int getFlags (unsigned int mask) const
Configuration * getKatabaticConfiguration ()
virtual Configuration * getConfiguration ()
RoutingGauge * getRoutingGauge () const
RoutingLayerGauge * getLayerGauge (size_t depth) const
const Layer * getRoutingLayer (size_t depth) const
Layer * getContactLayer (size_t depth) const
GCellGrid * getGCellGrid () const
const NetSet & getRoutingNets () const
DbU::Unit getGlobalThreshold () const
float getSaturateRatio () const
size_t getSaturateRp () const
DbU::Unit getExtensionCap () const
const ChipTools & getChipTools () const
void xmlWriteGCellGrid (ostream &)
void xmlWriteGCellGrid (const string &)
void setState (EngineState state)
void setFlags (unsigned int)
void unsetFlags (unsigned int)
void setGlobalThreshold (DbU::Unit)
void setSaturateRatio (float)
void setSaturateRp (size_t)
void printMeasures (const string &) const
void refresh (unsigned int flags=KbOpenSession)
virtual void createDetailedGrid ()
void makePowerRails ()
virtual void loadGlobalRouting (unsigned int method)
void slackenBorder (Box bb, Layer::Mask, unsigned int flags)
void slackenBlockIos (Instance *core)
bool moveUpNetTrunk (AutoSegment *, set< Net *> &globalNets, GCell::SetIndex &invalidateds)
void layerAssign (unsigned int method)
void computeNetConstraints (Net *)
void toOptimals (Net *)
virtual void finalizeLayout ()
Static Public Member Functions
static KatabaticEngine * create (Cell *)
static const Name & staticGetName ()

Detailed Description
The Katabatic Tool. 

States of KatabaticEngine
During it's lifecycle, the engine go through a serie of states. It only can go forward between states.
EngineCreation  : just after C++ object creation until the global routing is loaded.
EngineGlobalLoaded  : after  the global routing has been done. This state must be set by an external tool, Katabatic cannot know by itself when the global routing has been done (see Kite).
EngineActive  : after  the global routing has been converted into the Katabatic data structure. At this point the tool is ready to run.
EngineDriving  : during  the stage of stripping all the decorations the tool has added over the Hurricane data structure (mostly: AutoContact & AutoSegment).
EngineGutted  : after  the tool decorations have been removed. The tool is now useless and can only be destroyed.
EnginePreDestroying  : this special state is reached when going straight from EngineActive to the destructor, that is, skipping the EngineDriving state. That means we do not  want to save whatever routing has been done. In that case, not only the tool decorations are destroyeds, but also the Hurricane data-structures they relies on (Contact, Segments).

KatabaticEngine Implementation Details
Due to the size of the code and the fact that the main body of some methods do not need to be present in the class, the implementation of KatabaticEngine is split in several files. The list below summarize them:
KatabaticEngine.cpp  : the core of the class, methods that really need their bodies here.
PowerRails.cpp  : utilities to construct an abstract from all the power rails through the hierarchy.
LayerAssign.cpp  : layer assignement related methods and helpers.
LoadGrByNet.cpp  : global routing loader, transform global routing into Katabatic data-structure.
NetConstraints.cpp  : compute the topological constraints of all AutoSegment/AutoContact of a Net.
NetOptimals.cpp  : compute the optimal positions of all AutoSegment of a Net. 

Member Typedef Documentation
set< Net *, NetCompareByName > NetSet
Set of Net to be routed, alphabetically sorteds. 

Member Function Documentation
KatabaticEngine * create (Cell *  cell)[static]
Create a KatabaticEngine on cell . 
const Name & staticGetName ()[static]
Returns:  The unique string identifier for the KatabaticEngine class of ToolEngine. 
bool isGMetal (const Layer *  layer) const[inline]
Returns:  true  if layer  is one of the special (fake) metals used to build the global routing. 
Referenced by AutoSegment::create().
bool isChip () const[inline]
Returns:  true  if the hierarchy top-level of the Cell matches the one of a complete design (i.e. pads and one core instance). 
References ChipTools::isChip().
bool isInDemoMode () const[inline]
Returns:  true  if the tool is in demo mode, that is suppress almost all warning and debug messages. 
Referenced by Session::isInDemoMode().
bool doWarnOnGCellOverload () const[inline]
Returns:  true  if the tool should issue a warning when a GCell is overloaded (overload could be transient). 
Referenced by Session::doWarnGCellOverload().
bool doDestroyBaseContact () const[inline]
Returns:  true  if the EngineDestroyBaseContact is set, meaning that when an AutoContact is destroyed, the Contact it decorates is destroyed altogether. 
bool doDestroyBaseSegment () const[inline]
Returns:  true  if the EngineDestroyBaseSegment is set, meaning that when an AutoSegment is destroyed, the Segment it decorates is destroyed altogether. 
bool doDestroyTool () const[inline]
Returns:  true  if the tool state is beyond EngineStateGutted, that is, only waits for destroy()  to be called. 
References Katabatic::EngineGutted.
const Name & getName () const[virtual]
Returns:  The unique string identifier for the KatabaticEngine class of ToolEngine. 
Implements ToolEngine.
EngineState getState () const[inline]
Returns:  The state the tool is currently in. 
unsigned int getFlags (unsigned int  mask) const[inline]
Returns:  The anded  combination of the tool flags and mask . 
Configuration * getKatabaticConfiguration ()[inline]
Returns:  The Configuration of Katabatic. In this class it is redundant with getConfiguration(), but may be useful in derived classes. 
Configuration * getConfiguration ()[virtual]
Returns:  The Configuration of the current ToolEngine. 
RoutingGauge * getRoutingGauge () const[inline]
Returns:  The RoutingGauge (Configuration shortcut). 
RoutingLayerGauge * getLayerGauge (size_t  depth) const[inline]
Returns:  The RoutingLayerGauge associated to depth  (Configuration shortcut). 
const Layer * getRoutingLayer (size_t  depth) const[inline]
Returns:  The routing Layer associated to depth  (Configuration shortcut). 
Layer * getContactLayer (size_t  depth) const[inline]
Returns:  The contact Layer associated to depth  (Configuration shortcut). 
GCellGrid * getGCellGrid () const[inline]
Returns:  The GCellGrid. 
Referenced by GCellTopology::doRp_AccessPad(), GCellTopology::doRp_AutoContacts(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
const NetSet & getRoutingNets () const[inline]
Returns:  The set of nets to be routeds. 
DbU::Unit getGlobalThreshold () const[inline]
Returns:  The length above which a global wire is moved up in the layer assignment stage (Configuration shortcut). 
float getSaturateRatio () const[inline]
Returns:  The ratio above which a GCell is considered to be saturated (Configuration shortcut). 
Referenced by Session::getSaturateRatio().
size_t getSaturateRp () const[inline]
Returns:  The number of RoutingPad above which a GCell is saturated, causing extras global segments to be moved up. (Configuration shortcut). 
Referenced by Session::getSaturateRp().
DbU::Unit getExtensionCap () const[inline]
Returns:  The wires extension cap, same for all layers for the time beeing (Configuration shortcut). 
const ChipTools & getChipTools () const[inline]
Returns:  The chip tools (for whole designs). 
Referenced by KatabaticEngine::createDetailedGrid().
void xmlWriteGCellGrid (ostream &  o)
Write in a stream all informations on the GCells in XML format. 
Referenced by KatabaticEngine::xmlWriteGCellGrid().
void xmlWriteGCellGrid (const string &  fileName)
Write in a file all informations on the GCells in XML format. 
References KatabaticEngine::xmlWriteGCellGrid().
void setState (EngineState  state)[inline]
Force the state of the tool. Must be used with caution, as no sanity checks are performeds. This method is normally invoked from inside the KatabaticEngine various methods. 
void setFlags (unsigned int  flags)[inline]
Set the flags given in flags . 
Referenced by Session::setKatabaticFlags().
void unsetFlags (unsigned int  flags)[inline]
Reset the flags given in flags . 
void setGlobalThreshold (DbU::Unit  threshold)[inline]
(Configuration shortcut). 
void setSaturateRatio (float  ratio)[inline]
(Configuration shortcut). 
void setSaturateRp (size_t  threshold)[inline]
(Configuration shortcut). 
void printMeasures (const string &  tag) const
Print memory & time measurement on ``cmess1``. If tag  is not empty, also adds the measurement to the internal table (with tag  as label). 
Referenced by KatabaticEngine::finalizeLayout().
void refresh (unsigned int  flags = KbOpenSession)
In case the tool is associated with a graphic display, trigger a full redraw of the Cell. Slow the router but allow to see work in progress... If flags  do not  contains KbOpenSession  the refresh operation will not be enclosed inside it's own session. This assumes that a session is already opened. 
References GCellGrid::updateContacts().
void createDetailedGrid ()[virtual]
Allocate the GCellGrid. 
References GCellGrid::create(), KatabaticEngine::getChipTools(), BaseGrid::getColumns(), Grid< GCellT >::getGCellsColumn(), Grid< GCellT >::getGCellsRow(), BaseGrid::getRows(), ChipTools::isChip(), and Session::revalidate().
void makePowerRails ()
Detect all the aligned segments of same width that compose power rails, unificate them and copy them at the design top level. 
void loadGlobalRouting (unsigned int  method)[virtual]

Parameters:
method 	the loading algorithm 	
nets 	the set of nets to route.	
Convert the global routing into the initial detailed routing. For the time beeing, only one loading algorithm is available: net by net  (EngineLoadGrByNet). Only Net given in nets  are routeds. If nets  is empty then all ordinary nets are routeds. In either cases the set of nets to route is pruned from any power, ground or clock signals.
Remark: The tool state must be EngineGlobalLoaded  before  calling this method
and will be set to EngineActive  on exit. 
References Katabatic::EngineActive, and Katabatic::EngineGlobalLoaded.
void slackenBorder (Box  bb, Layer::Mask  mask, unsigned int  flags)

Parameters:
bb 	The bounding box, defines the edges. 	
mask 	Consider only layers that are fully included in that mask. 	
flags 	Consider only segment in that direction.	
Perform a preventive break on all global segments going through the vertical  left and right edges of the bb  box. The set of global segments to be broken could be further restricted using mask  and flags .
The Semantic of flags  is not clear, must review the code more closely. 
References Box::getXMax(), Box::getXMin(), Box::getYMax(), and Box::getYMin().
void slackenBlockIos (Instance *  core)
Perform a preventive break on horizontal segments in the GCell immediatly outside  the instance core  area in the routing layer of index 1 .
This method is too much hardwired to the SxLib  gauge. It's effect is to break all METAL2  outside the core (in a chip). 
References Entity::getBoundingBox(), Instance::getName(), Constant::Horizontal, and Box::inflate().
bool moveUpNetTrunk (AutoSegment *  seed, set< Net *> &  globalNets, GCell::SetIndex &  invalidateds)

Parameters:
seed 	The AutoSegment to take the net from. 	
globalNets 	The set of nets that has been moved up. 	
invalidateds 	The set of GCells that have been invalidated. Returns:  true  if the net trunk have been moved up.	
Try to move up a whole net trunk. The net is supplied through the seed  argument (the segment that triggers the move). If the net is actually moved up, it is added to globalNets  and all GCells that have been invalidateds are added to invalidateds .
An individual AutoSegment of the net is moved up if it's length is greater that 150  lambdas, that is, three times the side of a GCell. This is hard-wired and should be parametrized in the future. 
void layerAssign (unsigned int  method)
Perform the layer assignment. The global routing loading stage uses only the two bottom most layers, this method spread them on all the availables routing layers, according to GCell and RoutingPad density criterions.
Two algorithms are availables:
EngineLayerAssignByLength  : the global wires are moved up one by one.
EngineLayerAssignByTrunk  : if one global wire of a net is to be moved up, then all the global trunk of the net is moved along. This methods gives the best results for now. 
void computeNetConstraints (Net *  net)
Compute the box constraints on AutoContacts (and therefore those applied to AutoSegments). Constraints comes from AutoContacts anchoreds on RoutingPads and transmitted through AutoContactHTee or AutoContactVTee. Constraints are applied to all AutoContacts of an aligned set.
Remark: The net  must have been canonized before this function to be called. 

void toOptimals (Net *  net)
Move all AutoSegment of net  so that their axis are inside their optimals interval. If a AutoSegment is already inside the interval is not moved, otherwise it is put on the nearest bound of the optimal interval. 
void finalizeLayout ()[virtual]
Transform the Katabatic wires into the Hurricane data-structure. Mostly by removing the AutoSegment/AutoContact without  removing their Hurricane conterparts. May also fill gaps that may have appeared.
Remark: The tool state must be EngineActive  before  calling this method
and will be set to EngineGutted  on exit. 
References Katabatic::EngineDriving, Katabatic::EngineGutted, and KatabaticEngine::printMeasures().

The documentation for this class was generated from the following files:
KatabaticEngine.h
ChipTools.cpp
LoadGrByNet.cpp
KatabaticEngine.cpp
KatabaticEngine.dox

GCell::Key Class Reference

GCell Key - Density Cache. 
Public Member Functions
Key (GCell *, unsigned int depth)
float getDensity () const
GCell * getGCell () const
void update (unsigned int depth)

Detailed Description
GCell Key - Density Cache. 
This class is used to create a GCell internal cache on density, mainly to be used by GCellDensitySet. 

Constructor & Destructor Documentation
Key (GCell *  owner, unsigned int  depth)[inline]

Parameters:
owner 	The GCell owning the key. 	
depth 	The layer depth  of the density to use.	
Key constructor, with an initial value for the cached density. 

Member Function Documentation
float getDensity () const[inline]
Returns:  The value of the cached density. 
GCell * getGCell () const[inline]
Returns:  The owning GCell. 
void update (unsigned int  depth)[inline]
Returns:  Update the density 
Referenced by GCell::updateKey().

The documentation for this class was generated from the following files:
GCell.h
GCell.dox

LocatorHelper Class Reference

Locator Helper Collection's Locators. 
Public Member Functions
LocatorHelper (AutoContact *, unsigned int flags=0)
bool isValid () const
AutoSegment * getSegment () const
void progress ()

Detailed Description
Locator Helper Collection's Locators. 
Provide a small uniform walktough over the AutoSegments anchored on AutoContacts. The flags  argument allows to choose between direction and include perpandiculars (in that case all segments are processeds).
Implementation Details
As, at most, two horizontals and two verticals may be anchored on any AutoContact subtype, the locator helper perform a walk through a virtual table of 4 elements. The two first are the horizontals, the two last the verticals. The meaning of this index is consistent whith the index  argument of AutoContact::getSegment(). When a segment is not present in an AutoContact, the getSegment()  returns NULL  and the LocatorHelper::progress() function will skip it.
The private methods:
LocatorHelper::_min()  
LocatorHelper::_max()  
Computes the bounds of _index  according to the value of _flags:  
KbHorizontal  : 0  to less than 2 .
KbVertical  : 2  to less than 4 .
KbHorizontal|KbVertical  : 0  to less than 4 . 

Constructor & Destructor Documentation
LocatorHelper (AutoContact *  contact, unsigned int  flags = 0)[inline]
Create a helper to iterate over the AutoSegments anchored on contact . The flags  arguments allow to select:
The direction: Katabatic::KbHorizontal or Katabatic::KbVertical.
Perpandicular inclusion: Katabatic::KbWithPerpands.
When setting KbWithPerpands, all the segments will be iterated over. It may seems a somewhat contorted way of doing things, the reason is the ability to share (an pass) flags directly between different functions. 
References AutoContact::getSegment(), and LocatorHelper::progress().

Member Function Documentation
bool isValid () const[inline]
Returns:  true  if there is an AutoSegment to be processed. 
AutoSegment * getSegment () const[inline]
Returns:  The current AutoSegment. NULL  if the loop is over. 
References AutoContact::getSegment().
void progress ()[inline]
Returns:  Go to the next AutoSegment. 
References AutoContact::getSegment().
Referenced by LocatorHelper::LocatorHelper().

The documentation for this class was generated from the following files:
AutoContact.h
AutoContact.dox

Observable Class Reference

Observer Design Pattern, Subject part. 
Public Member Functions
Observable ()
template<typename T > T * getObserver ()
void addObserver (BaseObserver *)
void removeObserver (BaseObserver *)
void notify (unsigned int flags)

Detailed Description
Observer Design Pattern, Subject part. 
Observable is the implementation of the subject  part of the Observer design pattern. For the time beeing it's a simplificated version that allows only one Observer to watch the subject.
Observable is designed to be an attribute of the subject, not one of it's base class.
This implantation is completly generic and has nothing specific to Katabatic. It may be moved sometimes in Hurricane at Property level in Hurricane::DBo.
Note to Myself:  Observer pattern is the one behind signal/slots. 

Constructor & Destructor Documentation
Observable ()[inline]
Default and only constructor. The copy constructor is disabled (made private and unimplemented). 

Member Function Documentation
T * getObserver ()[inline]
Returns:  The (only) observer, NULL  if there is none. It is the object of which the Observer is an attribute, that is, it's owner , and not the Observer itself which is returned. 
void addObserver (BaseObserver *  observer)[inline]
Adds an observer. If more than one is added, throw an error. 
void removeObserver (BaseObserver *  observer)[inline]
Removes an observer. If the observer do not belong to this observable, throw an exception. 
void notify (unsigned int  flags)[inline]
Used by the subject to signal a change in it's state to the observers. The flags  parameter can be used to indicates what kind of change is occuring. Values for flags  are defined between the subject and the observers. 
References BaseObserver::notify().
Referenced by AutoSegment::_invalidate(), AutoSegment::_postCreate(), AutoSegment::_preDestroy(), and AutoSegment::revalidate().

The documentation for this class was generated from the following files:
Observer.h
Observer.dox

Observer< T > Class Template Reference

Observer Design Pattern, Observer part. 
Inheritance diagram for Observer< T >:
IMAGE

Public Member Functions
Observer (const T *owner)
T * getOwner () const

Detailed Description
template<typename T>
class Katabatic::Observer< T >
Observer Design Pattern, Observer part. 
First, a warning about names:  although this class is named Observer, it is intended to be an attribute nested inside the whole object which is indeed, the true Observer. This nesting object is called, most of the time the owner  in the following. But sometimes, for simplification it may also be called the Observer.
Observer Implementation Notes
To retrieve the owner  from the Observer attribute, we uses the offset from the attribute in the owner . This offset is computed once and for all the first time the template constructor is called. 

Constructor & Destructor Documentation
Observer (const T *  owner)[inline]
The owner of the oberver is needed to compute, on the first creation only, the offset of the Observer attribute inside the owner  complete object. 

Member Function Documentation
T * getOwner () const[inline]
Returns:  The owner of the observer. 

The documentation for this class was generated from the following files:
Observer.h
Observer.dox

Session Class Reference

Modification Session for Katabatic. 
Static Public Member Functions
static bool isInDemoMode ()
static bool doWarnGCellOverload ()
static Session * get (const char *message=NULL)
static Technology * getTechnology ()
static KatabaticEngine * getKatabatic ()
static const Configuration * getConfiguration ()
static float getSaturateRatio ()
static size_t getSaturateRp ()
static DbU::Unit getExtensionCap ()
static RoutingGauge * getRoutingGauge ()
static const Layer * getRoutingLayer (size_t)
static const Layer * getContactLayer (size_t)
static size_t getSegmentStackSize ()
static size_t getContactStackSize ()
static const vector< AutoSegment * > & getInvalidateds ()
static const vector< AutoSegment * > & getRevalidateds ()
static const vector< AutoSegment * > & getDoglegs ()
static const set< Net * > & getNetsModificateds ()
static Session * open (KatabaticEngine *)
static void close ()
static void setKatabaticFlags (unsigned int)
static void dogleg (AutoSegment *)
static void revalidateTopology ()
static void setInvalidateMask (unsigned int)
static void invalidate (Net *)
static void invalidate (AutoContact *)
static void invalidate (AutoSegment *)
static size_t revalidate ()
static void link (AutoContact *)
static void link (AutoSegment *)
static void unlink (AutoContact *)
static void unlink (AutoSegment *)
static AutoContact * lookup (Contact *)
static AutoSegment * lookup (Segment *)

Detailed Description
Modification Session for Katabatic. 
To perform modifications, the Katabatic data structure uses a session mechanism built on top of the Hurricane::UpdateSession one. Sessions obeys very simples rules:
Only one Session can be opened at a time with Session::open().
Subsequent calls to Session::open() returns the currently opened session until Session::close() is called.
Revalidation can take place whithout closing the Session by calling Session::revalidate().
The task of a Session is to keep track of the AutoContact and AutoSegment that have been modificateds (i.e. invalidated) and, to restore connexity and/or topology when closed.
Two kinds of revalidation could be performed: 
Geometrical  : only positions of AutoContacts and AutoSegments extensions are recomputed. 
Topological  : a whole net have been invalidated because of a dogleg creation or a move up/move down of a segment. 
Dogleg  : needs to insert the newly created AutoSegments and AutoContacts. 
Move up/Move down  : may needs to create additional dogleg to restore connexity (gaps), and then insert them like above. 
After a topological mofication has been done, the net needs to be re-canonized then the geometrical step takes place. 
The kind of revalidation needed is automatically detected by the Session.
In addition to it's main purpose, Session also provides cached access to frequently needed variables either from Hurricane or Katabatic Configuration and access to the AutoContact & AutoSegment LUTs of KatabaticEngine.
From a software point of view, Session is a singleton object.
Session Algorithm
Main attributes of a Session:
_netInvalidateds , nets on which topology has changed.
_autoSegments , that have been moved or createds.
_autoContacts , that have been created or one of their slave segment has moved.
_revalidateds , the list of AutoSegments that have just been revalidated (after calling revalidate() ).
Schematic description of how a Session works:

If at least one net has been invalidated, meaning that it's topology has changed, perform _revalidateTopology() . 
Update net topology: correct the topology of each contacts, making dogleg when needed. The AutoContact segment caching is updated at this point. 
Compute net constraints (on AutoContacts & AutoSegments). 
Compute net optimal positions (on AutoSegments). 
Compute the state of the segments regarding to terminals. 
Canonize sets of aligneds segments. The canonical segment is the one with the lowest id . 
If the segments has just been created, put it on its optimal axis. 
This stage can add itself more invalidated AutoSegments and AutoContacts as it create doglegs.

Revalidate geometry of AutoContacts. That is, expand or shrink the extremities of the invalidated AutoSegments. Note that AutoSegments are already at on their final axis position.

Revalidate AutoSegments. Just before this stage, they are on the correct axis and their extensions are also correct, so we may update the caching of their characteristics (mostly the extension). 

Member Function Documentation
bool isInDemoMode ()[static]
Katabatic shortcut. 
References KatabaticEngine::isInDemoMode().
Referenced by GCell::checkDensity().
bool doWarnGCellOverload ()[static]
Katabatic shortcut. 
References KatabaticEngine::doWarnOnGCellOverload().
Referenced by GCell::checkDensity().
Session * get (const char *  message = NULL)[static]
Return the Session singleton, if no session is currently open throw an exception carrying message . 
Technology * getTechnology ()[inline], [static]
Hurricane shortcut. 
KatabaticEngine * getKatabatic ()[inline], [static]
Katabatic shortcut. 
Referenced by AutoSegment::create(), GCellTopology::doRp_AccessPad(), GCellTopology::doRp_AutoContacts(), AutoSegment::makeDogleg(), and Session::open().
const Configuration * getConfiguration ()[inline], [static]
Katabatic shortcut. 
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::canMoveUp().
float getSaturateRatio ()[static]
Katabatic shortcut. 
References KatabaticEngine::getSaturateRatio().
Referenced by GCell::isSaturated().
size_t getSaturateRp ()[static]
Katabatic shortcut. 
References KatabaticEngine::getSaturateRp().
Referenced by GCell::rpDesaturate().
DbU::Unit getExtensionCap ()[static]
Katabatic shortcut. 
Referenced by AutoHorizontal::checkPositions(), AutoVertical::checkPositions(), AutoHorizontal::updatePositions(), and AutoVertical::updatePositions().
RoutingGauge * getRoutingGauge ()[inline], [static]
Katabatic shortcut. 
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), AutoHorizontal::canMoveULeft(), AutoVertical::canMoveULeft(), AutoSegment::canMoveUp(), AutoHorizontal::canMoveURight(), AutoVertical::canMoveURight(), AutoSegment::canPivotDown(), AutoSegment::canPivotUp(), GCell::checkDensity(), Session::getContactLayer(), Session::getRoutingLayer(), GCell::hasFreeTrack(), AutoSegment::makeDogleg(), anonymous_namespace{LoadGrByNet.cpp}::singleGCell(), GCell::stepDesaturate(), GCell::stepNetDesaturate(), GCell::updateDensity(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
const Layer * getRoutingLayer (size_t  depth)[inline], [static]
Katabatic shortcut. 
References Session::getRoutingGauge(), and RoutingGauge::getRoutingLayer().
Referenced by GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_xM1_xM3(), AutoSegment::create(), GCellTopology::doRp_AccessPad(), AutoSegment::reduceDoglegLayer(), and GCell::rpDesaturate().
const Layer * getContactLayer (size_t  depth)[inline], [static]
Katabatic shortcut. 
References RoutingGauge::getContactLayer(), and Session::getRoutingGauge().
Referenced by GCellTopology::_do_1G_1M3(), GCellTopology::_do_1G_xM1(), GCellTopology::_do_xG(), GCellTopology::_do_xG_1M1_1M2(), GCellTopology::_do_xG_1Pad(), GCellTopology::_do_xG_xM1_xM3(), GCellTopology::_do_xG_xM2(), GCellTopology::_do_xG_xM3(), GCellTopology::doRp_Access(), GCellTopology::doRp_AccessPad(), GCellTopology::doRp_AutoContacts(), GCellTopology::doRp_StairCaseH(), GCellTopology::doRp_StairCaseV(), and anonymous_namespace{LoadGrByNet.cpp}::singleGCell().
size_t getSegmentStackSize ()[inline], [static]
Returns:  The number of AutoSegment in the invalidated stack. 
size_t getContactStackSize ()[inline], [static]
Returns:  The number of AutoSegment in the invalidated stack. 
const vector< AutoSegment * > & getInvalidateds ()[inline], [static]
Returns:  The stack (vector) of invalidateds AutoSegments. 
const vector< AutoSegment * > & getRevalidateds ()[inline], [static]
Returns:  The stack (vector) of AutoSegments that have been revalidateds. 
const vector< AutoSegment * > & getDoglegs ()[inline], [static]
Returns:  The vector of AutoSegments part of a newly created dogleg. The dogleg creation functions in AutoHorizontal and AutoVertical put a triplet (for example in horizontal direction  (h1,v1,h2) ) for each dogleg composed of:
h1  the segment before  the dogleg (which is also the original one).
v1  the segment perpandicular  (new).
h2  the segment after  (new). 
Referenced by AutoSegment::makeDogleg().
const set< Net * > & getNetsModificateds ()[inline], [static]
Returns:  The set of Nets that needs either a topological update or a new canonization. 
Session * open (KatabaticEngine *  ktbt)[static]
Opens a new session or returns the already opened one, if any. 
References Session::getKatabatic().
Referenced by GCellGrid::updateContacts().
void close ()[static]
Close the Session, triggering the revalidation of the AutoSegemnts and AutoContacts. If no Session is opened, throws an execption. 
Referenced by GCellGrid::updateContacts().
void setKatabaticFlags (unsigned int  flags)[static]
Katabatic shortcut. 
References KatabaticEngine::setFlags().
void dogleg (AutoSegment *  autoSegment)[inline], [static]
Adds an AutoSegment to the dogleg vector. 
Referenced by AutoHorizontal::_makeDogleg(), and AutoVertical::_makeDogleg().
void revalidateTopology ()[inline], [static]
Revalidate Net that have been invalidateds and re-canonize them. 
void setInvalidateMask (unsigned int  flags)[inline], [static]
Tells what kind of revalidation must be performed. 
void invalidate (Net *  net)[inline], [static]
Schedule net  for a full revalidation, topological correction and canonization. 
Referenced by AutoSegment::_invalidate(), and AutoSegment::_postCreate().
void invalidate (AutoContact *  contact)[inline], [static]
Schedule contact  for revalidation. 
void invalidate (AutoSegment *  segment)[inline], [static]
Schedule segment  for revalidation. 
size_t revalidate ()[inline], [static]
Perform the revalidation. Returns the sum of AutoContacts and AutoSegemnts that have been revalidated. 
Referenced by KatabaticEngine::createDetailedGrid().
void link (AutoContact *  ac)[static]
Adds ac  in the AutoContact lookup table (allow to retrieve an AutoContact by it's base Contact). 
Referenced by AutoSegment::_postCreate().
void link (AutoSegment *  as)[static]
Adds as  in the AutoSegment lookup table (allow to retrieve an AutoSegment by it's base Segment). 
void unlink (AutoContact *  ac)[static]
Removes ac  from the AutoContact lookup table. 
Referenced by AutoSegment::_preDestroy().
void unlink (AutoSegment *  as)[static]
Removes as  from the AutoSegment lookup table. 
AutoContact * lookup (Contact *  contact)[static]
Lookup the AutoContact associated with contact . NULL  if not found. 
Referenced by AutoSegment::AutoSegment(), GCell::checkEdgeSaturation(), AutoSegment::create(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoSegment::getOppositeAnchor(), and AutoSegment::getPerpandicularsBound().
AutoSegment * lookup (Segment *  segment)[static]
Lookup the AutoSegment associated with segment . NULL  if not found. 

The documentation for this class was generated from the following files:
Session.h
Session.cpp
Session.dox

Index
INDEX