Routing Global Cell. More...
Inherits ExtensionGo.
Classes | |
class | CompareByDensity |
GCell Density Comparison Functor. More... | |
class | CompareByIndex |
GCell Index Comparison Functor. More... | |
class | Key |
GCell Key - Density Cache. More... | |
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 () |
Routing Global Cell.
Please note that there are two kind of Global Cells (or GCell for short):
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:
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.
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:
Then the density, is the ratio between and the actually used wirelength:
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:
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.
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 |
The number of track that can go through a GCell in the horizontal direction is computed as follow:
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.
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).
In order to perform a lexicographical sort on the tuple of a GCell, a specific slave object GCell::Key is introduced. It is the density on one specific depth, not the average density.
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 derives from Hurricane::ExtensionGo to allow a graphical rendering of the routing density.
typedef set< GCell *, CompareByIndex > SetIndex |
Shorthand for a set of GCell sorted on their index.
|
static |
Returns: The number of allocated GCells.
|
static |
Returns: The amount of shrink on the top and right boundaries.
|
static |
Returns: The name of the Go slice: "Katabatic::GCell"
.
|
virtual |
Returns: The name of the Go slice: "Katabatic::GCell"
.
Referenced by GCell::checkDensity().
|
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().
|
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().
|
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().
|
inline |
Returns: The depth (i.e. number of routing layers) of the GCell.
|
inline |
Returns: The linear index of the GCell in the GCellGrid vector.
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().
Required to exists as a Hurricane::Go derived class. But must never be used...
|
virtual |
Returns: The bounding box of the GCell, with the top right shrink applied.
Referenced by AutoSegment::AutoSegment(), AutoSegment::computeOptimal(), and AutoContactTerminal::getNativeConstraintBox().
|
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().
|
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().
|
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().
|
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 |
References Box::getHeight().
Referenced by GCell::hasFreeTrack(), and GCell::updateDensity().
float getVCapacity | ( | ) | const |
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().
|
inline |
Returns: The density of contacts.
Saturation & Density Computation, GCell Lazy Evaluation.
References GCell::isValid(), and GCell::updateDensity().
|
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().
|
inline |
Returns: The total length of blockage wire on layer at depth
.
|
inline |
Returns: The longest free fragment size on layer depth
(in percent).
References GCell::isValid(), and GCell::updateDensity().
Referenced by AutoSegment::canMoveUp().
|
inline |
Returns: The estimate number of occupied tracks on layer depth
.
References GCell::isValid(), and GCell::updateDensity().
|
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().
|
inline |
|
inline |
|
inline |
AutoSegments getHStartSegments | ( | ) |
References Katabatic::KbHorizontal, and Katabatic::KbSource.
Referenced by GCell::getStartSegments().
AutoSegments getVStartSegments | ( | ) |
References Katabatic::KbSource, and Katabatic::KbVertical.
Referenced by GCell::getStartSegments().
AutoSegments getHStopSegments | ( | ) |
References Katabatic::KbHorizontal, and Katabatic::KbTarget.
Referenced by GCell::getStopSegments().
AutoSegments getVStopSegments | ( | ) |
References Katabatic::KbTarget, and Katabatic::KbVertical.
Referenced by GCell::getStopSegments().
|
inline |
direction
. References GCell::getHStartSegments(), GCell::getVStartSegments(), and Katabatic::KbHorizontal.
|
inline |
direction
. References GCell::getHStopSegments(), GCell::getVStopSegments(), and Katabatic::KbHorizontal.
size_t getRoutingPads | ( | set< RoutingPad *> & | rps | ) |
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().
|
inline |
size_t checkDensity | ( | ) | const |
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 |
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().
|
inline |
Adds segment
to the list of horizontal feedthroughs.
Referenced by AutoHorizontal::_postCreate(), AutoVertical::moveULeft(), and AutoVertical::moveURight().
|
inline |
Adds segment
to the list of vertical feedthroughs.
Referenced by AutoVertical::_postCreate(), AutoHorizontal::moveULeft(), and AutoHorizontal::moveURight().
|
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().
|
inline |
Update the GCell key with the new density at layer depth
.
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.
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 |
||
) |
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.
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 | ||
) |
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).
References GCell::getGCellGrid(), RoutingGauge::getLayerDepth(), Session::getRoutingGauge(), Katabatic::KbHorizontal, Katabatic::KbVertical, and GCell::updateDensity().
Generated by doxygen 1.8.14 on Sun Nov 21 2021 | Return to top of page |
Katabatic - Routing Toolbox | Copyright © 2008-2020 Sorbonne Universite. All rights reserved |