Abstract base class for AutoContact. More...
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) |
Abstract base class for AutoContact.
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.
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.
From the previous version of Katabatic, AutoContact have been greatly stripped down (again). They are now always punctual objetcs with stricly fixed topologies:
|
inline |
Base class method proxy.
References Component::getBodyHook().
Referenced by GCellTopology::_do_xG_1Pad(), and AutoSegment::create().
|
inline |
Base class method proxy.
References Contact::getAnchorHook().
|
inline |
Base class method proxy.
References Contact::getAnchor().
Referenced by AutoContactTerminal::getNativeConstraintBox(), and AutoContactTerminal::updateTopology().
|
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().
|
inline |
Base class method proxy.
References Component::getLayer().
Referenced by AutoSegment::makeDogleg(), AutoSegment::revalidate(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
|
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().
|
inline |
Base class method proxy.
References Component::getY().
Referenced by AutoSegment::create(), GCellTopology::doRp_StairCaseH(), AutoSegment::makeDogleg(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), and AutoContactHTee::updateGeometry().
|
inline |
Base class method proxy.
References Contact::getDx().
|
inline |
Base class method proxy.
References Contact::getDy().
|
inline |
Base class method proxy.
|
inline |
Base class method proxy.
References Component::getPosition().
|
inline |
Base class method proxy.
References Contact::getWidth().
|
inline |
Base class method proxy.
References Contact::getHalfWidth().
|
inline |
Base class method proxy.
References Contact::getHeight().
|
inline |
Base class method proxy.
References Contact::getHalfHeight().
|
inline |
Base class method proxy.
References Component::getSlaveComponents().
|
inline |
Base class method proxy.
References Contact::setLayer().
Referenced by AutoSegment::reduceDoglegLayer(), AutoContactVTee::updateTopology(), AutoContactTurn::updateTopology(), AutoContactHTee::updateTopology(), and AutoContactTerminal::updateTopology().
|
inline |
Base class method proxy.
References Contact::setWidth().
|
inline |
Base class method proxy.
References Contact::setHeight().
Base class method proxy.
References Contact::setSizes().
|
inline |
Base class method proxy.
References Contact::setX().
Referenced by AutoVertical::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().
|
inline |
Base class method proxy.
References Contact::setY().
Referenced by AutoHorizontal::_postCreate(), AutoContactVTee::updateGeometry(), AutoContactTurn::updateGeometry(), AutoContactHTee::updateGeometry(), and AutoContactTerminal::updateGeometry().
Base class method proxy.
References Contact::setPosition().
|
inline |
Base class method proxy.
References Contact::setPosition().
|
inline |
Base class method proxy.
References Contact::setDx().
|
inline |
Base class method proxy.
References Contact::setDy().
Base class method proxy.
References Contact::setOffset().
|
inline |
Returns: true if the AutoContact is still in it's initial creation stage.
References Katabatic::CntInCreationStage.
|
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.
|
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().
|
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.
|
inline |
Returns: true if the dynamic type of the AutoContact is of type AutoContactHTee.
References Katabatic::CntHTee.
|
inline |
Returns: true if the dynamic type of the AutoContact is of type AutoContactHTee.
References Katabatic::CntVTee.
|
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().
|
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:
moved
, the AutoContact needs only one layer.moved
go from below the AutoContact to above. References Component::getLayer(), AutoSegment::getLayer(), and RoutingGauge::getLayerDepth().
|
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().
|
static |
Returns: The total number of AutoContact currently allocateds.
|
static |
Returns: The name of the Hurricane::ExtensionGo slice.
|
virtual |
Returns: The name of the Hurricane::ExtensionGo slice.
|
inline |
Returns: The unique identifer
of the AutoSegment.
|
virtual |
|
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().
|
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, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
|
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, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
Referenced by AutoSegment::raise(), AutoSegment::reduce(), and AutoSegment::revalidate().
|
pure virtual |
Returns: The nth anchored AutoSegment. The index is significant:
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, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
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 | ||
) |
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().
|
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.
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().
|
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().
|
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().
|
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().
|
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().
|
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().
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:
References Katabatic::CntInvalidated, and Katabatic::CntInvalidatedCache.
Referenced by AutoHorizontal::_makeDogleg(), AutoVertical::_makeDogleg(), and AutoSegment::AutoSegment().
|
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, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
|
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, AutoContactHTee, AutoContactTurn, and AutoContactVTee.
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().
|
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().
|
inline |
Set the lower left X coordinate of the constraint box.
References GCell::getX().
|
inline |
Set the upper right X coordinate of the constraint box.
References GCell::getX(), and GCell::getXMax().
|
inline |
Set the lower left Y coordinate of the constraint box.
References GCell::getY().
|
inline |
Set the upper right Y coordinate of the constraint box.
References GCell::getY(), and GCell::getYMax().
void setConstraintBox | ( | const Box & | box | ) |
Set the constraint box.
References Box::getXMax(), Box::getXMin(), Box::getYMax(), and Box::getYMin().
bool restrictConstraintBox | ( | DbU::Unit | min, |
DbU::Unit | max, | ||
unsigned int | flags = KbWarnOnError |
||
) |
min | The minimum of the restriction interval. |
max | The maximum of the restriction interval. |
flags | Gives the direction of the restriction. |
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().
|
staticprotected |
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().
Generated by doxygen 1.8.14 on Thu Nov 12 2020 | Return to top of page |
Katabatic - Routing Toolbox | Copyright © 2008-2020 Sorbonne Universite. All rights reserved |