Katabatic - Routing Toolbox


List of all members | Public Member Functions | Protected Member Functions
AutoVertical Class Reference

Concrete Vertical AutoSegment. More...

Inheritance diagram for AutoVertical:
Inheritance graph
[legend]

Public Member Functions

virtual bool _canSlacken () const
 
virtual bool canMoveULeft (float reserve=0.0) const
 
virtual bool canMoveURight (float reserve=0.0) const
 
virtual Segmentbase ()
 
virtual Segmentbase () const
 
virtual VerticalgetVertical ()
 
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 ()
 
- Public Member Functions inherited from AutoSegment
virtual HorizontalgetHorizontal ()
 
CellgetCell () const
 
NetgetNet () const
 
const LayergetLayer () const
 
Box getBoundingBox () const
 
HookgetSourceHook ()
 
HookgetTargetHook ()
 
ContactgetSource () const
 
ContactgetTarget () const
 
ComponentgetOppositeAnchor (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
 
bool canReduce () const
 
bool mustRaise () const
 
unsigned int canDogleg (Interval)
 
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
 
unsigned long getId () const
 
GCellgetGCell () const
 
AutoContactgetAutoSource () const
 
AutoContactgetAutoTarget () const
 
AutoContactgetOppositeAnchor (AutoContact *) const
 
size_t getPerpandicularsBound (set< AutoSegment *> &)
 
AutoSegmentgetParent () const
 
DbU::Unit getAxis () const
 
DbU::Unit getOrigin () const
 
DbU::Unit getExtremity () const
 
Interval getMinSpanU () const
 
bool getConstraints (Interval &i) const
 
const IntervalgetUserConstraints () const
 
virtual DbU::Unit getSlack () const
 
DbU::Unit getOptimalMin () const
 
DbU::Unit getOptimalMax () const
 
IntervalgetOptimal (Interval &i) const
 
virtual DbU::Unit getCost (DbU::Unit axis) const
 
virtual AutoSegmentgetCanonical (DbU::Unit &min, DbU::Unit &max)
 
AutoSegmentgetCanonical (Interval &i)
 
void unsetFlags (unsigned int)
 
void setFlags (unsigned int)
 
void computeTerminal ()
 
void mergeUserConstraints (const Interval &)
 
void resetUserConstraints ()
 
void setOptimalMin (DbU::Unit min)
 
void setOptimalMax (DbU::Unit max)
 
void revalidate ()
 
AutoSegmentmakeDogleg (AutoContact *)
 
unsigned int makeDogleg (Interval, unsigned int flags=KbNoFlags)
 
unsigned int makeDogleg (GCell *, unsigned int flags=KbNoFlags)
 
bool slacken (unsigned int flags)
 
bool reduceDoglegLayer ()
 
bool reduce ()
 
bool raise ()
 
AutoSegmentcanonize (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 ()
 

Protected Member Functions

virtual void _postCreate ()
 
virtual void _preDestroy ()
 
- Protected Member Functions inherited from AutoSegment
 AutoSegment (Segment *segment)
 
virtual ~AutoSegment ()
 
void _invalidate ()
 
unsigned int _getFlags () const
 

Additional Inherited Members

- Static Public Member Functions inherited from AutoSegment
static AutoSegmentcreate (AutoContact *source, AutoContact *target, Segment *hurricaneSegment)
 
static AutoSegmentcreate (AutoContact *source, AutoContact *target, unsigned int dir, size_t depth=RoutingGauge::nlayerdepth)
 
- Static Protected Member Functions inherited from AutoSegment
static void _preCreate (AutoContact *source, AutoContact *target)
 

Detailed Description

Concrete Vertical AutoSegment.

Member Function Documentation

◆ _canSlacken()

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.

References Interval::contains(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getSide(), Interval::inflate(), and Katabatic::KbHorizontal.

◆ canMoveULeft()

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.

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().

◆ canMoveURight()

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.

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().

◆ base() [1/2]

Segment * base ( )
virtual

Returns: the decorated Hurricane::Segment.

Implements AutoSegment.

◆ base() [2/2]

Segment * base ( ) const
virtual

Returns: the decorated Hurricane::Segment (const flavor).

Implements AutoSegment.

◆ getVertical()

Vertical * getVertical ( )
virtual

Returns: If the decorated segment is a Hurricane::Vertical, return it. NULL otherwise.

Reimplemented from AutoSegment.

◆ getSourceU()

DbU::Unit getSourceU ( ) const
virtual

Returns: The AutoSegment uniform source position. (X for an horizontal and Y for a Vertical).

Implements AutoSegment.

References Segment::getSourceY().

◆ getTargetU()

DbU::Unit getTargetU ( ) const
virtual

Returns: The AutoSegment uniform target position. (X for an horizontal and Y for a Vertical).

Implements AutoSegment.

References Segment::getTargetY().

◆ getDuSource()

DbU::Unit getDuSource ( ) const
virtual

Returns: The AutoSegment uniform delta from source. (dX for an horizontal and dY for a Vertical).

Implements AutoSegment.

References Vertical::getDySource().

◆ getDuTarget()

DbU::Unit getDuTarget ( ) const
virtual

Returns: The AutoSegment uniform delta from source. (dX for an horizontal and dY for a Vertical).

Implements AutoSegment.

References Vertical::getDyTarget().

◆ getSpanU()

Interval getSpanU ( ) const
virtual

Returns: The AutoSegment uniform occupying interval (on X for horizontal and on Y for vertical).

Implements AutoSegment.

References Segment::getSourceY(), and Segment::getTargetY().

◆ getConstraints()

bool getConstraints ( DbU::Unit min,
DbU::Unit max 
) const
virtual

◆ getSourceConstraints()

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.

References AutoSegment::getAutoSource(), Box::getXMax(), Box::getXMin(), and Katabatic::KbNativeConstraints.

◆ getTargetConstraints()

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.

References AutoSegment::getAutoTarget(), Box::getXMax(), Box::getXMin(), and Katabatic::KbNativeConstraints.

◆ getDirection()

unsigned int getDirection ( ) const
virtual

Returns: Katabatic::KbHorizontal or Katabatic::KbVertical according to the decorated segment.

Implements AutoSegment.

References Katabatic::KbVertical.

◆ getGCells()

size_t getGCells ( vector< GCell *> &  gcells) const
virtual
Parameters
gcellsA 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.

References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), AutoSegment::getGCell(), and GCell::getUp().

◆ setDuSource()

void setDuSource ( DbU::Unit  du)
virtual

Set the uniform dU from source anchor (dX for Horizontal, dY for Vertical).

Implements AutoSegment.

◆ setDuTarget()

void setDuTarget ( DbU::Unit  du)
virtual

Set the uniform dU from target anchor (dX for Horizontal, dY for Vertical).

Implements AutoSegment.

◆ updateOrient()

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.

References Segment::getSourceY(), Segment::getTargetY(), Segment::invert(), Katabatic::SegSourceBottom, Katabatic::SegSourceTop, Katabatic::SegTargetBottom, Katabatic::SegTargetTop, AutoSegment::setFlags(), and AutoSegment::unsetFlags().

◆ updatePositions()

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.

References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceY(), and Segment::getTargetY().

◆ checkPositions()

bool checkPositions ( ) const
virtual

Returns: true if the relative positions of source & target are coherent. (source <= target).

Implements AutoSegment.

References Session::getExtensionCap(), AutoSegment::getLayer(), Segment::getSourceY(), Segment::getTargetY(), and DbU::getValueString().

◆ checkConstraints()

bool checkConstraints ( ) const
virtual

Returns: true if the constraint intervel is coherent (non-empty or punctual in the worst case).

Implements AutoSegment.

References AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), and Interval::intersect().

◆ _makeDogleg()

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.

_makeDogleg-1.png
Example Case 1
_makeDogleg-2.png
Example Case 2

Implements AutoSegment.

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().

◆ moveULeft()

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.

moveULeft-1.png
moveULeft() for an Horizontal

Implements AutoSegment.

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().

◆ moveURight()

bool moveURight ( )
virtual

◆ _postCreate()

void _postCreate ( )
protectedvirtual

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.

References AutoSegment::_postCreate(), GCell::addVSegment(), AutoSegment::getAutoSource(), AutoSegment::getAutoTarget(), AutoContact::getGCell(), GCell::getUp(), Component::getX(), GCell::getY(), Katabatic::SegGlobal, AutoSegment::setFlags(), and AutoContact::setX().

◆ _preDestroy()

void _preDestroy ( )
protectedvirtual

Perform operations that must be done before the actual destructor is called. Merely whidrawn the AutoSegment from the lookup/Session mechanism.

Reimplemented from AutoSegment.

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:


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