Replace "unsigned int" by "Flags" in all AutoSegments collections.

* Change: In Anabatic::AutoSegments collections, change the type of all
    the flags that where in "unsigned int" (32 bits) to Flags (uint64_t)
    as there is now more than 32 flags for functions.
* New: In Ababatic::Constants, added new flag Flags::WithPerpands, which
    makes the number of flags tip over 32 bits, thus making mandatory
    to uses Flags and not unsigned int.
* New: In Anabatic::AutoSegments_Perpandiculars, manage a new flag
    Flags::WithDoglegs to allow to propagate through global segments that
    are connecteds via doglegs on local segments. Meaning that there is
    a good chance that they could be aligned.
      Slighly change the way we propagate on aligned segments: no longer
    check for VTee or HTee, but only for same direction and layer as
    master.
* New: In Anabatic & Katana, replace all the "int", "long" and their
    variants by the less implementation ambiguous "int32_t", "int64_t"
    (and variant). This should help to better detect bit trucation in
    flags.
      Use the type to give a hint about the flags kind:
        - Type "Flags", for flags shared among Anabatic & Katana
          functions/methods (may also appear in some objects states).
        - Type "uint32_t" for flags belonging to an object internal
          state of from Hurricane functions flags (those should be
          grouped in a Flag subclass in a perfect world).
This commit is contained in:
Jean-Paul Chaput 2017-05-16 14:53:33 +02:00
parent faf9688165
commit d07cdf03e9
76 changed files with 1016 additions and 953 deletions

View File

@ -445,7 +445,7 @@ namespace Anabatic {
}
NetData* AnabaticEngine::getNetData ( Net* net, unsigned int flags )
NetData* AnabaticEngine::getNetData ( Net* net, Flags flags )
{
NetData* data = NULL;
NetDatas::iterator idata = _netDatas.find( net->getId() );
@ -703,7 +703,7 @@ namespace Anabatic {
}
void AnabaticEngine::loadGlobalRouting ( unsigned int method )
void AnabaticEngine::loadGlobalRouting ( uint32_t method )
{
if (_state < EngineGlobalLoaded)
throw Error ("AnabaticEngine::loadGlobalRouting() : global routing not present yet.");
@ -711,15 +711,9 @@ namespace Anabatic {
if (_state > EngineGlobalLoaded)
throw Error ("AnabaticEngine::loadGlobalRouting() : global routing already loaded.");
switch ( method ) {
case EngineLoadGrByNet: _loadGrByNet(); break;
case EngineLoadGrByGCell:
default:
throw Error( badMethod
, "Anabatic::loadGlobalRouting()"
, method
, getString(_cell).c_str()
);
if (method == EngineLoadGrByNet ) { _loadGrByNet(); }
else {
throw Error( badMethod, "Anabatic::loadGlobalRouting()", method, getString(_cell).c_str() );
}
cleanupGlobal();

View File

@ -157,7 +157,7 @@ namespace Anabatic {
{ return _goName; }
bool AutoContact::canDestroy ( unsigned int flags ) const
bool AutoContact::canDestroy ( Flags flags ) const
{
if (not _contact->getSlaveComponents().isEmpty()) {
if (flags & Flags::WarnOnError) {
@ -248,7 +248,7 @@ namespace Anabatic {
}
Interval AutoContact::getNativeUConstraints ( unsigned int direction ) const
Interval AutoContact::getNativeUConstraints ( Flags direction ) const
{
Box nativeConstraints = getNativeConstraintBox();
Interval constraint;
@ -262,7 +262,7 @@ namespace Anabatic {
}
Interval AutoContact::getUConstraints ( unsigned int direction ) const
Interval AutoContact::getUConstraints ( Flags direction ) const
{
Interval constraint;
if (direction & Flags::Horizontal) {
@ -275,7 +275,7 @@ namespace Anabatic {
}
void AutoContact::invalidate ( unsigned int flags )
void AutoContact::invalidate ( Flags flags )
{
if (not isInvalidated()) {
cdebug_log(145,1) << "AutoContact::invalidate() - " << this << endl;
@ -342,7 +342,7 @@ namespace Anabatic {
}
void AutoContact::showTopologyError ( const std::string& message, unsigned int flags )
void AutoContact::showTopologyError ( const std::string& message, Flags flags )
{
Component* anchor = NULL;
Horizontal** horizontals = new Horizontal* [10];
@ -395,7 +395,7 @@ namespace Anabatic {
bool AutoContact::isTee ( unsigned int direction ) const
bool AutoContact::isTee ( Flags direction ) const
{
return (isHTee() and (direction & Flags::Horizontal))
or (isVTee() and (direction & Flags::Vertical ));
@ -442,9 +442,9 @@ namespace Anabatic {
}
bool AutoContact::restrictConstraintBox ( DbU::Unit constraintMin
, DbU::Unit constraintMax
, unsigned int flags
bool AutoContact::restrictConstraintBox ( DbU::Unit constraintMin
, DbU::Unit constraintMax
, Flags flags
)
{
cdebug_log(149,0) << "restrictConstraintBox() - " << this << " " << getConstraintBox() << endl;

View File

@ -110,9 +110,9 @@ namespace Anabatic {
}
void AutoContactHTee::_invalidate ( unsigned int )
void AutoContactHTee::_invalidate ( Flags )
{
unsigned int flags = Flags::Propagate;
Flags flags = Flags::Propagate;
if (_horizontal1 and _horizontal2) {
if (_horizontal1->isInvalidated() xor _horizontal2->isInvalidated())
flags = Flags::NoFlags;

View File

@ -255,7 +255,7 @@ namespace Anabatic {
}
void AutoContactTerminal::_invalidate ( unsigned int flags )
void AutoContactTerminal::_invalidate ( Flags flags )
{
if (_segment) _segment->invalidate();
}
@ -364,7 +364,7 @@ namespace Anabatic {
_segment->getConstraints( intv );
message << "\n Segment constraints: " << intv << endl;
unsigned int flags = 0;
Flags flags = Flags::NoFlags;
if (_segment->isCreated()) flags |= Flags::CParanoid;
showTopologyError( message.str(), flags );
} else
@ -375,7 +375,7 @@ namespace Anabatic {
message << "Terminal vertical segment X" << DbU::getValueString(_segment->getX())
<< " axis is outside RoutingPad " << getUConstraints(Flags::Horizontal) << ".";
unsigned int flags = 0;
Flags flags = Flags::NoFlags;
if (_segment->isCreated()) flags |= Flags::CParanoid;
showTopologyError( message.str(), flags );
} else

View File

@ -104,7 +104,7 @@ namespace Anabatic {
}
void AutoContactTurn::_invalidate ( unsigned int flags )
void AutoContactTurn::_invalidate ( Flags flags )
{
if (_horizontal1) _horizontal1->invalidate();
if (_vertical1 ) _vertical1 ->invalidate();

View File

@ -106,9 +106,9 @@ namespace Anabatic {
}
void AutoContactVTee::_invalidate ( unsigned int )
void AutoContactVTee::_invalidate ( Flags )
{
unsigned int flags = Flags::Propagate;
Flags flags = Flags::Propagate;
if (_vertical1 and _vertical2) {
if (_vertical1->isInvalidated() xor _vertical2->isInvalidated())
flags = Flags::NoFlags;

View File

@ -120,7 +120,7 @@ namespace Anabatic {
}
Interval AutoHorizontal::getSourceConstraints ( unsigned int flags ) const
Interval AutoHorizontal::getSourceConstraints ( Flags flags ) const
{
if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoSource()->getNativeConstraintBox() );
@ -130,7 +130,7 @@ namespace Anabatic {
}
Interval AutoHorizontal::getTargetConstraints ( unsigned int flags ) const
Interval AutoHorizontal::getTargetConstraints ( Flags flags ) const
{
if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoTarget()->getNativeConstraintBox() );
@ -240,7 +240,7 @@ namespace Anabatic {
}
bool AutoHorizontal::_slacken ( unsigned int flags )
bool AutoHorizontal::_slacken ( Flags flags )
{
cdebug_log(149,0) << "AutoHorizontal::_slacken() " << this << endl;
@ -410,19 +410,19 @@ namespace Anabatic {
cdebug_log(145,0) << "updateOrient() " << this << " (before S/T swap)" << endl;
_horizontal->invert();
unsigned int spinFlags = _flags & SegDepthSpin;
Flags spinFlags = _flags & SegDepthSpin;
unsetFlags( SegDepthSpin );
if (spinFlags & SegSourceTop ) setFlags( SegTargetTop );
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
unsigned int invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget);
Flags invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget);
unsetFlags( SegInvalidatedSource|SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedSource) setFlags( SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedTarget) setFlags( SegInvalidatedSource );
unsigned int terminalFlags = _flags & SegStrongTerminal;
Flags terminalFlags = _flags & SegStrongTerminal;
unsetFlags( SegStrongTerminal );
if (terminalFlags & SegSourceTerminal) setFlags( SegTargetTerminal );
if (terminalFlags & SegTargetTerminal) setFlags( SegSourceTerminal );
@ -728,7 +728,7 @@ namespace Anabatic {
}
unsigned int AutoHorizontal::_makeDogleg ( GCell* doglegGCell, unsigned int flags )
Flags AutoHorizontal::_makeDogleg ( GCell* doglegGCell, Flags flags )
{
DebugSession::open( getNet(), 140, 150 );
cdebug_log(149,0) << "AutoHorizontal::_makeDogleg(GCell*) in " << doglegGCell << endl;

View File

@ -412,7 +412,7 @@ namespace Anabatic {
}
void AutoSegment::invalidate ( unsigned int flags )
void AutoSegment::invalidate ( Flags flags )
{
if (Session::doDestroyTool()) return;
if (flags & Flags::Source) setFlags( SegInvalidatedSource );
@ -463,7 +463,7 @@ namespace Anabatic {
updateOrient ();
updatePositions();
unsigned int oldSpinFlags = _flags & SegDepthSpin;
uint32_t oldSpinFlags = _flags & SegDepthSpin;
if (_flags & (SegInvalidatedSource|SegCreated)) {
AutoContact* source = getAutoSource();
@ -509,13 +509,13 @@ namespace Anabatic {
}
bool AutoSegment::isStrongTerminal ( unsigned int flags ) const
bool AutoSegment::isStrongTerminal ( Flags flags ) const
{
if (_flags & SegStrongTerminal) return true;
if ((flags & Flags::Propagate) and not isNotAligned()) {
forEach( AutoSegment*, isegment, const_cast<AutoSegment*>(this)->getAligneds() ) {
if (isegment->_flags & SegStrongTerminal) return true;
for ( AutoSegment* segment : const_cast<AutoSegment*>(this)->getAligneds() ) {
if (segment->_flags & SegStrongTerminal) return true;
}
}
return false;
@ -606,36 +606,36 @@ namespace Anabatic {
}
AutoSegments AutoSegment::getOnSourceContact ( unsigned int direction )
AutoSegments AutoSegment::getOnSourceContact ( Flags direction )
{
return AutoSegments_OnContact
( this, getSource() ).getSubSet( AutoSegments_InDirection(direction) );
}
AutoSegments AutoSegment::getOnTargetContact ( unsigned int direction )
AutoSegments AutoSegment::getOnTargetContact ( Flags direction )
{
return AutoSegments_OnContact
( this, getTarget() ).getSubSet( AutoSegments_InDirection(direction) );
}
AutoSegments AutoSegment::getCachedOnSourceContact ( unsigned int direction )
AutoSegments AutoSegment::getCachedOnSourceContact ( Flags direction )
{ return AutoSegments_CachedOnContact( getAutoSource(), direction ); }
AutoSegments AutoSegment::getCachedOnTargetContact ( unsigned int direction )
AutoSegments AutoSegment::getCachedOnTargetContact ( Flags direction )
{ return AutoSegments_CachedOnContact( getAutoTarget(), direction ); }
AutoSegments AutoSegment::getAligneds ( unsigned int flags )
AutoSegments AutoSegment::getAligneds ( Flags flags )
{
cdebug_log(145,0) << "AutoSegment::getAligneds() - flags:" << flags << endl;
return AutoSegments_Aligneds( this, flags );
}
AutoSegments AutoSegment::getConnecteds ( unsigned int flags )
AutoSegments AutoSegment::getConnecteds ( Flags flags )
{
cdebug_log(145,0) << "AutoSegment::getConnecteds() - flags:" << flags << endl;
return AutoSegments_Connecteds( this, flags );
@ -689,7 +689,7 @@ namespace Anabatic {
}
void AutoSegment::setFlagsOnAligneds ( unsigned int flags )
void AutoSegment::setFlagsOnAligneds ( uint32_t flags )
{
setFlags( flags );
if (not isNotAligned()) {
@ -769,7 +769,7 @@ namespace Anabatic {
}
bool AutoSegment::toConstraintAxis ( unsigned int flags )
bool AutoSegment::toConstraintAxis ( Flags flags )
{
cdebug_log(149,1) << "toConstraintAxis() " << this << endl;
@ -807,7 +807,7 @@ namespace Anabatic {
}
bool AutoSegment::toOptimalAxis ( unsigned int flags )
bool AutoSegment::toOptimalAxis ( Flags flags )
{
cdebug_log(149,1) << "toOptimalAxis() " << this << endl;
@ -843,7 +843,7 @@ namespace Anabatic {
}
void AutoSegment::setAxis ( DbU::Unit axis, unsigned int flags )
void AutoSegment::setAxis ( DbU::Unit axis, Flags flags )
{
if (not isCanonical()) return;
@ -886,7 +886,7 @@ namespace Anabatic {
if (not source->isTerminal())
source->setFlags( CntWeakTerminal );
} else {
unsigned int terminalFlag = 0;
uint32_t terminalFlag = 0;
switch ( _getFlags() & SegWeakTerminal ) {
case 0: break;
case SegSourceTerminal|SegTargetTerminal:
@ -975,6 +975,8 @@ namespace Anabatic {
if (perpandMax > maxGCell) attractors.addAttractor( maxGCell );
} else if (autoSegment->isLocal()) {
if (autoSegment->isStrongTerminal()) {
cdebug_log(145,0) << "Used as strong terminal." << endl;
DbU::Unit terminalMin;
DbU::Unit terminalMax;
@ -988,7 +990,7 @@ namespace Anabatic {
attractors.addAttractor( terminalMax );
}
} else if (autoSegment->isLongLocal()) {
cdebug_log(145,0) << "| Used as long global attractor." << endl;
cdebug_log(145,0) << "Used as long global attractor." << endl;
DbU::Unit perpandMin = autoSegment->getSourceU();
DbU::Unit perpandMax = autoSegment->getTargetU();
@ -1009,6 +1011,8 @@ namespace Anabatic {
optimalMin = attractors.getLowerMedian();
optimalMax = attractors.getUpperMedian();
} else {
cdebug_log(145,0) << "No attractors, reverting to GCell bounding box" << endl;
optimalMin = 0;
optimalMax = (isHorizontal()) ? _gcell->getBoundingBox().getYMax()
: _gcell->getBoundingBox().getXMax();
@ -1035,7 +1039,7 @@ namespace Anabatic {
}
AutoSegment* AutoSegment::canonize ( unsigned int flags )
AutoSegment* AutoSegment::canonize ( Flags flags )
{
cdebug_log(149,0) << "canonize() - " << this << endl;
@ -1128,10 +1132,10 @@ namespace Anabatic {
getAlignedContacts( contacts );
DbU::Unit spanMin = DbU::Min;
DbU::Unit spanMax = DbU::Max;
Interval constraints;
unsigned int direction = getDirection();
DbU::Unit spanMin = DbU::Min;
DbU::Unit spanMax = DbU::Max;
Interval constraints;
Flags direction = getDirection();
for ( icontact=contacts.begin() ; icontact != contacts.end() ; icontact++ ) {
constraints = icontact->first->getUConstraints( direction );
@ -1278,7 +1282,7 @@ namespace Anabatic {
}
void AutoSegment::changeDepth ( unsigned int depth, unsigned int flags )
void AutoSegment::changeDepth ( unsigned int depth, Flags flags )
{
cdebug_log(149,1) << "changeDepth() " << depth << " - " << this << endl;
Session::invalidate( getNet() );
@ -1295,7 +1299,7 @@ namespace Anabatic {
}
void AutoSegment::_changeDepth ( unsigned int depth, unsigned int flags )
void AutoSegment::_changeDepth ( unsigned int depth, Flags flags )
{
cdebug_log(149,1) << "_changeDepth() - " << this << endl;
@ -1346,7 +1350,7 @@ namespace Anabatic {
}
bool AutoSegment::canSlacken ( unsigned int flags ) const
bool AutoSegment::canSlacken ( Flags flags ) const
{
cdebug_log(149,0) << "AutoSegment::canSlacken()" << endl;
@ -1363,7 +1367,7 @@ namespace Anabatic {
}
bool AutoSegment::slacken ( unsigned int flags )
bool AutoSegment::slacken ( Flags flags )
{
bool success = false;
@ -1379,7 +1383,7 @@ namespace Anabatic {
}
float AutoSegment::getMaxUnderDensity ( unsigned int flags )
float AutoSegment::getMaxUnderDensity ( Flags flags )
{
cdebug_log(149,0) << "AutoSegment::getMaxUnderDensity() " << endl;
@ -1407,7 +1411,7 @@ namespace Anabatic {
}
bool AutoSegment::canPivotUp ( float reserve, unsigned int flags ) const
bool AutoSegment::canPivotUp ( float reserve, Flags flags ) const
{
cdebug_log(149,0) << "AutoSegment::canPivotUp() - " << flags
<< " (reserve:" << reserve << ")" << endl;
@ -1456,7 +1460,7 @@ namespace Anabatic {
}
bool AutoSegment::canPivotDown ( float reserve, unsigned int flags ) const
bool AutoSegment::canPivotDown ( float reserve, Flags flags ) const
{
cdebug_log(149,0) << "AutoSegment::canPivotDown()"
<< " (reserve:" << reserve << ")" << endl;
@ -1503,7 +1507,7 @@ namespace Anabatic {
}
bool AutoSegment::canMoveUp ( float reserve, unsigned int flags ) const
bool AutoSegment::canMoveUp ( float reserve, Flags flags ) const
{
cdebug_log(159,0) << "AutoSegment::canMoveUp() " << flags
<< " (reserve:" << reserve << ") " << this << endl;
@ -1601,7 +1605,7 @@ namespace Anabatic {
}
bool AutoSegment::moveUp ( unsigned int flags )
bool AutoSegment::moveUp ( Flags flags )
{
//if ( not canMoveUp(0.0,flags) ) return false;
changeDepth( Session::getRoutingGauge()->getLayerDepth(getLayer()) + 2, flags&Flags::Propagate );
@ -1610,7 +1614,7 @@ namespace Anabatic {
}
bool AutoSegment::moveDown ( unsigned int flags )
bool AutoSegment::moveDown ( Flags flags )
{
//if ( not canPivotDown(0.0,flags) ) return false;
changeDepth( Session::getRoutingGauge()->getLayerDepth(getLayer()) - 2, flags&Flags::Propagate );
@ -1648,7 +1652,7 @@ namespace Anabatic {
#if THIS_IS_DISABLED
bool AutoSegment::shearUp ( GCell* upGCell, AutoSegment*& movedUp, float reserve, unsigned int flags )
bool AutoSegment::shearUp ( GCell* upGCell, AutoSegment*& movedUp, float reserve, Flags flags )
{
cdebug_log(149,0) << "AutoSegment::shearUp() " << this << endl;
@ -1719,7 +1723,7 @@ namespace Anabatic {
#endif
unsigned int AutoSegment::canDogleg ( Interval interval )
Flags AutoSegment::canDogleg ( Interval interval )
{
cdebug_log(149,0) << "AutoSegment::canDogleg(Interval) " << interval << endl;
@ -1823,12 +1827,12 @@ namespace Anabatic {
}
unsigned int AutoSegment::makeDogleg ( Interval interval, unsigned int flags )
Flags AutoSegment::makeDogleg ( Interval interval, Flags flags )
{
cdebug_log(149,1) << "AutoSegment::makeDogleg(Interval) - " << interval << endl;
bool leftDogleg = true;
unsigned int rflags = 0;
Flags rflags = Flags::NoFlags;
size_t leftDoglegCount = 0;
size_t rightDoglegCount = 0;
AutoSegment* leftCandidate = NULL;
@ -1875,9 +1879,9 @@ namespace Anabatic {
cdebug_log(149,0) << "Break @" << DbU::getValueString(axis) << " " << leftCandidate << endl;
unsigned int direction = getDirection();
GCell* gcell = leftCandidate->getAutoSource()->getGCell();
GCell* end = leftCandidate->getAutoTarget()->getGCell();
Flags direction = getDirection();
GCell* gcell = leftCandidate->getAutoSource()->getGCell();
GCell* end = leftCandidate->getAutoTarget()->getGCell();
while ( gcell != end ) {
if (gcell->getSide(direction).contains(axis)) break;
gcell = (direction == Flags::Horizontal) ? gcell->getEast (getNativeMin())
@ -1899,13 +1903,13 @@ namespace Anabatic {
}
unsigned int AutoSegment::makeDogleg ( GCell* doglegGCell, unsigned int flags )
Flags AutoSegment::makeDogleg ( GCell* doglegGCell, Flags flags )
{
cdebug_log(9000,0) << "Deter| AutoSegment::makeDogleg(GCell*) " << doglegGCell << endl;
cdebug_log(9000,0) << "Deter| in " << this << endl;
cdebug_tabw(149,1);
unsigned int rflags = 0;
Flags rflags = Flags::NoFlags;
if ( doglegGCell->isIoPad()
and (Session::getAnabatic()->getState() != EngineGlobalLoaded) ) {
@ -2130,10 +2134,10 @@ namespace Anabatic {
}
AutoSegment* AutoSegment::create ( AutoContact* source
, AutoContact* target
, unsigned int dir
, size_t depth
AutoSegment* AutoSegment::create ( AutoContact* source
, AutoContact* target
, Flags dir
, size_t depth
)
{
// Hardcoded: make the assumption that,
@ -2213,7 +2217,28 @@ namespace Anabatic {
}
bool AutoSegment::isTopologicalBound ( AutoSegment* seed, unsigned int flags )
AutoSegment* AutoSegment::getGlobalThroughDogleg ( AutoSegment* dogleg, AutoContact* from )
{
AutoContact* source = dogleg->getAutoSource();
AutoContact* target = dogleg->getAutoTarget();
if (not source->isTurn() or not target->isTurn()) return NULL;
AutoSegment* fromSegment = (source == from) ? source->getPerpandicular(dogleg) : target->getPerpandicular(dogleg);
AutoSegment* toSegment = (source != from) ? source->getPerpandicular(dogleg) : target->getPerpandicular(dogleg);
if (not toSegment->isGlobal() or (toSegment->getLayer() != fromSegment->getLayer())) return NULL;
Interval fromConstraints;
Interval toConstraints;
fromSegment->getConstraints( fromConstraints );
toSegment ->getConstraints( toConstraints );
if (not fromConstraints.intersect(toConstraints)) return NULL;
return toSegment;
}
bool AutoSegment::isTopologicalBound ( AutoSegment* seed, Flags flags )
{
cdebug_log(145,1) << "isTopologicalBound() - " << seed << endl;
@ -2288,13 +2313,13 @@ namespace Anabatic {
#if THIS_IS_DISABLED
unsigned int AutoSegment::getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, bool isHorizontalMaster
, const Layer* masterLayer )
Flags AutoSegment::getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, bool isHorizontalMaster
, const Layer* masterLayer )
{
unsigned int state = 0;
Flags state = Flags::NoFlags;
bool sourcePerpandicular = arePerpandiculars ( isHorizontalMaster, source );
bool currentPerpandicular = arePerpandiculars ( isHorizontalMaster, current );

View File

@ -196,7 +196,7 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "AutoSegments_Connecteds".
AutoSegments_Connecteds::Locator::Locator ( AutoSegment* segment, unsigned int flags )
AutoSegments_Connecteds::Locator::Locator ( AutoSegment* segment, Flags flags )
: AutoSegmentHL()
, _stack ()
{
@ -292,7 +292,7 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "AutoSegments_Aligneds".
AutoSegments_Aligneds::Locator::Locator ( AutoSegment* segment, unsigned int flags )
AutoSegments_Aligneds::Locator::Locator ( AutoSegment* segment, Flags flags )
: AutoSegmentHL()
, _flags (flags)
, _master(segment)
@ -389,9 +389,10 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "AutoSegments_Perpandiculars".
AutoSegments_Perpandiculars::Locator::Locator ( AutoSegment* master )
AutoSegments_Perpandiculars::Locator::Locator ( AutoSegment* master, Flags flags )
: AutoSegmentHL()
, _flags (Flags::WithPerpands)
//, _flags (Flags::WithPerpands|Flags::WithDoglegs)
, _flags (Flags::WithPerpands|flags)
, _master (master)
, _stack ()
, _perpandiculars()
@ -422,7 +423,7 @@ namespace Anabatic {
void AutoSegments_Perpandiculars::Locator::progress ()
{
cdebug_log(145,0) << "AutoSegments_Perpandiculars::Locator::progress()" << endl;
cdebug_log(145,1) << "AutoSegments_Perpandiculars::Locator::progress()" << endl;
if (not _perpandiculars.empty()) _perpandiculars.pop_back();
if (not _perpandiculars.empty()) return;
@ -432,31 +433,61 @@ namespace Anabatic {
AutoSegment* sourceSegment = _stack.getAutoSegment();
_stack.pop();
cdebug_log(145,0) << "Iterate over: " << sourceContact << endl;
LocatorHelper helper (sourceContact, _flags);
for ( ; helper.isValid() ; helper.progress() ) {
AutoSegment* currentSegment = helper.getSegment();
if (currentSegment == sourceSegment) continue;
if (AutoSegment::areAligneds(currentSegment,_master)) {
AutoContact* targetContact = currentSegment->getOppositeAnchor( sourceContact );
if (targetContact) {
if ( (_master->isHorizontal() and sourceContact->isHTee())
or (_master->isVertical () and sourceContact->isVTee()) ) {
if (AutoSegment::areAlignedsAndDiffLayer(currentSegment,_master)) {
cerr << Error("Aligned segments not in same layer (perpandicular locator)\n"
" %s\n"
" %s."
,getString(_master).c_str()
,getString(currentSegment).c_str()) << endl;
continue;
}
cdebug_log(145,0) << "| " << currentSegment << endl;
cdebug_log(145,0) << "Stacking target. " << endl;
_stack.push( targetContact, currentSegment );
if (AutoSegment::areAligneds(currentSegment,_master)) {
AutoContact* targetContact = currentSegment->getOppositeAnchor( sourceContact );
if (targetContact) {
if (_master->getLayer() != currentSegment->getLayer()) {
continue;
}
cdebug_log(145,0) << "Stacking target. " << endl;
_stack.push( targetContact, currentSegment );
// if ( (_master->isHorizontal() and sourceContact->isHTee())
// or (_master->isVertical () and sourceContact->isVTee()) ) {
// if (AutoSegment::areAlignedsAndDiffLayer(currentSegment,_master)) {
// cerr << Error("Aligned segments not in same layer (perpandicular locator)\n"
// " %s\n"
// " %s."
// ,getString(_master).c_str()
// ,getString(currentSegment).c_str()) << endl;
// continue;
// }
// cdebug_log(145,0) << "Stacking target. " << endl;
// _stack.push( targetContact, currentSegment );
// }
} else {
cdebug_log(145,0) << "No opposite anchor to: " << sourceContact << endl;
}
} else {
if ( (_flags & Flags::WithDoglegs) and currentSegment->isLocal() and sourceContact->isTurn() ) {
AutoContact* targetContact = currentSegment->getOppositeAnchor( sourceContact );
if (targetContact->isTurn()) {
AutoSegment* targetGlobal = targetContact->getPerpandicular( currentSegment );
if (targetGlobal->isGlobal() and (_master->getLayer() == targetGlobal->getLayer())) {
cdebug_log(145,0) << "Global aligned though dogleg:" << targetGlobal << endl;
Interval masterConstraints;
Interval targetConstraints;
_master ->getConstraints( masterConstraints );
targetGlobal->getConstraints( targetConstraints );
if (targetConstraints.intersect(masterConstraints)) {
cdebug_log(145,0) << "Stacking dogleg global. " << endl;
_stack.push( targetContact, currentSegment );
continue;
}
}
}
}
_perpandiculars.push_back( currentSegment );
}
}
@ -465,6 +496,8 @@ namespace Anabatic {
if (_stack.getAutoSegment() == _master) continue;
if (not _perpandiculars.empty()) break;
}
cdebug_tabw(145,-1);
}
@ -481,7 +514,7 @@ namespace Anabatic {
AutoSegmentHL* AutoSegments_Perpandiculars::getLocator () const
{ return new Locator(_segment); }
{ return new Locator(_master,_flags); }
string AutoSegments_Perpandiculars::Locator::_getString () const
@ -494,7 +527,7 @@ namespace Anabatic {
string AutoSegments_Perpandiculars::_getString () const
{
string s = "<" + _TName("AutoSegments_Perpandiculars") + " "
+ getString(_segment)
+ getString(_master)
+ ">";
return s;
}
@ -503,7 +536,7 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "AutoSegments_AnchorOnGCell".
AutoSegments_AnchorOnGCell::Locator::Locator ( GCell* fcell, unsigned int flags )
AutoSegments_AnchorOnGCell::Locator::Locator ( GCell* fcell, Flags flags )
: AutoSegmentHL()
, _flags (flags)
, _itContact (fcell->getContacts().begin())
@ -600,7 +633,7 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "Anabatic::AutoSegments_CachedOnContact".
AutoSegments_CachedOnContact::Locator::Locator ( AutoContact* sourceContact, unsigned int direction )
AutoSegments_CachedOnContact::Locator::Locator ( AutoContact* sourceContact, Flags direction )
: AutoSegmentHL()
, _helper(new LocatorHelper(sourceContact,direction))
{ }

View File

@ -115,7 +115,7 @@ namespace Anabatic {
}
Interval AutoVertical::getSourceConstraints ( unsigned int flags ) const
Interval AutoVertical::getSourceConstraints ( Flags flags ) const
{
if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoSource()->getNativeConstraintBox() );
@ -125,7 +125,7 @@ namespace Anabatic {
}
Interval AutoVertical::getTargetConstraints ( unsigned int flags ) const
Interval AutoVertical::getTargetConstraints ( Flags flags ) const
{
if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoTarget()->getNativeConstraintBox() );
@ -230,7 +230,7 @@ namespace Anabatic {
}
bool AutoVertical::_slacken ( unsigned int flags )
bool AutoVertical::_slacken ( Flags flags )
{
cdebug_log(149,1) << "AutoVertical::_slacken() " << this << endl;
@ -646,7 +646,7 @@ namespace Anabatic {
}
unsigned int AutoVertical::_makeDogleg ( GCell* doglegGCell, unsigned int flags )
Flags AutoVertical::_makeDogleg ( GCell* doglegGCell, Flags flags )
{
cdebug_log(149,0) << "AutoVertical::_makeDogleg(GCell*)" << endl;

View File

@ -24,27 +24,27 @@ namespace Anabatic {
const uint64_t Flags::NoFlags = 0;
// Flags used for both objects states & functions arguments.
const uint64_t Flags::Horizontal = (1 << 0);
const uint64_t Flags::Vertical = (1 << 1);
const uint64_t Flags::Source = (1 << 2);
const uint64_t Flags::Target = (1 << 3);
const uint64_t Flags::Invalidated = (1 << 4);
const uint64_t Flags::Horizontal = (1L << 0);
const uint64_t Flags::Vertical = (1L << 1);
const uint64_t Flags::Source = (1L << 2);
const uint64_t Flags::Target = (1L << 3);
const uint64_t Flags::Invalidated = (1L << 4);
// Flags for GCell objects states only.
const uint64_t Flags::DeviceGCell = (1 << 5);
const uint64_t Flags::HChannelGCell = (1 << 6);
const uint64_t Flags::VChannelGCell = (1 << 7);
const uint64_t Flags::StrutGCell = (1 << 8);
const uint64_t Flags::MatrixGCell = (1 << 9);
const uint64_t Flags::IoPadGCell = (1 << 10);
const uint64_t Flags::Saturated = (1 << 11);
const uint64_t Flags::DeviceGCell = (1L << 5);
const uint64_t Flags::HChannelGCell = (1L << 6);
const uint64_t Flags::VChannelGCell = (1L << 7);
const uint64_t Flags::StrutGCell = (1L << 8);
const uint64_t Flags::MatrixGCell = (1L << 9);
const uint64_t Flags::IoPadGCell = (1L << 10);
const uint64_t Flags::Saturated = (1L << 11);
// Flags for Anabatic objects states only.
const uint64_t Flags::DemoMode = (1 << 5);
const uint64_t Flags::WarnOnGCellOverload = (1 << 6);
const uint64_t Flags::DestroyGCell = (1 << 7);
const uint64_t Flags::DestroyBaseContact = (1 << 8);
const uint64_t Flags::DestroyBaseSegment = (1 << 9);
const uint64_t Flags::DemoMode = (1L << 5);
const uint64_t Flags::WarnOnGCellOverload = (1L << 6);
const uint64_t Flags::DestroyGCell = (1L << 7);
const uint64_t Flags::DestroyBaseContact = (1L << 8);
const uint64_t Flags::DestroyBaseSegment = (1L << 9);
// Flags for NetDatas objects states only.
const uint64_t Flags::GlobalRouted = (1 << 5);
const uint64_t Flags::GlobalRouted = (1L << 5);
// Masks.
const uint64_t Flags::WestSide = Horizontal|Target;
const uint64_t Flags::EastSide = Horizontal|Source;
@ -56,33 +56,34 @@ namespace Anabatic {
const uint64_t Flags::DestroyMask = DestroyGCell|DestroyBaseContact|DestroyBaseSegment;
const uint64_t Flags::GCellTypeMask = DeviceGCell|HChannelGCell|VChannelGCell|StrutGCell|MatrixGCell|IoPadGCell;
// Flags for functions arguments only.
const uint64_t Flags::Create = (1 << 5);
const uint64_t Flags::WithPerpands = (1 << 6);
const uint64_t Flags::WithSelf = (1 << 7);
const uint64_t Flags::AboveLayer = (1 << 8);
const uint64_t Flags::BelowLayer = (1 << 9);
const uint64_t Flags::OpenSession = (1 << 10);
const uint64_t Flags::Realignate = (1 << 11);
const uint64_t Flags::NativeConstraints = (1 << 12);
const uint64_t Flags::ForceMove = (1 << 13);
const uint64_t Flags::WarnOnError = (1 << 14);
const uint64_t Flags::Topology = (1 << 15);
const uint64_t Flags::GlobalSegment = (1 << 16);
const uint64_t Flags::AllowTerminal = (1 << 17);
const uint64_t Flags::AllowLocal = (1 << 18);
const uint64_t Flags::IgnoreContacts = (1 << 19);
const uint64_t Flags::Propagate = (1 << 20);
const uint64_t Flags::Superior = (1 << 21);
const uint64_t Flags::DoglegOnLeft = (1 << 22);
const uint64_t Flags::DoglegOnRight = (1 << 23);
const uint64_t Flags::WithNeighbors = (1 << 24);
const uint64_t Flags::NoCheckLayer = (1 << 25);
const uint64_t Flags::HalfSlacken = (1 << 26);
const uint64_t Flags::NoGCellShrink = (1 << 27);
const uint64_t Flags::CParanoid = (1 << 28);
const uint64_t Flags::CheckLowDensity = (1 << 29);
const uint64_t Flags::CheckLowUpDensity = (1 << 30);
const uint64_t Flags::NoUpdate = (1 << 31);
const uint64_t Flags::Create = (1L << 5);
const uint64_t Flags::WithPerpands = (1L << 6);
const uint64_t Flags::WithDoglegs = (1L << 7);
const uint64_t Flags::WithSelf = (1L << 8);
const uint64_t Flags::AboveLayer = (1L << 9);
const uint64_t Flags::BelowLayer = (1L << 10);
const uint64_t Flags::OpenSession = (1L << 11);
const uint64_t Flags::Realignate = (1L << 12);
const uint64_t Flags::NativeConstraints = (1L << 13);
const uint64_t Flags::ForceMove = (1L << 14);
const uint64_t Flags::WarnOnError = (1L << 15);
const uint64_t Flags::Topology = (1L << 16);
const uint64_t Flags::GlobalSegment = (1L << 17);
const uint64_t Flags::AllowTerminal = (1L << 18);
const uint64_t Flags::AllowLocal = (1L << 19);
const uint64_t Flags::IgnoreContacts = (1L << 20);
const uint64_t Flags::Propagate = (1L << 21);
const uint64_t Flags::Superior = (1L << 22);
const uint64_t Flags::DoglegOnLeft = (1L << 23);
const uint64_t Flags::DoglegOnRight = (1L << 24);
const uint64_t Flags::WithNeighbors = (1L << 25);
const uint64_t Flags::NoCheckLayer = (1L << 26);
const uint64_t Flags::HalfSlacken = (1L << 27);
const uint64_t Flags::NoGCellShrink = (1L << 28);
const uint64_t Flags::CParanoid = (1L << 29);
const uint64_t Flags::CheckLowDensity = (1L << 30);
const uint64_t Flags::CheckLowUpDensity = (1L << 31);
const uint64_t Flags::NoUpdate = (1L << 32);
Flags::~Flags ()

View File

@ -989,7 +989,7 @@ namespace Anabatic {
}
IntervalC Vertex::getIntervFrom( unsigned int criteria ) const
IntervalC Vertex::getIntervFrom( uint32_t criteria ) const
{
if (_adata){
switch (criteria){
@ -1017,13 +1017,13 @@ namespace Anabatic {
return _adata->getIntervFrom();
}
} else {
cdebug_log(112,1) << "DbU::Unit Vertex::getIntervFrom(unsigned int criteria) const: Inappropriate usage of GRAData. " << endl;
cdebug_log(112,1) << "DbU::Unit Vertex::getIntervFrom(Flags criteria) const: Inappropriate usage of GRAData. " << endl;
return IntervalC();
}
}
GCell* Vertex::getGPrev( unsigned int criteria ) const
GCell* Vertex::getGPrev( uint32_t criteria ) const
{
if (_adata){
switch (criteria){

View File

@ -271,12 +271,12 @@ namespace Anabatic {
// -------------------------------------------------------------------
// Class : "Anabatic::GCell".
Name GCell::_extensionName = "Anabatic::GCell";
unsigned int GCell::_displayMode = GCell::Boundary;
Name GCell::_extensionName = "Anabatic::GCell";
uint32_t GCell::_displayMode = GCell::Boundary;
unsigned int GCell::getDisplayMode () { return _displayMode; }
void GCell::setDisplayMode ( unsigned int mode ) { _displayMode = mode; }
uint32_t GCell::getDisplayMode () { return _displayMode; }
void GCell::setDisplayMode ( uint32_t mode ) { _displayMode = mode; }
GCell::GCell ( AnabaticEngine* anabatic, DbU::Unit xmin, DbU::Unit ymin )
@ -1065,11 +1065,11 @@ namespace Anabatic {
{ return getDensity(depth) > Session::getSaturateRatio(); }
Interval GCell::getSide ( unsigned int direction ) const
{
if (direction & Flags::Vertical) return Interval( getYMin(), getYMax() );
return Interval( getXMin(), getXMax() );
}
// Interval GCell::getSide ( Flags direction ) const
// {
// if (direction & Flags::Vertical) return Interval( getYMin(), getYMax() );
// return Interval( getXMin(), getXMax() );
// }
AutoSegments GCell::getHStartSegments ()
@ -1154,7 +1154,7 @@ namespace Anabatic {
}
float GCell::getDensity ( unsigned int flags ) const
float GCell::getDensity ( Flags flags ) const
{
if (isInvalidated() and not(flags & Flags::NoUpdate)) const_cast<GCell*>(this)->updateDensity();
@ -1552,7 +1552,7 @@ namespace Anabatic {
bool GCell::stepDesaturate ( size_t depth
, set<Net*>& globalNets
, AutoSegment*& moved
, unsigned int flags
, Flags flags
)
{
cdebug_log(9000,0) << "Deter| GCell::stepDesaturate() [" << getId() << "] depth:" << depth << endl;

View File

@ -45,7 +45,7 @@ namespace Anabatic {
using Hurricane::NetRoutingExtension;
void AnabaticEngine::_desaturate ( unsigned int depth
void AnabaticEngine::_desaturate ( unsigned int depth
, set<Net*>& globalNets
, unsigned long& total
, unsigned long& globals )
@ -472,7 +472,7 @@ namespace Anabatic {
#endif
void AnabaticEngine::layerAssign ( unsigned int method )
void AnabaticEngine::layerAssign ( uint32_t method )
{
cdebug_log(9000,0) << "Deter| Layer Assignment" << endl;

View File

@ -102,7 +102,7 @@ namespace {
//! request the creation of a contact <em>on the target point</em>.
//! \function unsigned int checkRoutingPadSize ( Component* rp );
//! \function uint64_t checkRoutingPadSize ( Component* rp );
//!
//! Look at the geometrical size of the Component and assess if
//! it's span is too narrow either horizontally or vertically.
@ -127,7 +127,7 @@ namespace {
* call the canonization, which needs all the caches to be up to date.
*/
//! \function void GCellTopology::doRp_AutoContacts ( GCell* gcell, Component* rp, AutoContact*& source, AutoContact*& target, unsigned int flags );
//! \function void GCellTopology::doRp_AutoContacts ( GCell* gcell, Component* rp, AutoContact*& source, AutoContact*& target, uint64_t flags );
//! \param gcell The GCell into which create the AutoContact.
//! \param rp The Component we want to access.
//! \param source The AutoContact created on the \c source (\e returned).
@ -166,7 +166,7 @@ namespace {
//!
//! \image html doRp_AutoContacts.png "doRp_AutoContacts()"
//! \function AutoContact* GCellTopology::doRp_Access ( GCell* gcell, Component* rp, unsigned int flags );
//! \function AutoContact* GCellTopology::doRp_Access ( GCell* gcell, Component* rp, uint64_t flags );
//! \param gcell The GCell into which create the AutoContact.
//! \param rp The Component onto which anchor the access contact.
//! \param flags Relevant flags are:
@ -185,7 +185,7 @@ namespace {
//!
//! \image html doRp_Access.png "doRp_Access()"
//! \function AutoContact* GCellTopology::doRp_AccessPad ( RoutingPad* rp, unsigned int flags );
//! \function AutoContact* GCellTopology::doRp_AccessPad ( RoutingPad* rp, uint64_t flags );
//! \param rp The Component onto which anchor the access contact.
//! \param flags Relevant flags are:
//! - HAccess, the terminal is to be accessed through an horizontal
@ -405,21 +405,21 @@ namespace {
// ---------------------------------------------------------------
// Local Enum/Types.
enum LocalFunctionFlag { NoFlags = 0x00000000
, SortDecreasing = 0x00000001
, HAccess = 0x00000002
, VSmall = 0x00000004
, HSmall = 0x00000008
, Punctual = 0x00000010
, HCollapse = 0x00000020
, VCollapse = 0x00000040
, Terminal = 0x00000080
, DoSourceContact = 0x00000100
, DoTargetContact = 0x00000200
, SouthBound = 0x00010000
, NorthBound = 0x00020000
, WestBound = 0x00040000
, EastBound = 0x00080000
enum LocalFunctionFlag { NoFlags = (1 << 0)
, SortDecreasing = (1 << 1)
, HAccess = (1 << 2)
, VSmall = (1 << 3)
, HSmall = (1 << 4)
, Punctual = (1 << 5)
, HCollapse = (1 << 6)
, VCollapse = (1 << 7)
, Terminal = (1 << 8)
, DoSourceContact = (1 << 9)
, DoTargetContact = (1 << 10)
, SouthBound = (1 << 11)
, NorthBound = (1 << 12)
, WestBound = (1 << 13)
, EastBound = (1 << 14)
};
@ -483,7 +483,7 @@ namespace {
}
unsigned int checkRoutingPadSize ( Component* anchor )
uint64_t checkRoutingPadSize ( Component* anchor )
{
Point source;
Point target;
@ -496,7 +496,7 @@ namespace {
DbU::Unit width = abs( target.getX() - source.getX() );
DbU::Unit height = abs( target.getY() - source.getY() );
unsigned int flags = 0;
uint64_t flags = 0;
flags |= (width < 3*Session::getPitch(anchorDepth)) ? HSmall : 0;
flags |= (height < 3*Session::getPitch(anchorDepth)) ? VSmall : 0;
flags |= ((width == 0) && (height == 0)) ? Punctual : 0;
@ -518,7 +518,7 @@ namespace {
}
unsigned int getSegmentHookType ( Hook* hook )
uint64_t getSegmentHookType ( Hook* hook )
{
Horizontal* horizontal = dynamic_cast<Horizontal*>( hook->getComponent() );
if (horizontal) {
@ -548,14 +548,14 @@ namespace {
class SortHkByX {
public:
inline SortHkByX ( unsigned int flags );
inline SortHkByX ( uint64_t flags );
inline bool operator() ( Hook* h1, Hook* h2 );
protected:
unsigned int _flags;
uint64_t _flags;
};
inline SortHkByX::SortHkByX ( unsigned int flags )
inline SortHkByX::SortHkByX ( uint64_t flags )
: _flags(flags)
{ }
@ -586,14 +586,14 @@ namespace {
class SortHkByY {
public:
inline SortHkByY ( unsigned int flags );
inline SortHkByY ( uint64_t flags );
inline bool operator() ( Hook* h1, Hook* h2 );
protected:
unsigned int _flags;
uint64_t _flags;
};
inline SortHkByY::SortHkByY ( unsigned int flags )
inline SortHkByY::SortHkByY ( uint64_t flags )
: _flags(flags)
{ }
@ -624,14 +624,14 @@ namespace {
class SortRpByX {
public:
inline SortRpByX ( unsigned int flags );
inline SortRpByX ( uint64_t flags );
inline bool operator() ( Component* rp1, Component* rp2 );
protected:
unsigned int _flags;
uint64_t _flags;
};
inline SortRpByX::SortRpByX ( unsigned int flags )
inline SortRpByX::SortRpByX ( uint64_t flags )
: _flags(flags)
{ }
@ -651,14 +651,14 @@ namespace {
class SortRpByY {
public:
inline SortRpByY ( unsigned int flags );
inline SortRpByY ( uint64_t flags );
inline bool operator() ( Component* rp1, Component* rp2 );
protected:
unsigned int _flags;
uint64_t _flags;
};
inline SortRpByY::SortRpByY ( unsigned int flags )
inline SortRpByY::SortRpByY ( uint64_t flags )
: _flags(flags)
{ }
@ -718,10 +718,10 @@ namespace {
void construct ( ForkStack& forks );
inline unsigned int getStateG () const;
inline GCell* getGCell () const;
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 AutoContact* doRp_AccessAnalog ( GCell*, RoutingPad*, unsigned int flags );
static void doRp_AutoContacts ( GCell*, Component*, AutoContact*& source, AutoContact*& target, uint64_t flags );
static AutoContact* doRp_Access ( GCell*, Component*, uint64_t flags );
static AutoContact* doRp_AccessPad ( RoutingPad*, uint64_t flags );
static AutoContact* doRp_AccessAnalog ( GCell*, RoutingPad*, uint64_t flags );
static void doRp_StairCaseH ( GCell*, Component* rp1, Component* rp2 );
static void doRp_StairCaseV ( GCell*, Component* rp1, Component* rp2 );
private:
@ -1207,7 +1207,7 @@ namespace {
, Component* rp
, AutoContact*& source
, AutoContact*& target
, unsigned int flags
, uint64_t flags
)
{
cdebug_log(145,1) << "doRp_AutoContacts()" << endl;
@ -1219,7 +1219,7 @@ namespace {
Point targetPosition;
const Layer* rpLayer = rp->getLayer();
size_t rpDepth = Session::getLayerDepth( rp->getLayer() );
unsigned int direction = Session::getDirection ( rpDepth );
Flags direction = Session::getDirection ( rpDepth );
DbU::Unit viaSide = Session::getWireWidth ( rpDepth );
getPositions( rp, sourcePosition, targetPosition );
@ -1293,7 +1293,7 @@ namespace {
}
AutoContact* GCellTopology::doRp_Access ( GCell* gcell, Component* rp, unsigned int flags )
AutoContact* GCellTopology::doRp_Access ( GCell* gcell, Component* rp, uint64_t flags )
{
cdebug_log(145,1) << "doRp_Access() - flags:" << flags << endl;
@ -1326,7 +1326,7 @@ namespace {
}
AutoContact* GCellTopology::doRp_AccessPad ( RoutingPad* rp, unsigned int flags )
AutoContact* GCellTopology::doRp_AccessPad ( RoutingPad* rp, uint64_t flags )
{
cdebug_log(145,1) << "doRp_AccessPad()" << endl;
cdebug_log(145,0) << rp << endl;
@ -1473,7 +1473,7 @@ namespace {
}
AutoContact* GCellTopology::doRp_AccessAnalog ( GCell* gcell, RoutingPad* rp, unsigned int flags )
AutoContact* GCellTopology::doRp_AccessAnalog ( GCell* gcell, RoutingPad* rp, uint64_t flags )
{
cdebug_log(145,1) << "doRp_AccessAnalog()" << endl;
cdebug_log(145,0) << rp << endl;
@ -1637,12 +1637,12 @@ namespace {
cdebug_log(145,1) << "_do_xG_1Pad() [Managed Configuration - Optimized] " << _topology << endl;
cdebug_log(145,0) << "_connexity.globals:" << (int)_connexity.fields.globals << endl;
unsigned int flags = NoFlags;
bool eastPad = false;
bool westPad = false;
bool northPad = false;
bool southPad = false;
Instance* padInstance = _routingPads[0]->getOccurrence().getPath().getHeadInstance();
uint64_t flags = NoFlags;
bool eastPad = false;
bool westPad = false;
bool northPad = false;
bool southPad = false;
Instance* padInstance = _routingPads[0]->getOccurrence().getPath().getHeadInstance();
switch ( padInstance->getTransformation().getOrientation() ) {
case Transformation::Orientation::ID: northPad = true; break;
@ -1657,10 +1657,10 @@ namespace {
break;
}
cdebug_log(145,0) << "eastPad:" << eastPad << ", "
<< "westPad:" << westPad << ", "
<< "northPad:" << northPad << ", "
<< "southPad:" << southPad
<< endl;
<< "westPad:" << westPad << ", "
<< "northPad:" << northPad << ", "
<< "southPad:" << southPad
<< endl;
AutoContact* source = doRp_AccessPad( _routingPads[0], flags );
// Point position = _routingPads[0]->getCenter();
@ -1759,7 +1759,7 @@ namespace {
{
cdebug_log(145,1) << "_do_1G_1M1() [Managed Configuration - Optimized] " << _topology << endl;
unsigned int flags = NoFlags;
uint64_t flags = NoFlags;
if (_east ) { flags |= HAccess; }
else if (_west ) { flags |= HAccess; }
else if (_north) { flags |= VSmall; }
@ -1776,7 +1776,7 @@ namespace {
cdebug_log(145,1) << "_do_1G_" << (int)_connexity.fields.M1 << "M1() [Managed Configuration]" << endl;
sort( _routingPads.begin(), _routingPads.end(), SortRpByX(NoFlags) ); // increasing X.
for ( unsigned int i=1 ; i<_routingPads.size() ; ++i ) {
for ( size_t i=1 ; i<_routingPads.size() ; ++i ) {
AutoContact* leftContact = doRp_Access( _gcell, _routingPads[i-1], HAccess );
AutoContact* rightContact = doRp_Access( _gcell, _routingPads[i ], HAccess );
AutoSegment::create( leftContact, rightContact, Flags::Horizontal );
@ -1789,7 +1789,7 @@ namespace {
globalRp = _routingPads[0];
cdebug_log(145,0) << "| Initial N/S Global RP: " << globalRp << endl;
for ( unsigned int i=1 ; i<_routingPads.size() ; ++i ) {
for ( size_t i=1 ; i<_routingPads.size() ; ++i ) {
if (_routingPads[i]->getBoundingBox().getHeight() > globalRp->getBoundingBox().getHeight()) {
cdebug_log(145,0) << "| Better RP: " << globalRp << endl;
globalRp = _routingPads[i];
@ -1889,7 +1889,7 @@ namespace {
rpM3 = _routingPads[0];
sort( _routingPads.begin(), _routingPads.end(), SortRpByX(NoFlags) ); // increasing X.
for ( unsigned int i=1 ; i<_routingPads.size() ; ++i ) {
for ( size_t i=1 ; i<_routingPads.size() ; ++i ) {
AutoContact* leftContact = doRp_Access( _gcell, _routingPads[i-1], HAccess );
AutoContact* rightContact = doRp_Access( _gcell, _routingPads[i ], HAccess );
AutoSegment::create( leftContact, rightContact, Flags::Horizontal );
@ -1927,7 +1927,7 @@ namespace {
// All RoutingPad are M1.
Component* southWestRp = _routingPads[0];
cdebug_log(145,0) << "| Initial S-W Global RP: " << southWestRp << endl;
for ( unsigned int i=1 ; i<_routingPads.size() ; ++i ) {
for ( size_t i=1 ; i<_routingPads.size() ; ++i ) {
if (southWestRp->getBoundingBox().getHeight() >= 4*Session::getPitch(1)) break;
if (_routingPads[i]->getBoundingBox().getHeight() > southWestRp->getBoundingBox().getHeight()) {
cdebug_log(145,0) << "| Better RP: " << southWestRp << endl;
@ -1951,7 +1951,7 @@ namespace {
cdebug_log(145,0) << "| Initial N-E Global RP: " << northEastRp << endl;
if (_routingPads.size() > 1) {
for ( unsigned int i=_routingPads.size()-1; i != 0 ; ) {
for ( size_t i=_routingPads.size()-1; i != 0 ; ) {
i -= 1;
if (northEastRp->getBoundingBox().getHeight() >= 4*Session::getPitch(1)) break;
if (_routingPads[i]->getBoundingBox().getHeight() > northEastRp->getBoundingBox().getHeight()) {
@ -2006,7 +2006,7 @@ namespace {
<< (int)_connexity.fields.M2 << "M2() [Managed Configuration - x]" << endl;
Component* biggestRp = _routingPads[0];
for ( unsigned int i=1 ; i<_routingPads.size() ; ++i ) {
for ( size_t i=1 ; i<_routingPads.size() ; ++i ) {
doRp_StairCaseH( _gcell, _routingPads[i-1], _routingPads[i] );
if (_routingPads[i]->getBoundingBox().getWidth() > biggestRp->getBoundingBox().getWidth())
biggestRp = _routingPads[i];
@ -2042,7 +2042,7 @@ namespace {
{
cdebug_log(145,1) << "_do_1G_1M3() [Optimised Configuration]" << endl;
unsigned int flags = (_east or _west) ? HAccess : NoFlags;
uint64_t flags = (_east or _west) ? HAccess : NoFlags;
flags |= (_north) ? DoTargetContact : NoFlags;
flags |= (_south) ? DoSourceContact : NoFlags;
@ -2091,7 +2091,7 @@ namespace {
cdebug_log(145,0) << "_north:" << _north << endl;
sort( _routingPads.begin(), _routingPads.end(), SortRpByY(NoFlags) ); // increasing Y.
for ( unsigned int i=1 ; i<_routingPads.size() ; i++ ) {
for ( size_t i=1 ; i<_routingPads.size() ; i++ ) {
doRp_StairCaseV( _gcell, _routingPads[i-1], _routingPads[i] );
}
@ -2263,7 +2263,7 @@ namespace {
{
cdebug_log(145,1) << "void GCellTopology::_doDevice ()" << _gcell << endl;
// #0: Check if all RoutingPads are set to a component.
for ( unsigned int i=0; i<_routingPads.size() ; i++ ) {
for ( size_t i=0; i<_routingPads.size() ; i++ ) {
if ( ( _routingPads[i]->getSourcePosition().getX() == _routingPads[i]->getTargetPosition().getX() )
&&( _routingPads[i]->getSourcePosition().getY() == _routingPads[i]->getTargetPosition().getY() )
){
@ -2294,7 +2294,7 @@ namespace {
rpNE = _routingPads[0];
rpSW = _routingPads[0];
for ( unsigned int i=1 ; i<_routingPads.size() ; i++ ) {
for ( size_t i=1 ; i<_routingPads.size() ; i++ ) {
rpNE = returnNE( _gcell, rpNE, _routingPads[i] );
rpSW = returnSW( _gcell, rpSW, _routingPads[i] );
}
@ -3409,14 +3409,14 @@ namespace Anabatic {
startMeasures();
openSession();
forEach ( Net*, inet, getCell()->getNets() ) {
if (NetRoutingExtension::isAutomaticGlobalRoute(*inet)) {
DebugSession::open( *inet, 140, 150 );
_loadNetGlobalRouting( *inet );
for ( Net* net : getCell()->getNets() ) {
if (NetRoutingExtension::isAutomaticGlobalRoute(net)) {
DebugSession::open( net, 145, 150 );
_loadNetGlobalRouting( net );
Session::revalidate();
DebugSession::close();
}
} // forEach(Net*)
}
#if defined(CHECK_DATABASE)
_check ( "after Anabatic loading" );

View File

@ -248,7 +248,7 @@ namespace Anabatic {
_segmentInvalidateds.clear();
cdebug_log(145,0) << "AutoSegments/AutoContacts queued deletion." << endl;
unsigned int flags = _anabatic->flags() & Flags::DestroyMask;
Flags flags = _anabatic->flags() & Flags::DestroyMask;
_anabatic->flags() = Flags::DestroyMask;
set<AutoSegment*>::iterator isegment = _destroyedSegments.begin();
for ( ; isegment != _destroyedSegments.end() ; isegment++ ) {
@ -300,18 +300,18 @@ namespace Anabatic {
}
unsigned int Session::getDirection ( size_t depth )
Flags Session::getDirection ( size_t depth )
{
RoutingGauge* rg = get("getDirection()")->_routingGauge;
switch ( rg->getLayerDirection(depth) ) {
case Constant::Horizontal: return Flags::Horizontal;
case Constant::Vertical: return Flags::Vertical;
}
return 0;
return Flags::NoFlags;
}
DbU::Unit Session::_getPitch ( size_t depth, unsigned int flags ) const
DbU::Unit Session::_getPitch ( size_t depth, Flags flags ) const
{
if (flags == Flags::NoFlags) return _routingGauge->getLayerPitch(depth);
@ -380,7 +380,7 @@ namespace Anabatic {
{ return get("doWarnGCellOverload()")->_anabatic->doWarnOnGCellOverload(); }
void Session::setAnabaticFlags ( unsigned int flags )
void Session::setAnabaticFlags ( Flags flags )
{ get("setKabaticFlags()")->_anabatic->flags() = flags; }

View File

@ -163,7 +163,7 @@ namespace Anabatic {
// Class : "Anabatic::AnabaticEngine".
typedef std::set<Net*,Entity::CompareById> NetSet;
typedef std::map<unsigned int,NetData*> NetDatas;
typedef std::map<uint64_t,NetData*> NetDatas;
class AnabaticEngine : public ToolEngine {
@ -184,7 +184,7 @@ namespace Anabatic {
static const Name& staticGetName ();
virtual const Name& getName () const;
virtual Configuration* getConfiguration ();
inline unsigned int getDensityMode () const;
inline uint64_t getDensityMode () const;
inline CellViewer* getViewer () const;
inline void setViewer ( CellViewer* );
inline EngineState getState () const;
@ -200,11 +200,11 @@ namespace Anabatic {
size_t getNetsFromEdge ( const Edge*, NetSet& );
virtual void openSession ();
inline void setState ( EngineState state );
inline void setDensityMode ( unsigned int );
inline void setDensityMode ( uint64_t );
inline void addOv ( Edge* );
inline void removeOv ( Edge* );
inline const NetDatas& getNetDatas () const;
NetData* getNetData ( Net*, unsigned int flags=Flags::NoFlags );
NetData* getNetData ( Net*, Flags flags=Flags::NoFlags );
void setupNetDatas ();
void updateMatrix ();
// Dijkstra related functions.
@ -239,12 +239,12 @@ namespace Anabatic {
void chipPrep ();
void setupSpecialNets ();
void setupPreRouteds ();
void loadGlobalRouting ( unsigned int method );
void loadGlobalRouting ( uint32_t method );
void computeNetConstraints ( Net* );
void toOptimals ( Net* );
void updateNetTopology ( Net* );
bool moveUpNetTrunk ( AutoSegment*, set<Net*>& globalNets, GCell::Set& invalidateds );
void layerAssign ( unsigned int method );
void layerAssign ( uint32_t method );
void finalizeLayout ();
inline const AutoContactLut& _getAutoContactLut () const;
inline const AutoSegmentLut& _getAutoSegmentLut () const;
@ -304,7 +304,7 @@ namespace Anabatic {
CellViewer* _viewer;
Flags _flags;
int _stamp;
unsigned int _densityMode;
uint64_t _densityMode;
AutoSegmentLut _autoSegmentLut;
AutoContactLut _autoContactLut;
Net* _blockageNet;
@ -322,8 +322,8 @@ namespace Anabatic {
inline GCell* AnabaticEngine::getGCellUnder ( DbU::Unit x, DbU::Unit y ) const { return _matrix.getUnder(x,y); }
inline GCell* AnabaticEngine::getGCellUnder ( Point p ) const { return _matrix.getUnder(p); }
inline GCellsUnder AnabaticEngine::getGCellsUnder ( Segment* s ) const { return std::shared_ptr<RawGCellsUnder>( new RawGCellsUnder(this,s) ); }
inline unsigned int AnabaticEngine::getDensityMode () const { return _densityMode; }
inline void AnabaticEngine::setDensityMode ( unsigned int mode ) { _densityMode=mode; }
inline uint64_t AnabaticEngine::getDensityMode () const { return _densityMode; }
inline void AnabaticEngine::setDensityMode ( uint64_t mode ) { _densityMode=mode; }
inline void AnabaticEngine::setBlockageNet ( Net* net ) { _blockageNet = net; }
inline const AutoContactLut& AnabaticEngine::_getAutoContactLut () const { return _autoContactLut; }
inline const AutoSegmentLut& AnabaticEngine::_getAutoSegmentLut () const { return _autoSegmentLut; }

View File

@ -106,13 +106,13 @@ namespace Anabatic {
inline bool isInvalidatedCache () const;
inline bool isTerminal () const;
inline bool isTurn () const;
bool isTee ( unsigned int direction ) const;
bool isTee ( Flags direction ) const;
inline bool isHTee () const;
inline bool isVTee () const;
inline bool isFixed () const;
inline bool isUserNativeConstraints () const;
inline bool hasBadTopology () const;
bool canDestroy ( unsigned int flags=0 ) const;
bool canDestroy ( Flags flags=Flags::NoFlags ) const;
bool canMoveUp ( const AutoSegment* moved ) const;
// Accessors.
inline Contact* base () const;
@ -130,8 +130,8 @@ namespace Anabatic {
inline unsigned int getMaxDepth () const;
void getLengths ( DbU::Unit* lengths, AutoSegment::DepthLengthSet& );
virtual Box getNativeConstraintBox () const;
Interval getNativeUConstraints ( unsigned int direction ) const;
Interval getUConstraints ( unsigned int direction ) const;
Interval getNativeUConstraints ( Flags direction ) const;
Interval getUConstraints ( Flags direction ) const;
inline DbU::Unit getCBXMin () const;
inline DbU::Unit getCBXMax () const;
inline DbU::Unit getCBYMin () const;
@ -141,17 +141,17 @@ namespace Anabatic {
// Collections.
AutoSegments getAutoSegments ();
// Modifiers.
void invalidate ( unsigned int flags=0 );
void invalidate ( Flags flags=Flags::NoFlags );
virtual void cacheDetach ( AutoSegment* ) = 0;
virtual void cacheAttach ( AutoSegment* ) = 0;
virtual void updateCache () = 0;
virtual void updateGeometry () = 0;
virtual void updateTopology () = 0;
void showTopologyError ( const std::string&, unsigned int flags=0 );
void showTopologyError ( const std::string&, Flags flags=Flags::NoFlags );
virtual void checkTopology ();
virtual void forceOnGrid ( Point );
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setFlags ( Flags );
inline void unsetFlags ( Flags );
void setGCell ( GCell* );
inline void setCBXMin ( DbU::Unit xMin );
inline void setCBXMax ( DbU::Unit xMax );
@ -160,7 +160,7 @@ namespace Anabatic {
void setConstraintBox ( const Box& box );
bool restrictConstraintBox ( DbU::Unit constraintMin
, DbU::Unit constraintMax
, unsigned int flags=Flags::WarnOnError );
, Flags flags=Flags::WarnOnError );
void restoreNativeConstraintBox ();
void migrateConstraintBox ( AutoContact* other );
void destroy ();
@ -179,7 +179,7 @@ namespace Anabatic {
size_t _id;
Contact* _contact;
GCell* _gcell;
unsigned int _flags;
Flags _flags;
DbU::Unit _xMin;
DbU::Unit _xMax;
DbU::Unit _yMin;
@ -200,7 +200,7 @@ namespace Anabatic {
inline int _boundX ( DbU::Unit x ) const;
inline int _boundY ( DbU::Unit x ) const;
static void _getTopology ( Contact*, Component*& anchor, Horizontal**&, Vertical**&, size_t );
virtual void _invalidate ( unsigned int flags ) = 0;
virtual void _invalidate ( Flags flags ) = 0;
};
@ -251,8 +251,8 @@ namespace Anabatic {
inline void AutoContact::setCBXMax ( DbU::Unit xMax ) { _xMax = _boundX(xMax); }
inline void AutoContact::setCBYMin ( DbU::Unit yMin ) { _yMin = _boundY(yMin); }
inline void AutoContact::setCBYMax ( DbU::Unit yMax ) { _yMax = _boundY(yMax); }
inline void AutoContact::setFlags ( unsigned int flags ) { _flags|= flags; }
inline void AutoContact::unsetFlags ( unsigned int flags ) { _flags&=~flags; }
inline void AutoContact::setFlags ( Flags flags ) { _flags|= flags; }
inline void AutoContact::unsetFlags ( Flags flags ) { _flags&=~flags; }
inline DbU::Unit AutoContact::getCBXMin () const { return isFixed() ? _contact->getX() : _xMin; }
inline DbU::Unit AutoContact::getCBXMax () const { return isFixed() ? _contact->getX() : _xMax; }
inline DbU::Unit AutoContact::getCBYMin () const { return isFixed() ? _contact->getY() : _yMin; }
@ -277,7 +277,7 @@ namespace Anabatic {
class LocatorHelper {
public:
inline LocatorHelper ( AutoContact*, unsigned int flags=0 );
inline LocatorHelper ( AutoContact*, Flags flags=Flags::NoFlags );
inline bool isValid () const;
inline AutoSegment* getSegment () const;
inline void progress ();
@ -285,13 +285,13 @@ namespace Anabatic {
inline unsigned int _min () const;
inline unsigned int _max () const;
private:
unsigned int _flags;
Flags _flags;
unsigned int _index;
AutoContact* _contact;
};
inline LocatorHelper::LocatorHelper ( AutoContact* contact, unsigned int flags )
inline LocatorHelper::LocatorHelper ( AutoContact* contact, Flags flags )
: _flags(flags), _index(_min()), _contact(contact)
{
cdebug_tabw(145,1);
@ -314,7 +314,7 @@ namespace Anabatic {
inline AutoSegment* LocatorHelper::getSegment () const
{
cdebug_log(145,0) << "LocatorHelper::getSegment(" << _index << ") - " << _contact->getSegment(_index) << endl;
cdebug_log(145,0) << " LocatorHelper::getSegment(" << _index << ") - " << _contact->getSegment(_index) << endl;
return (_index < _max()) ? _contact->getSegment(_index) : NULL;
}

View File

@ -39,7 +39,7 @@ namespace Anabatic {
// Constructors & Destructors.
AutoContactHTee ( GCell*, Contact* );
virtual ~AutoContactHTee ();
virtual void _invalidate ( unsigned int flags );
virtual void _invalidate ( Flags flags );
public:
inline AutoHorizontal* getHorizontal1 () const;
inline AutoHorizontal* getHorizontal2 () const;

View File

@ -57,7 +57,7 @@ namespace Anabatic {
// Constructors & Destructors.
AutoContactTerminal ( GCell*, Contact* );
virtual ~AutoContactTerminal ();
virtual void _invalidate ( unsigned int flags );
virtual void _invalidate ( Flags flags );
public:
bool isEndPoint () const;
virtual Box getNativeConstraintBox () const;

View File

@ -38,7 +38,7 @@ namespace Anabatic {
// Constructors & Destructors.
AutoContactTurn ( GCell*, Contact* );
virtual ~AutoContactTurn ();
virtual void _invalidate ( unsigned int flags );
virtual void _invalidate ( Flags flags );
public:
inline AutoHorizontal* getHorizontal1 () const;
inline AutoVertical* getVertical1 () const;

View File

@ -36,7 +36,7 @@ namespace Anabatic {
// Constructors & Destructors.
AutoContactVTee ( GCell*, Contact* );
virtual ~AutoContactVTee ();
virtual void _invalidate ( unsigned int flags );
virtual void _invalidate ( Flags flags );
public:
inline AutoHorizontal* getHorizontal1 () const;
inline AutoVertical* getVertical1 () const;

View File

@ -46,8 +46,8 @@ namespace Anabatic {
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 Interval getSourceConstraints ( Flags flags=0 ) const;
virtual Interval getTargetConstraints ( Flags flags=0 ) const;
virtual Flags getDirection () const;
virtual size_t getGCells ( vector<GCell*>& ) const;
// Modifiers.
@ -59,10 +59,10 @@ namespace Anabatic {
virtual void updateNativeConstraints ();
virtual bool checkPositions () const;
virtual bool checkConstraints () const;
virtual unsigned int _makeDogleg ( GCell*, unsigned int flags );
virtual Flags _makeDogleg ( GCell*, Flags flags );
virtual bool moveULeft ();
virtual bool moveURight ();
virtual bool _slacken ( unsigned int flags );
virtual bool _slacken ( Flags flags );
#if THIS_IS_DISABLED
virtual void desalignate ( AutoContact* );
#endif

View File

@ -118,11 +118,11 @@ namespace Anabatic {
Observable& operator= ( const StaticObservable& );
};
public:
enum ObserverFlag { Create = 0x000000001
, Destroy = 0x000000002
, Invalidate = 0x000000004
, Revalidate = 0x000000008
, RevalidatePPitch = 0x000000010
enum ObserverFlag { Create = (1 << 0)
, Destroy = (1 << 1)
, Invalidate = (1 << 2)
, Revalidate = (1 << 3)
, RevalidatePPitch = (1 << 4)
};
public:
typedef std::function< void(AutoSegment*) > RevalidateCb_t;
@ -134,7 +134,7 @@ namespace Anabatic {
);
static AutoSegment* create ( AutoContact* source
, AutoContact* target
, unsigned int dir
, Flags dir
, size_t depth=RoutingGauge::nlayerdepth
);
void destroy ();
@ -181,7 +181,7 @@ namespace Anabatic {
inline bool isNotSourceAligned () const;
inline bool isNotTargetAligned () const;
inline bool isNotAligned () const;
bool isStrongTerminal ( unsigned int flags=0 ) const;
bool isStrongTerminal ( Flags flags=Flags::NoFlags ) const;
inline bool isSourceTerminal () const;
inline bool isTargetTerminal () const;
inline bool isLayerChange () const;
@ -204,19 +204,19 @@ namespace Anabatic {
virtual bool _canSlacken () const = 0;
bool canReduce () const;
bool mustRaise () const;
unsigned int canDogleg ( Interval );
Flags 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;
bool canMoveUp ( float reserve=0.0, Flags flags=Flags::NoFlags ) const;
bool canPivotUp ( float reserve=0.0, Flags flags=Flags::NoFlags ) const;
bool canPivotDown ( float reserve=0.0, Flags flags=Flags::NoFlags ) const;
bool canSlacken ( Flags flags=Flags::NoFlags ) const;
virtual bool checkPositions () const = 0;
virtual bool checkConstraints () const = 0;
bool checkDepthSpin () const;
// Accessors.
inline unsigned long getId () const;
inline unsigned int getFlags () const;
inline uint32_t getFlags () const;
virtual Flags getDirection () const = 0;
inline GCell* getGCell () const;
virtual size_t getGCells ( vector<GCell*>& ) const = 0;
@ -237,8 +237,8 @@ namespace Anabatic {
inline 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 Interval getSourceConstraints ( Flags flags=Flags::NoFlags ) const = 0;
virtual Interval getTargetConstraints ( Flags flags=Flags::NoFlags ) const = 0;
virtual bool getConstraints ( DbU::Unit& min, DbU::Unit& max ) const = 0;
inline bool getConstraints ( Interval& i ) const;
inline const Interval& getUserConstraints () const;
@ -252,11 +252,11 @@ namespace Anabatic {
virtual DbU::Unit getCost ( DbU::Unit axis ) const;
virtual AutoSegment* getCanonical ( DbU::Unit& min , DbU::Unit& max );
inline AutoSegment* getCanonical ( Interval& i );
float getMaxUnderDensity ( unsigned int flags );
float getMaxUnderDensity ( Flags flags );
// Modifiers.
inline void unsetFlags ( unsigned int );
inline void setFlags ( unsigned int );
void setFlagsOnAligneds ( unsigned int );
inline void unsetFlags ( uint32_t );
inline void setFlags ( uint32_t );
void setFlagsOnAligneds ( uint32_t );
inline void incReduceds ();
inline void decReduceds ();
virtual void setDuSource ( DbU::Unit du ) = 0;
@ -283,35 +283,35 @@ namespace Anabatic {
inline void setParent ( AutoSegment* );
void revalidate ();
AutoSegment* makeDogleg ( AutoContact* );
unsigned int makeDogleg ( Interval, unsigned int flags=Flags::NoFlags );
unsigned int makeDogleg ( GCell*, unsigned int flags=Flags::NoFlags );
virtual unsigned int _makeDogleg ( GCell*, unsigned int flags ) = 0;
Flags makeDogleg ( Interval, Flags flags=Flags::NoFlags );
Flags makeDogleg ( GCell* , Flags flags=Flags::NoFlags );
virtual Flags _makeDogleg ( GCell* , Flags flags ) = 0;
virtual bool moveULeft () = 0;
virtual bool moveURight () = 0;
bool slacken ( unsigned int flags );
virtual bool _slacken ( unsigned int flags ) = 0;
void _changeDepth ( unsigned int depth, unsigned int flags );
void changeDepth ( unsigned int depth, unsigned int flags );
bool moveUp ( unsigned int flags=Flags::NoFlags );
bool moveDown ( unsigned int flags=Flags::NoFlags );
bool slacken ( Flags flags );
virtual bool _slacken ( Flags flags ) = 0;
void _changeDepth ( unsigned int depth, Flags flags );
void changeDepth ( unsigned int depth, Flags flags );
bool moveUp ( Flags flags=Flags::NoFlags );
bool moveDown ( Flags flags=Flags::NoFlags );
bool reduceDoglegLayer ();
bool reduce ();
bool raise ();
// Canonical Modifiers.
AutoSegment* canonize ( unsigned int flags=Flags::NoFlags );
virtual void invalidate ( unsigned int flags=Flags::Propagate );
AutoSegment* canonize ( Flags flags=Flags::NoFlags );
virtual void invalidate ( Flags flags=Flags::Propagate );
void invalidate ( AutoContact* );
void computeOptimal ( set<AutoSegment*>& processeds );
void setAxis ( DbU::Unit, unsigned int flags=Flags::NoFlags );
bool toConstraintAxis ( unsigned int flags=Flags::Realignate );
bool toOptimalAxis ( unsigned int flags=Flags::Realignate );
void setAxis ( DbU::Unit, Flags flags=Flags::NoFlags );
bool toConstraintAxis ( Flags flags=Flags::Realignate );
bool toOptimalAxis ( Flags flags=Flags::Realignate );
// Collections & Filters.
AutoSegments getOnSourceContact ( unsigned int direction );
AutoSegments getOnTargetContact ( unsigned int direction );
AutoSegments getCachedOnSourceContact ( unsigned int direction );
AutoSegments getCachedOnTargetContact ( unsigned int direction );
AutoSegments getAligneds ( unsigned int flags=Flags::NoFlags );
AutoSegments getConnecteds ( unsigned int flags=Flags::NoFlags );
AutoSegments getOnSourceContact ( Flags direction );
AutoSegments getOnTargetContact ( Flags direction );
AutoSegments getCachedOnSourceContact ( Flags direction );
AutoSegments getCachedOnTargetContact ( Flags direction );
AutoSegments getAligneds ( Flags flags=Flags::NoFlags );
AutoSegments getConnecteds ( Flags flags=Flags::NoFlags );
AutoSegments getPerpandiculars ();
size_t getAlignedContacts ( map<AutoContact*,int>& ) const ;
// Observers.
@ -330,7 +330,7 @@ namespace Anabatic {
bool shearUp ( GCell*
, AutoSegment*& movedUp
, float reserve
, unsigned int flags );
, Flags flags );
#endif
protected:
@ -343,7 +343,7 @@ namespace Anabatic {
// Internal: Attributes.
const unsigned long _id;
GCell* _gcell;
unsigned int _flags;
uint32_t _flags;
unsigned int _depth : 8;
unsigned int _optimalMin :16;
unsigned int _optimalMax :16;
@ -367,7 +367,7 @@ namespace Anabatic {
AutoSegment& operator= ( const AutoSegment& );
protected:
void _invalidate ();
inline unsigned int _getFlags () const;
inline uint32_t _getFlags () const;
std::string _getStringFlags () const;
virtual void _setAxis ( DbU::Unit ) = 0;
@ -388,19 +388,20 @@ namespace Anabatic {
// Static Utilities.
public:
static inline unsigned int swapSourceTargetFlags ( AutoSegment* );
static inline uint32_t swapSourceTargetFlags ( AutoSegment* );
static inline bool areAlignedsAndDiffLayer ( AutoSegment*, AutoSegment* );
static bool isTopologicalBound ( AutoSegment* seed, unsigned int flags );
static AutoSegment* getGlobalThroughDogleg ( AutoSegment* dogleg, AutoContact* from );
static bool isTopologicalBound ( AutoSegment* seed, Flags flags );
static inline bool arePerpandiculars ( AutoSegment* a, AutoSegment* b );
static inline bool arePerpandiculars ( bool isHorizontalA, AutoSegment* b );
static inline bool areAligneds ( AutoSegment* a, AutoSegment* b );
static unsigned int getPerpandicularState ( AutoContact* contact
static Flags getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, bool isHorizontalMaster
, const Layer* masterLayer=NULL
);
static inline unsigned int getPerpandicularState ( AutoContact* contact
static inline Flags getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, AutoSegment* master
@ -491,11 +492,11 @@ namespace Anabatic {
inline bool AutoSegment::isInvalidatedLayer () const { return _flags & SegInvalidatedLayer; }
inline bool AutoSegment::isCreated () const { return _flags & SegCreated; }
inline bool AutoSegment::isUserDefined () const { return _flags & SegUserDefined; }
inline void AutoSegment::setFlags ( unsigned int flags ) { _flags |= flags; }
inline void AutoSegment::unsetFlags ( unsigned int flags ) { _flags &= ~flags; }
inline void AutoSegment::setFlags ( uint32_t flags ) { _flags |= flags; }
inline void AutoSegment::unsetFlags ( uint32_t flags ) { _flags &= ~flags; }
inline unsigned int AutoSegment::getFlags () const { return _flags; }
inline unsigned int AutoSegment::_getFlags () const { return _flags; }
inline uint32_t AutoSegment::getFlags () const { return _flags; }
inline uint32_t AutoSegment::_getFlags () const { return _flags; }
inline void AutoSegment::incReduceds () { if (_reduceds<3) ++_reduceds; }
inline void AutoSegment::decReduceds () { if (_reduceds>0) --_reduceds; }
inline void AutoSegment::setLayer ( const Layer* layer ) { base()->setLayer(layer); _depth=Session::getLayerDepth(layer); }
@ -522,15 +523,15 @@ namespace Anabatic {
inline unsigned long AutoSegment::getMaxId ()
{ return _maxId; }
inline unsigned int AutoSegment::swapSourceTargetFlags ( AutoSegment* segment )
inline uint32_t AutoSegment::swapSourceTargetFlags ( AutoSegment* segment )
{
unsigned int segFlags = segment->getFlags();
unsigned int swapFlags = segment->getFlags() & ~(SegSourceTop |SegTargetTop
|SegSourceBottom |SegTargetBottom
|SegSourceTerminal |SegTargetTerminal
|SegNotSourceAligned |SegNotTargetAligned
|SegInvalidatedSource|SegInvalidatedTarget
);
uint32_t segFlags = segment->getFlags();
uint32_t swapFlags = segment->getFlags() & ~(SegSourceTop |SegTargetTop
|SegSourceBottom |SegTargetBottom
|SegSourceTerminal |SegTargetTerminal
|SegNotSourceAligned |SegNotTargetAligned
|SegInvalidatedSource|SegInvalidatedTarget
);
swapFlags |= (segFlags & SegSourceTop ) ? SegTargetTop : SegNoFlags;
swapFlags |= (segFlags & SegSourceBottom ) ? SegTargetBottom : SegNoFlags;
@ -560,10 +561,10 @@ namespace Anabatic {
inline bool AutoSegment::areAligneds ( AutoSegment* a, AutoSegment* b )
{ return a and b and (a->isHorizontal() == b->isHorizontal()); }
inline unsigned int AutoSegment::getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, AutoSegment* master )
inline Flags AutoSegment::getPerpandicularState ( AutoContact* contact
, AutoSegment* source
, AutoSegment* current
, AutoSegment* master )
{
return getPerpandicularState ( contact, source, current, master->isHorizontal(), master->getLayer() );
}

View File

@ -218,7 +218,7 @@ namespace Anabatic {
// Sub-Class: Locator.
class Locator : public AutoSegmentHL {
public:
inline Locator ( AutoSegment* segment , unsigned int flags );
inline Locator ( AutoSegment* segment , Flags flags );
inline Locator ( const Locator &locator );
virtual AutoSegment* getElement () const;
virtual AutoSegmentHL* getClone () const;
@ -226,14 +226,14 @@ namespace Anabatic {
virtual void progress ();
virtual string _getString () const;
protected:
unsigned int _flags;
Flags _flags;
AutoSegment* _master;
AutoSegmentStack _stack;
};
public:
// AutoSegments_Aligneds Methods.
AutoSegments_Aligneds ( AutoSegment*, unsigned int flags=Flags::NoFlags );
AutoSegments_Aligneds ( AutoSegment*, Flags flags=Flags::NoFlags );
AutoSegments_Aligneds ( const AutoSegments_Aligneds& );
virtual AutoSegmentHC* getClone () const;
virtual AutoSegmentHL* getLocator () const;
@ -241,7 +241,7 @@ namespace Anabatic {
protected:
// AutoSegments_Aligneds Attributes.
unsigned int _flags;
Flags _flags;
AutoSegment* _segment;
};
@ -254,7 +254,7 @@ namespace Anabatic {
{ }
inline AutoSegments_Aligneds::AutoSegments_Aligneds ( AutoSegment* segment, unsigned int flags )
inline AutoSegments_Aligneds::AutoSegments_Aligneds ( AutoSegment* segment, Flags flags )
: AutoSegmentHC()
, _flags (flags)
, _segment(segment)
@ -277,7 +277,7 @@ namespace Anabatic {
// Sub-Class: Locator.
class Locator : public AutoSegmentHL {
public:
inline Locator ( AutoSegment* segment, unsigned int flags );
inline Locator ( AutoSegment* segment, Flags flags );
inline Locator ( const Locator &locator );
virtual AutoSegment* getElement () const;
virtual AutoSegmentHL* getClone () const;
@ -290,7 +290,7 @@ namespace Anabatic {
public:
// AutoSegments_Connecteds Methods.
AutoSegments_Connecteds ( AutoSegment*, unsigned int flags );
AutoSegments_Connecteds ( AutoSegment*, Flags flags );
AutoSegments_Connecteds ( const AutoSegments_Connecteds& );
virtual AutoSegmentHC* getClone () const;
virtual AutoSegmentHL* getLocator () const;
@ -298,7 +298,7 @@ namespace Anabatic {
protected:
// AutoSegments_Connecteds Attributes.
unsigned int _flags;
Flags _flags;
AutoSegment* _segment;
};
@ -309,7 +309,7 @@ namespace Anabatic {
{ }
inline AutoSegments_Connecteds::AutoSegments_Connecteds ( AutoSegment* segment, unsigned int flags )
inline AutoSegments_Connecteds::AutoSegments_Connecteds ( AutoSegment* segment, Flags flags )
: AutoSegmentHC()
, _flags (flags)
, _segment(segment)
@ -332,7 +332,7 @@ namespace Anabatic {
// Sub-Class: Locator.
class Locator : public AutoSegmentHL {
public:
Locator ( AutoSegment* master );
Locator ( AutoSegment* master, Flags flags );
inline Locator ( const Locator& );
virtual AutoSegment* getElement () const;
virtual AutoSegmentHL* getClone () const;
@ -340,7 +340,7 @@ namespace Anabatic {
virtual void progress ();
virtual string _getString () const;
protected:
unsigned int _flags;
Flags _flags;
AutoSegment* _master;
AutoSegmentStack _stack;
vector<AutoSegment*> _perpandiculars;
@ -348,7 +348,7 @@ namespace Anabatic {
public:
// AutoSegments_Perpandiculars Methods.
inline AutoSegments_Perpandiculars ( AutoSegment* master );
inline AutoSegments_Perpandiculars ( AutoSegment*, Flags flags=Flags::NoFlags );
inline AutoSegments_Perpandiculars ( const AutoSegments_Perpandiculars& );
virtual AutoSegmentHC* getClone () const;
virtual AutoSegmentHL* getLocator () const;
@ -356,7 +356,8 @@ namespace Anabatic {
protected:
// AutoSegments_Perpandiculars Attributes.
AutoSegment* _segment;
Flags _flags;
AutoSegment* _master;
};
@ -370,16 +371,18 @@ namespace Anabatic {
inline AutoSegments_Perpandiculars::AutoSegments_Perpandiculars
( AutoSegment* segment )
( AutoSegment* master, Flags flags )
: AutoSegmentHC()
, _segment(segment)
, _flags (flags)
, _master(master)
{ }
inline AutoSegments_Perpandiculars::AutoSegments_Perpandiculars
( const AutoSegments_Perpandiculars& autosegments )
: AutoSegmentHC()
, _segment(autosegments._segment)
, _flags (autosegments._flags)
, _master(autosegments._master)
{ }
@ -392,7 +395,7 @@ namespace Anabatic {
// Sub-Class: Locator.
class Locator : public AutoSegmentHL {
public:
Locator ( GCell* fcell, unsigned int flags );
Locator ( GCell* fcell, Flags flags );
inline Locator ( const Locator& );
virtual ~Locator ();
virtual AutoSegment* getElement () const;
@ -401,7 +404,7 @@ namespace Anabatic {
virtual void progress ();
virtual string _getString () const;
protected:
unsigned int _flags;
Flags _flags;
vector<AutoContact*>::const_iterator _itContact;
vector<AutoContact*>::const_iterator _itEnd;
Hurricane::Locator<Hook*>* _hookLocator;
@ -410,7 +413,7 @@ namespace Anabatic {
public:
// AutoSegments_Perpandiculars Methods.
inline AutoSegments_AnchorOnGCell ( GCell* fcell, unsigned int flags );
inline AutoSegments_AnchorOnGCell ( GCell* fcell, Flags flags );
inline AutoSegments_AnchorOnGCell ( const AutoSegments_AnchorOnGCell& );
virtual AutoSegmentHC* getClone () const;
virtual AutoSegmentHL* getLocator () const;
@ -418,8 +421,8 @@ namespace Anabatic {
public:
// AutoSegments_Perpandiculars Attributes.
GCell* _fcell;
unsigned int _flags;
GCell* _fcell;
Flags _flags;
};
@ -433,7 +436,7 @@ namespace Anabatic {
{ }
inline AutoSegments_AnchorOnGCell::AutoSegments_AnchorOnGCell ( GCell* fcell, unsigned int flags )
inline AutoSegments_AnchorOnGCell::AutoSegments_AnchorOnGCell ( GCell* fcell, Flags flags )
: AutoSegmentHC()
, _fcell(fcell)
, _flags(flags)
@ -457,7 +460,7 @@ namespace Anabatic {
// Sub-Class: Locator.
class Locator : public AutoSegmentHL {
public:
Locator ( AutoContact* sourceAnchor, unsigned int direction );
Locator ( AutoContact* sourceAnchor, Flags direction );
inline Locator ( const Locator& );
virtual ~Locator ();
virtual AutoSegment* getElement () const;
@ -473,7 +476,7 @@ namespace Anabatic {
public:
// AutoSegments_CachedOnContact Methods.
inline AutoSegments_CachedOnContact ( AutoContact* sourceContact
, unsigned int direction=Flags::Horizontal|Flags::Vertical );
, Flags direction=Flags::Horizontal|Flags::Vertical );
inline AutoSegments_CachedOnContact ( const AutoSegments_CachedOnContact& );
virtual AutoSegmentHC* getClone () const;
virtual AutoSegmentHL* getLocator () const;
@ -481,7 +484,7 @@ namespace Anabatic {
protected:
// AutoSegments_CachedOnContact Attributes.
unsigned int _direction;
Flags _direction;
AutoContact* _sourceContact;
};
@ -494,7 +497,7 @@ namespace Anabatic {
inline AutoSegments_CachedOnContact::AutoSegments_CachedOnContact
( AutoContact* sourceContact, unsigned int direction )
( AutoContact* sourceContact, Flags direction )
: AutoSegmentHC()
, _direction (direction)
, _sourceContact(sourceContact)
@ -527,17 +530,17 @@ namespace Anabatic {
class AutoSegments_InDirection : public AutoSegmentHF {
public:
inline AutoSegments_InDirection ( unsigned int direction );
inline AutoSegments_InDirection ( Flags direction );
inline AutoSegments_InDirection ( const AutoSegments_InDirection& );
virtual AutoSegmentHF* getClone () const;
virtual bool accept ( AutoSegment* segment ) const;
virtual string _getString () const;
protected:
unsigned int _direction;
Flags _direction;
};
inline AutoSegments_InDirection::AutoSegments_InDirection ( unsigned int direction )
inline AutoSegments_InDirection::AutoSegments_InDirection ( Flags direction )
: AutoSegmentHF()
, _direction(direction)
{}

View File

@ -46,8 +46,8 @@ namespace Anabatic {
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 Interval getSourceConstraints ( Flags flags=0 ) const;
virtual Interval getTargetConstraints ( Flags flags=0 ) const;
virtual Flags getDirection () const;
virtual size_t getGCells ( vector<GCell*>& ) const;
// Modifiers.
@ -59,10 +59,10 @@ namespace Anabatic {
virtual void updateNativeConstraints ();
virtual bool checkPositions () const;
virtual bool checkConstraints () const;
virtual unsigned int _makeDogleg ( GCell*, unsigned int flags );
virtual Flags _makeDogleg ( GCell*, Flags flags );
virtual bool moveULeft ();
virtual bool moveURight ();
virtual bool _slacken ( unsigned int flags );
virtual bool _slacken ( Flags flags );
#if THIS_IS_DISABLED
virtual void desalignate ( AutoContact* );
#endif

View File

@ -60,6 +60,7 @@ namespace Anabatic {
// Flags for functions arguments only.
static const uint64_t Create ; // = (1 << 5);
static const uint64_t WithPerpands ;
static const uint64_t WithDoglegs ;
static const uint64_t WithSelf ;
static const uint64_t AboveLayer ;
static const uint64_t BelowLayer ;
@ -87,15 +88,15 @@ namespace Anabatic {
static const uint64_t NoUpdate ;
public:
inline Flags ( uint64_t flags = NoFlags );
inline Flags ( BaseFlags );
inline Flags ( const Hurricane::BaseFlags& );
virtual ~Flags ();
virtual std::string _getTypeName () const;
virtual std::string _getString () const;
};
Flags::Flags ( uint64_t flags ) : BaseFlags(flags) { }
Flags::Flags ( BaseFlags base ) : BaseFlags(base) { }
Flags::Flags ( uint64_t flags ) : BaseFlags(flags) { }
Flags::Flags ( const Hurricane::BaseFlags& flags ) : BaseFlags(flags) { }
enum EngineState { EngineCreation = 1

View File

@ -73,11 +73,11 @@ namespace Anabatic {
inline bool isiSet () const;
void reset ();
unsigned int getFlags () const;
void setFlags (unsigned int);
Flags getFlags () const;
void setFlags (Flags);
private:
unsigned int _flags;
Flags _flags;
DbU::Unit _min;
DbU::Unit _max;
DbU::Unit _axis;
@ -94,8 +94,8 @@ namespace Anabatic {
inline bool IntervalC::isiSet () const { return _flags & iSet; }
inline bool IntervalC::isH () const { return _flags & iHorizontal; }
inline bool IntervalC::isV () const { return _flags & iVertical ; }
inline void IntervalC::setFlags ( unsigned int f ) { _flags = f ; }
inline unsigned int IntervalC::getFlags () const { return _flags; }
inline void IntervalC::setFlags ( Flags flags ) { _flags = flags; }
inline Flags IntervalC::getFlags () const { return _flags; }
// -------------------------------------------------------------------
// Class : "Anabatic::GRAData".
@ -252,8 +252,8 @@ namespace Anabatic {
inline bool isAxisTarget () const;
inline bool isiHorizontal() const;
inline bool isiVertical () const;
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setFlags ( uint32_t );
inline void unsetFlags ( uint32_t );
bool isH () const;
bool isV () const;
inline void createAData ();
@ -282,11 +282,11 @@ namespace Anabatic {
DbU::Unit getPIMin2 () const;
DbU::Unit getPIAxis2 () const;
IntervalC getIntervFrom2 () const;
IntervalC getIntervFrom ( unsigned int criteria = 0 ) const;
IntervalC getIntervFrom ( uint32_t criteria=0 ) const;
IntervalC getInterv () const;
void printInterv () const;
void printIntervfrom () const;
GCell* getGPrev ( unsigned int criteria = 0 ) const;
GCell* getGPrev ( uint32_t criteria=0 ) const;
// Inspector support.
string _getString () const;
@ -305,7 +305,7 @@ namespace Anabatic {
int _stamp;
DbU::Unit _distance;
Edge* _from;
unsigned int _flags;
uint32_t _flags;
GRAData* _adata;
};
@ -384,8 +384,8 @@ namespace Anabatic {
inline bool Vertex::isAxisTarget () const { return (_flags & Vertex::AxisTarget ); }
inline bool Vertex::isiHorizontal() const { return (_flags & Vertex::iHorizontal ); }
inline bool Vertex::isiVertical () const { return (_flags & Vertex::iVertical ); }
inline void Vertex::setFlags ( unsigned int mask ) { _flags |= mask ; }
inline void Vertex::unsetFlags ( unsigned int mask ) { _flags &= ~mask; }
inline void Vertex::setFlags ( uint32_t mask ) { _flags |= mask ; }
inline void Vertex::unsetFlags ( uint32_t mask ) { _flags &= ~mask; }
// -------------------------------------------------------------------
// Class : "Anabatic::PriorityQueue".
@ -466,7 +466,7 @@ namespace Anabatic {
, AxisTarget = (1<<2)
};
public:
inline Mode ( unsigned int flags=NoMode );
inline Mode ( Flag flags=NoMode );
inline Mode ( BaseFlags );
virtual ~Mode ();
virtual std::string _getTypeName () const;
@ -504,8 +504,8 @@ namespace Anabatic {
inline void setAxisTarget ();
inline bool needAxisTarget () const;
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setFlags ( Flags );
inline void unsetFlags ( Flags );
void setAxisTargets ();
void unsetAxisTargets ();
@ -532,12 +532,12 @@ namespace Anabatic {
DbU::Unit _searchAreaHalo;
int _connectedsId;
PriorityQueue _queue;
unsigned int _flags;
Flags _flags;
};
inline Dijkstra::Mode::Mode ( unsigned int flags ) : BaseFlags(flags) { }
inline Dijkstra::Mode::Mode ( BaseFlags base ) : BaseFlags(base) { }
inline Dijkstra::Mode::Mode ( Dijkstra::Mode::Flag flags ) : BaseFlags(flags) { }
inline Dijkstra::Mode::Mode ( BaseFlags base ) : BaseFlags(base) { }
inline bool Dijkstra::isBipoint () const { return _net and (_targets.size()+_sources.size() == 2); }
inline bool Dijkstra::isSourceVertex ( Vertex* v ) const { return (_sources.find(v) != _sources.end()); }
@ -548,9 +548,10 @@ namespace Anabatic {
template<typename DistanceT>
inline DistanceT* Dijkstra::setDistance ( DistanceT cb ) { _distanceCb = cb; return _distanceCb.target<DistanceT>(); }
inline void Dijkstra::setFlags ( unsigned int mask ) { _flags |= mask; }
inline void Dijkstra::setFlags ( Flags mask ) { _flags |= mask; }
inline bool Dijkstra::needAxisTarget () const { return (_flags & Mode::AxisTarget); }
inline void Dijkstra::unsetFlags ( unsigned int mask ) { _flags &= ~mask; }
inline void Dijkstra::unsetFlags ( Flags mask ) { _flags &= ~mask; }
} // Anabatic namespace.

View File

@ -123,8 +123,8 @@ namespace Anabatic {
float _density;
};
public:
static unsigned int getDisplayMode ();
static void setDisplayMode ( unsigned int );
static uint32_t getDisplayMode ();
static void setDisplayMode ( uint32_t );
static Box getBorder ( const GCell*, const GCell* );
public:
static GCell* create ( AnabaticEngine* );
@ -193,14 +193,13 @@ namespace Anabatic {
// Detailed routing functions.
bool hasFreeTrack ( size_t depth, float reserve ) const;
inline size_t getDepth () const;
Interval getSide ( unsigned int ) const;
float getHCapacity () const;
float getVCapacity () const;
float getDensity ( unsigned int flags=Flags::NoFlags ) const;
float getDensity ( Flags flags=Flags::NoFlags ) const;
float getAverageHVDensity () const;
float getMaxHVDensity () const;
inline float getCDensity ( unsigned int flags=Flags::NoFlags ) const;
inline float getWDensity ( size_t depth, unsigned int flags=Flags::NoFlags ) const;
inline float getCDensity ( Flags flags=Flags::NoFlags ) const;
inline float getWDensity ( size_t depth, Flags flags=Flags::NoFlags ) const;
inline DbU::Unit getBlockage ( size_t depth ) const;
inline float getFragmentation ( size_t depth ) const;
inline float getFeedthroughs ( size_t depth ) const;
@ -212,8 +211,8 @@ namespace Anabatic {
AutoSegments getVStartSegments ();
AutoSegments getHStopSegments ();
AutoSegments getVStopSegments ();
inline AutoSegments getStartSegments ( unsigned int direction );
inline AutoSegments getStopSegments ( unsigned int direction );
inline AutoSegments getStartSegments ( Flags direction );
inline AutoSegments getStopSegments ( Flags direction );
size_t getRoutingPads ( set<RoutingPad*>& );
inline const Key& getKey () const;
size_t checkDensity () const;
@ -234,7 +233,7 @@ namespace Anabatic {
void rpDesaturate ( set<Net*>& );
bool stepDesaturate ( size_t depth
, set<Net*>&, AutoSegment*& moved
, unsigned int flags=Flags::NoFlags );
, Flags flags=Flags::NoFlags );
bool stepNetDesaturate ( size_t depth
, set<Net*>& globalNets
, Set& invalidateds );
@ -274,7 +273,7 @@ namespace Anabatic {
GCell& operator= ( const GCell& );
private:
static Name _extensionName;
static unsigned int _displayMode;
static uint32_t _displayMode;
Observable _observable;
AnabaticEngine* _anabatic;
Flags _flags;
@ -381,16 +380,16 @@ namespace Anabatic {
inline GCell::Observable::Observable () : StaticObservable<1>() { }
inline AutoSegments GCell::getStartSegments ( unsigned int direction )
inline AutoSegments GCell::getStartSegments ( Flags direction )
{ return (direction&Flags::Horizontal) ? getHStartSegments() : getVStartSegments(); }
inline AutoSegments GCell::getStopSegments ( unsigned int direction )
inline AutoSegments GCell::getStopSegments ( Flags direction )
{ return (direction&Flags::Horizontal) ? getHStopSegments() : getVStopSegments(); }
inline float GCell::getCDensity ( unsigned int flags ) const
inline float GCell::getCDensity ( Flags flags ) const
{ if (isInvalidated() and not(flags & Flags::NoUpdate)) const_cast<GCell*>(this)->updateDensity(); return _cDensity; }
inline float GCell::getWDensity ( size_t depth, unsigned int flags ) const
inline float GCell::getWDensity ( size_t depth, Flags flags ) const
{ if (isInvalidated() and not(flags & Flags::NoUpdate)) const_cast<GCell*>(this)->updateDensity(); return _densities[depth]; }
inline float GCell::getFragmentation ( size_t depth ) const

View File

@ -94,13 +94,13 @@ namespace Anabatic {
static inline size_t getLayerDepth ( const Layer* layer );
static inline const Layer* getRoutingLayer ( size_t );
static inline const Layer* getContactLayer ( size_t );
static unsigned int getDirection ( size_t depth );
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags );
static Flags getDirection ( size_t depth );
static inline DbU::Unit getPitch ( size_t depth, Flags flags );
static inline DbU::Unit getOffset ( size_t depth );
static inline DbU::Unit getWireWidth ( size_t depth );
static inline DbU::Unit getViaWidth ( size_t depth );
static inline unsigned int getDirection ( const Layer* );
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags );
static inline Flags getDirection ( const Layer* );
static inline DbU::Unit getPitch ( const Layer*, Flags flags );
static inline DbU::Unit getOffset ( const Layer* );
static inline DbU::Unit getWireWidth ( const Layer* );
static inline DbU::Unit getViaWidth ( const Layer* );
@ -114,11 +114,11 @@ namespace Anabatic {
static inline const vector<AutoSegment*>& getDoglegs ();
static inline const set<Net*>& getNetsModificateds ();
static void close ();
static void setAnabaticFlags ( unsigned int );
static void setAnabaticFlags ( Flags );
static inline void dogleg ( AutoSegment* );
static inline void doglegReset ();
static inline void revalidateTopology ();
static inline void setInvalidateMask ( unsigned int );
static inline void setInvalidateMask ( Flags );
static inline void invalidate ( Net* );
static inline void invalidate ( AutoContact* );
static inline void invalidate ( AutoSegment* );
@ -145,7 +145,7 @@ namespace Anabatic {
void _canonize ();
void _revalidateTopology ();
virtual size_t _revalidate ();
DbU::Unit _getPitch ( size_t depth, unsigned int flags ) const;
DbU::Unit _getPitch ( size_t depth, Flags flags ) const;
Point _getNearestGridPoint ( Point, Box constraints );
Record* _getRecord () const;
string _getString () const;
@ -212,16 +212,16 @@ namespace Anabatic {
inline size_t Session::getLayerDepth ( const Layer* layer ) { return getRoutingGauge()->getLayerDepth(layer); }
inline const Layer* Session::getRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth); }
inline const Layer* Session::getContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(depth); }
inline DbU::Unit Session::getPitch ( size_t depth, unsigned int flags=Flags::NoFlags ) { return get("getPitch(depth,flags)")->_getPitch( depth, flags ); }
inline DbU::Unit Session::getPitch ( size_t depth, Flags flags=Flags::NoFlags ) { return get("getPitch(depth,flags)")->_getPitch( depth, flags ); }
inline DbU::Unit Session::getOffset ( size_t depth ) { return getRoutingGauge()->getLayerOffset(depth); }
inline DbU::Unit Session::getWireWidth ( size_t depth ) { return getRoutingGauge()->getLayerWireWidth(depth); }
inline DbU::Unit Session::getViaWidth ( size_t depth ) { return getRoutingGauge()->getViaWidth(depth); }
inline DbU::Unit Session::getPitch ( const Layer* layer, unsigned int flags=Flags::NoFlags ) { return getPitch( getLayerDepth(layer), flags ); }
inline DbU::Unit Session::getPitch ( const Layer* layer, Flags flags=Flags::NoFlags ) { return getPitch( getLayerDepth(layer), flags ); }
inline DbU::Unit Session::getOffset ( const Layer* layer ) { return getOffset ( getLayerDepth(layer) ); }
inline DbU::Unit Session::getWireWidth ( const Layer* layer ) { return getWireWidth( getLayerDepth(layer) ); }
inline DbU::Unit Session::getViaWidth ( const Layer* layer ) { return getViaWidth ( getViaDepth(layer) ); }
inline DbU::Unit Session::getExtensionCap ( const Layer* layer ) { return getConfiguration()->getExtensionCap(layer); }
inline unsigned int Session::getDirection ( const Layer* layer ) { return getDirection( getLayerDepth(layer) ); }
inline Flags Session::getDirection ( const Layer* layer ) { return getDirection( getLayerDepth(layer) ); }
inline Point Session::getNearestGridPoint ( Point p, Box b ) { return get("getNearestGridPoint()")->_getNearestGridPoint(p,b); }
inline void Session::_dogleg ( AutoSegment* segment ) { _doglegs.push_back(segment); }

View File

@ -99,7 +99,7 @@ namespace Katana {
{ return new Configuration(*this); }
void Configuration::setRipupLimit ( unsigned int type, unsigned int limit )
void Configuration::setRipupLimit ( uint32_t type, uint32_t limit )
{
if ( type >= RipupLimitsTableSize ) {
cerr << Error("setRipupLimit(): Bad ripup limit index: %ud (> %ud)."
@ -111,7 +111,7 @@ namespace Katana {
}
void Configuration::setHTracksReservedLocal ( size_t reserved )
void Configuration::setHTracksReservedLocal ( uint32_t reserved )
{
// if (reserved > getHEdgeCapacity())
// throw Error( "Configuration::setHTracksReservedLocal(): tracks reserved for local routing (%d) is greater than edge capacity %d."
@ -121,7 +121,7 @@ namespace Katana {
}
void Configuration::setVTracksReservedLocal ( size_t reserved )
void Configuration::setVTracksReservedLocal ( uint32_t reserved )
{
// if (reserved > 1.0)
// throw Error( "Configuration::setVTracksReservedLocal(): tracks reserved for local routing (%d) is greater than edge capacity %d."
@ -131,7 +131,7 @@ namespace Katana {
}
unsigned int Configuration::getRipupLimit ( unsigned int type ) const
uint32_t Configuration::getRipupLimit ( uint32_t type ) const
{
if ( type >= RipupLimitsTableSize ) {
cerr << Error("getRipupLimit(): Bad ripup limit index: %u (> %u)."

View File

@ -122,8 +122,8 @@ namespace Katana {
bool DataSymmetric::checkPairing ()
{
const unsigned int mask = ~(AutoSegmentFlag::SegIsReduced);
Message errors ( 0, "[ERROR]" );
const uint32_t mask = ~(AutoSegmentFlag::SegIsReduced);
Message errors ( 0, "[ERROR]" );
// Temporary hardwired: M2 (depth 1) for H pitch, M3 (depth 2) for V pitch.
DbU::Unit hPitch = Session::getPitch( 1 );

View File

@ -107,7 +107,7 @@ namespace Katana {
using Anabatic::NetData;
void KatanaEngine::setupGlobalGraph ( unsigned int mode )
void KatanaEngine::setupGlobalGraph ( uint32_t mode )
{
Cell* cell = getCell();

View File

@ -86,7 +86,7 @@ namespace Katana {
QRect pixelBb = widget->dbuToScreenRect(bb);
if (GCell::getDisplayMode() == GCell::Density) {
unsigned int density = (unsigned int)( 255.0 * gcell->getDensity() );
uint32_t density = (unsigned int)( 255.0 * gcell->getDensity() );
if (density > 255) density = 255;
painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) );
@ -138,10 +138,10 @@ namespace Katana {
const Edge* edge = static_cast<const Edge*>(go);
if (edge) {
Box bb = edge->getBoundingBox();
unsigned int occupancy = 255;
Box bb = edge->getBoundingBox();
uint32_t occupancy = 255;
if (edge->getRealOccupancy() < edge->getCapacity())
occupancy = (unsigned int)( 255.0 * ( (float)edge->getRealOccupancy() / (float)edge->getCapacity() ) );
occupancy = (uint32_t)( 255.0 * ( (float)edge->getRealOccupancy() / (float)edge->getCapacity() ) );
QPainter& painter = widget->getPainter();
if (edge->getRealOccupancy() > edge->getCapacity()) {
@ -203,7 +203,7 @@ namespace Katana {
}
KatanaEngine* GraphicKatanaEngine::getForFramework ( unsigned int flags )
KatanaEngine* GraphicKatanaEngine::getForFramework ( uint32_t flags )
{
// Currently, only one framework is avalaible: Alliance.
@ -322,7 +322,7 @@ namespace Katana {
void GraphicKatanaEngine::postEvent ()
{
static unsigned int count = 0;
static uint32_t count = 0;
if (not (count++ % 500)) {
QApplication::processEvents();

View File

@ -25,7 +25,7 @@ namespace Katana {
// Class : "HorizontalTrack".
HorizontalTrack::HorizontalTrack ( RoutingPlane* routingPlane, unsigned int index )
HorizontalTrack::HorizontalTrack ( RoutingPlane* routingPlane, uint32_t index )
: Track(routingPlane,index)
{ }
@ -34,7 +34,7 @@ namespace Katana {
{ }
HorizontalTrack* HorizontalTrack::create ( RoutingPlane* routingPlane, unsigned int index )
HorizontalTrack* HorizontalTrack::create ( RoutingPlane* routingPlane, uint32_t index )
{
HorizontalTrack* track = new HorizontalTrack ( routingPlane, index );

View File

@ -295,7 +295,7 @@ namespace Katana {
{ return _configuration; }
unsigned int KatanaEngine::getRipupLimit ( const TrackElement* segment ) const
uint32_t KatanaEngine::getRipupLimit ( const TrackElement* segment ) const
{
if (segment->isBlockage()) return 0;
@ -328,7 +328,7 @@ namespace Katana {
}
Track* KatanaEngine::getTrackByPosition ( const Layer* layer, DbU::Unit axis, unsigned int mode ) const
Track* KatanaEngine::getTrackByPosition ( const Layer* layer, DbU::Unit axis, uint32_t mode ) const
{
RoutingPlane* plane = getRoutingPlaneByLayer( layer );
if (not plane) return NULL;
@ -428,7 +428,7 @@ namespace Katana {
}
void KatanaEngine::runNegociate ( unsigned int flags )
void KatanaEngine::runNegociate ( Flags flags )
{
if (_negociateWindow) return;
@ -449,7 +449,7 @@ namespace Katana {
printMeasures( "algo" );
openSession();
unsigned int overlaps = 0;
uint32_t overlaps = 0;
// size_t hTracksReservedLocal = getHTracksReservedLocal();
// size_t vTracksReservedLocal = getVTracksReservedLocal();
@ -610,7 +610,7 @@ namespace Katana {
}
bool KatanaEngine::_check ( unsigned int& overlap, const char* message ) const
bool KatanaEngine::_check ( uint32_t& overlap, const char* message ) const
{
cmess1 << " o Checking Katana Database coherency." << endl;

View File

@ -106,13 +106,13 @@ namespace Katana {
{ DebugSession::close(); }
bool Manipulator::canRipup ( unsigned int flags ) const
bool Manipulator::canRipup ( uint32_t flags ) const
{
if (_data) {
if (not _event or _event->isUnimplemented()) return false;
unsigned int limit = Session::getKatanaEngine()->getRipupLimit(_segment);
unsigned int count = _data->getRipupCount() + ((flags & NotOnLastRipup) ? 1 : 0);
uint32_t limit = Session::getKatanaEngine()->getRipupLimit(_segment);
uint32_t count = _data->getRipupCount() + ((flags & NotOnLastRipup) ? 1 : 0);
return (count < limit);
}
@ -141,7 +141,7 @@ namespace Katana {
}
bool Manipulator::ripup ( unsigned int type, DbU::Unit axisHint )
bool Manipulator::ripup ( uint32_t type, DbU::Unit axisHint )
{
cdebug_log(159,0) << "Manipulator::ripup() " << endl;
@ -155,17 +155,17 @@ namespace Katana {
}
bool Manipulator::ripupPerpandiculars ( unsigned int flags )
bool Manipulator::ripupPerpandiculars ( uint32_t flags )
{
cdebug_log(159,0) << "Manipulator::ripupPerpandiculars() - " << flags << endl;
bool success = true;
bool cagedPerpandiculars = false;
Interval constraints ( _event->getConstraints() );
Interval perpandicularConstraints ( constraints );
size_t placedPerpandiculars = 0;
unsigned int parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4;
unsigned int perpandicularActionFlags = SegmentAction::SelfRipupPerpand;
bool success = true;
bool cagedPerpandiculars = false;
Interval constraints ( _event->getConstraints() );
Interval perpandicularConstraints ( constraints );
size_t placedPerpandiculars = 0;
uint32_t parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4;
uint32_t perpandicularActionFlags = SegmentAction::SelfRipupPerpand;
if (flags & Manipulator::PerpandicularsFirst) {
parallelActionFlags &= ~SegmentAction::EventLevel4;
@ -269,7 +269,7 @@ namespace Katana {
}
bool Manipulator::relax ( Interval interval, unsigned int flags )
bool Manipulator::relax ( Interval interval, uint32_t flags )
{
interval.inflate( - Session::getExtensionCap(getLayer()) );
cdebug_log(159,0) << "Manipulator::relax() of: " << _segment << " " << interval << endl;
@ -301,12 +301,12 @@ namespace Katana {
return false;
}
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer());
Interval uside;
size_t dogLegCount = 0;
size_t iminconflict = gcells.size();
size_t imaxconflict = gcells.size();
size_t igcell;
uint32_t depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer());
Interval uside;
size_t dogLegCount = 0;
size_t iminconflict = gcells.size();
size_t imaxconflict = gcells.size();
size_t igcell;
// Look for closest enclosing min & max GCells indexes.
for ( igcell=0 ; igcell<gcells.size() ; igcell++ ) {
@ -783,7 +783,7 @@ namespace Katana {
, SegmentAction::SelfInsert|SegmentAction::MoveToAxis|SegmentAction::EventLevel4
, _fsm.getCost(itrack).getTrack()->getAxis() );
unsigned int flags = 0;
uint32_t flags = 0;
if ( rightIntrication ) flags |= RightAxisHint;
if ( leftIntrication ) flags |= LeftAxisHint;
if ( flags )
@ -858,7 +858,7 @@ namespace Katana {
}
bool Manipulator::shrinkToTrack ( size_t i, unsigned int flags, DbU::Unit leftAxisHint, DbU::Unit rightAxisHint )
bool Manipulator::shrinkToTrack ( size_t i, uint32_t flags, DbU::Unit leftAxisHint, DbU::Unit rightAxisHint )
{
#if THIS_IS_DISABLED
Track* track = _fsm.getTrack(i);
@ -990,7 +990,7 @@ namespace Katana {
}
bool Manipulator::slacken ( unsigned int flags )
bool Manipulator::slacken ( Flags flags )
{
cdebug_log(159,0) << "Manipulator::slacken() " << _segment << endl;
@ -1081,11 +1081,11 @@ namespace Katana {
}
bool Manipulator::moveUp ( unsigned int flags )
bool Manipulator::moveUp ( uint32_t flags )
{
cdebug_log(159,0) << "Manipulator::moveUp() " << _segment << endl;
unsigned int kflags = Flags::WithNeighbors;
Flags kflags = Flags::WithNeighbors;
//kflags |= (flags & AllowLocalMoveUp ) ? Flags::AutoSegment::AllowLocal : 0;
kflags |= (flags & AllowTerminalMoveUp) ? Flags::AllowTerminal : 0;
kflags |= (flags & IgnoreContacts ) ? Flags::IgnoreContacts : 0;
@ -1156,7 +1156,7 @@ namespace Katana {
if ( _segment->isFixed () ) return false;
if (not _segment->canDogleg(overlap)) return false;
unsigned int flags = 0;
Flags flags = Flags::NoFlags;
TrackElement* dogleg = _segment->makeDogleg(overlap,flags);
if (dogleg) {
cdebug_log(159,0) << "Manipulator::makeDogleg(Interval) - Push dogleg to the "

View File

@ -207,7 +207,7 @@ namespace Katana {
}
void NegociateWindow::addRoutingEvent ( TrackElement* segment, unsigned int level )
void NegociateWindow::addRoutingEvent ( TrackElement* segment, uint32_t level )
{
DataNegociate* data = segment->getDataNegociate();
if (not data or not data->hasRoutingEvent())
@ -221,7 +221,7 @@ namespace Katana {
}
TrackElement* NegociateWindow::createTrackSegment ( AutoSegment* autoSegment, unsigned int flags )
TrackElement* NegociateWindow::createTrackSegment ( AutoSegment* autoSegment, Flags flags )
{
cdebug_log(159,1) << "NegociateWindow::createTrackSegment() - " << autoSegment << endl;
@ -370,8 +370,8 @@ namespace Katana {
void NegociateWindow::_pack ( size_t& count, bool last )
{
unsigned long limit = _katana->getEventsLimit();
unsigned int pushStage = RoutingEvent::getStage();
uint64_t limit = _katana->getEventsLimit();
uint32_t pushStage = RoutingEvent::getStage();
RoutingEvent::setStage( RoutingEvent::Pack );
RoutingEventQueue packQueue;
@ -548,7 +548,7 @@ namespace Katana {
}
void NegociateWindow::run ( unsigned int flags )
void NegociateWindow::run ( Flags flags )
{
cdebug_log(159,1) << "NegociateWindow::run()" << endl;
@ -570,7 +570,7 @@ namespace Katana {
_katana->setMinimumWL( computeWirelength() );
#if defined(CHECK_DATABASE)
unsigned int overlaps = 0;
uint32_t overlaps = 0;
Session::getKatanaEngine()->_check( overlaps, "after _createRouting(GCell*)" );
#endif

View File

@ -119,23 +119,23 @@ namespace {
private:
bool guessGlobalNet ( const Name&, Net* );
private:
unsigned int _flags;
Name _vddePadNetName;
Name _vddiPadNetName;
Name _vssePadNetName;
Name _vssiPadNetName;
Name _ckPadNetName;
Name _ckiPadNetName;
Name _ckoPadNetName;
Net* _vdde;
Net* _vddi;
Net* _vsse;
Net* _vssi;
Net* _ck; // Clock net on the (external) pad.
Net* _cki; // Clock net in the pad ring.
Net* _cko; // Clock net of the core (design).
Net* _blockage;
Cell* _topCell;
uint32_t _flags;
Name _vddePadNetName;
Name _vddiPadNetName;
Name _vssePadNetName;
Name _vssiPadNetName;
Name _ckPadNetName;
Name _ckiPadNetName;
Name _ckoPadNetName;
Net* _vdde;
Net* _vddi;
Net* _vsse;
Net* _vssi;
Net* _ck; // Clock net on the (external) pad.
Net* _cki; // Clock net in the pad ring.
Net* _cko; // Clock net of the core (design).
Net* _blockage;
Cell* _topCell;
};
@ -457,7 +457,7 @@ namespace {
inline DbU::Unit getWidth () const;
inline Rails* getRails () const;
inline RoutingPlane* getRoutingPlane () const;
inline unsigned int getDirection () const;
inline Flags getDirection () const;
inline Net* getNet () const;
void merge ( DbU::Unit source, DbU::Unit target );
void doLayout ( const Layer* );
@ -487,17 +487,17 @@ namespace {
public:
class Rails {
public:
Rails ( Plane*, unsigned int direction, Net* );
Rails ( Plane*, Flags direction, Net* );
~Rails ();
inline Plane* getPlane ();
inline RoutingPlane* getRoutingPlane ();
inline unsigned int getDirection () const;
inline Flags getDirection () const;
inline Net* getNet () const;
void merge ( const Box& );
void doLayout ( const Layer* );
private:
Plane* _plane;
unsigned int _direction;
Flags _direction;
Net* _net;
vector<Rail*> _rails;
};
@ -511,8 +511,8 @@ namespace {
~Plane ();
inline const Layer* getLayer () const;
inline RoutingPlane* getRoutingPlane ();
inline unsigned int getDirection () const;
inline unsigned int getPowerDirection () const;
inline Flags getDirection () const;
inline Flags getPowerDirection () const;
void merge ( const Box&, Net* );
void doLayout ();
private:
@ -520,7 +520,7 @@ namespace {
RoutingPlane* _routingPlane;
RailsMap _horizontalRails;
RailsMap _verticalRails;
unsigned int _powerDirection;
Flags _powerDirection;
};
public:
@ -562,7 +562,7 @@ namespace {
inline DbU::Unit PowerRailsPlanes::Rail::getWidth () const { return _width; }
inline PowerRailsPlanes::Rails* PowerRailsPlanes::Rail::getRails () const { return _rails; }
inline RoutingPlane* PowerRailsPlanes::Rail::getRoutingPlane () const { return _rails->getRoutingPlane(); }
inline unsigned int PowerRailsPlanes::Rail::getDirection () const { return _rails->getDirection(); }
inline Flags PowerRailsPlanes::Rail::getDirection () const { return _rails->getDirection(); }
inline Net* PowerRailsPlanes::Rail::getNet () const { return _rails->getNet(); }
@ -774,7 +774,7 @@ namespace {
{ return (rail->getAxis() == _axis) and (rail->getWidth() == _width); }
PowerRailsPlanes::Rails::Rails ( PowerRailsPlanes::Plane* plane , unsigned int direction , Net* net )
PowerRailsPlanes::Rails::Rails ( PowerRailsPlanes::Plane* plane , Flags direction , Net* net )
: _plane (plane)
, _direction (direction)
, _net (net)
@ -798,7 +798,7 @@ namespace {
inline PowerRailsPlanes::Plane* PowerRailsPlanes::Rails::getPlane () { return _plane; }
inline RoutingPlane* PowerRailsPlanes::Rails::getRoutingPlane () { return getPlane()->getRoutingPlane(); }
inline unsigned int PowerRailsPlanes::Rails::getDirection () const { return _direction; }
inline Flags PowerRailsPlanes::Rails::getDirection () const { return _direction; }
inline Net* PowerRailsPlanes::Rails::getNet () const { return _net; }
@ -876,8 +876,8 @@ namespace {
inline const Layer* PowerRailsPlanes::Plane::getLayer () const { return _layer; }
inline RoutingPlane* PowerRailsPlanes::Plane::getRoutingPlane () { return _routingPlane; }
inline unsigned int PowerRailsPlanes::Plane::getDirection () const { return _routingPlane->getDirection(); }
inline unsigned int PowerRailsPlanes::Plane::getPowerDirection () const { return _powerDirection; }
inline Flags PowerRailsPlanes::Plane::getDirection () const { return _routingPlane->getDirection(); }
inline Flags PowerRailsPlanes::Plane::getPowerDirection () const { return _powerDirection; }
void PowerRailsPlanes::Plane::merge ( const Box& bb, Net* net )
@ -886,7 +886,7 @@ namespace {
cdebug_log(159,0) << " Plane::merge() " << net->getName() << " " << bb << endl;
unsigned int direction = getDirection();
Flags direction = getDirection();
if ( (net->getType() == Net::Type::POWER) or (net->getType() == Net::Type::GROUND) )
direction = getPowerDirection();
@ -1057,7 +1057,7 @@ namespace {
void ringAddToPowerRails ();
virtual void doQuery ();
inline void doLayout ();
inline unsigned int getGoMatchCount () const;
inline uint32_t getGoMatchCount () const;
private:
AllianceFramework* _framework;
KatanaEngine* _katana;
@ -1067,7 +1067,7 @@ namespace {
bool _isBlockagePlane;
vector<const Segment*> _hRingSegments;
vector<const Segment*> _vRingSegments;
unsigned int _goMatchCount;
uint32_t _goMatchCount;
};
@ -1092,7 +1092,7 @@ namespace {
}
inline unsigned int QueryPowerRails::getGoMatchCount () const
inline uint32_t QueryPowerRails::getGoMatchCount () const
{ return _goMatchCount; }
@ -1181,7 +1181,7 @@ namespace {
Box bb = segment->getBoundingBox ( basicLayer );
unsigned int depth = _routingGauge->getLayerDepth ( segment->getLayer() );
uint32_t depth = _routingGauge->getLayerDepth ( segment->getLayer() );
if ( _chipTools.isChip()
and ((depth == 2) or (depth == 3))

View File

@ -100,8 +100,8 @@ namespace {
cdebug_log(159,0) << "Propagate caging: " << segment << endl;
Track* track = segment->getTrack();
//unsigned int direction = Session::getRoutingGauge()->getLayerDirection(segment->getLayer());
unsigned int direction = segment->getDirection();
//Flags direction = Session::getRoutingGauge()->getLayerDirection(segment->getLayer());
Flags direction = segment->getDirection();
Anabatic::AutoContact* source = segment->base()->getAutoSource();
RoutingPad* rp = NULL;
Interval uside = source->getGCell()->getSide(direction);
@ -225,7 +225,7 @@ namespace {
cdebug_log(159,1) << "protectCagedTerminals() " << track << endl;
DbU::Unit lastMovedUp = track->getMin();
unsigned int moveUpCount = 0;
uint32_t moveUpCount = 0;
Configuration* configuration = Session::getConfiguration();
const Layer* metal2 = configuration->getRoutingLayer( 1 );

View File

@ -96,7 +96,7 @@ namespace {
for ( size_t i=0 ; i<segments.size() ; ++i ) {
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(segments[i]->getLayer());
unsigned int direction = plane->getDirection();
Flags direction = plane->getDirection();
DbU::Unit wireWidth = plane->getLayerGauge()->getWireWidth();
DbU::Unit delta = plane->getLayerGauge()->getHalfPitch()
+ wireWidth/2

View File

@ -141,22 +141,22 @@ namespace Katana {
// Class : "RoutingEvent".
unsigned int RoutingEvent::_idCounter = 0;
unsigned int RoutingEvent::_stage = RoutingEvent::Negociate;
size_t RoutingEvent::_allocateds = 0;
size_t RoutingEvent::_processeds = 0;
size_t RoutingEvent::_cloneds = 0;
uint32_t RoutingEvent::_idCounter = 0;
uint32_t RoutingEvent::_stage = RoutingEvent::Negociate;
uint32_t RoutingEvent::_allocateds = 0;
uint32_t RoutingEvent::_processeds = 0;
uint32_t RoutingEvent::_cloneds = 0;
unsigned int RoutingEvent::getStage () { return _stage; }
size_t RoutingEvent::getAllocateds () { return _allocateds; }
size_t RoutingEvent::getProcesseds () { return _processeds; }
size_t RoutingEvent::getCloneds () { return _cloneds; }
void RoutingEvent::setStage ( unsigned int stage ) { _stage = stage; }
void RoutingEvent::resetProcesseds () { _processeds = 0; }
uint32_t RoutingEvent::getStage () { return _stage; }
uint32_t RoutingEvent::getAllocateds () { return _allocateds; }
uint32_t RoutingEvent::getProcesseds () { return _processeds; }
uint32_t RoutingEvent::getCloneds () { return _cloneds; }
void RoutingEvent::setStage ( uint32_t stage ) { _stage = stage; }
void RoutingEvent::resetProcesseds () { _processeds = 0; }
RoutingEvent::RoutingEvent ( TrackElement* segment, unsigned int mode )
RoutingEvent::RoutingEvent ( TrackElement* segment, uint32_t mode )
: _cloned (false)
, _processed (false)
, _disabled (false)
@ -180,9 +180,9 @@ namespace Katana {
, _priority (0.0)
, _key (this)
{
if (_idCounter == std::numeric_limits<unsigned int>::max()) {
if (_idCounter == std::numeric_limits<uint32_t>::max()) {
throw Error( "RoutingEvent::RoutingEvent(): Identifier counter has reached it's limit (%d bits)."
, std::numeric_limits<unsigned int>::digits );
, std::numeric_limits<uint32_t>::digits );
}
DataNegociate* data = _segment->getDataNegociate();
@ -199,7 +199,7 @@ namespace Katana {
}
RoutingEvent* RoutingEvent::create ( TrackElement* segment, unsigned int mode )
RoutingEvent* RoutingEvent::create ( TrackElement* segment, uint32_t mode )
{
// if (not dynamic_cast<TrackSegment*>(segment)) {
// cerr << Error( "RoutingEvent::create() Can only create event from TrackSegment:\n"
@ -256,18 +256,18 @@ namespace Katana {
{ return getState() == DataNegociate::Unimplemented; }
void RoutingEvent::setMode ( unsigned int mode )
void RoutingEvent::setMode ( uint32_t mode )
{ _mode = mode; }
unsigned int RoutingEvent::getState () const
uint32_t RoutingEvent::getState () const
{
DataNegociate* data = _segment->getDataNegociate();
return (data) ? data->getState() : 0;
}
void RoutingEvent::setState ( unsigned int state )
void RoutingEvent::setState ( uint32_t state )
{
DataNegociate* data = _segment->getDataNegociate();
if (data) data->setState( state );
@ -306,7 +306,7 @@ namespace Katana {
}
RoutingEvent* RoutingEvent::reschedule ( RoutingEventQueue& queue, unsigned int eventLevel )
RoutingEvent* RoutingEvent::reschedule ( RoutingEventQueue& queue, uint32_t eventLevel )
{
RoutingEvent* active = _segment->getDataNegociate()->getRoutingEvent();
if (active != this) return active->reschedule( queue, eventLevel );

View File

@ -73,7 +73,7 @@ namespace Katana {
}
void RoutingEventQueue::add ( TrackElement* segment, unsigned int level )
void RoutingEventQueue::add ( TrackElement* segment, uint32_t level )
{
if (segment->getTrack()) {
cinfo << "[INFO] Already in Track " << (void*)segment->base()->base()

View File

@ -95,9 +95,9 @@ namespace Katana {
if (not plane->_layerGauge)
throw Error( badLayerGauge, depth, getString(katana->getConfiguration()->getRoutingGauge()).c_str() );
DbU::Unit hExtension = 0;
DbU::Unit vExtension = 0;
unsigned int gaugeDepth = 0;
DbU::Unit hExtension = 0;
DbU::Unit vExtension = 0;
uint32_t gaugeDepth = 0;
if (Session::getLayerGauge(gaugeDepth)->getType() == Constant::PinOnly) ++gaugeDepth;
bool HV = (Session::getLayerGauge(gaugeDepth)->getDirection() == Constant::Horizontal);
@ -161,7 +161,7 @@ namespace Katana {
}
Track* RoutingPlane::getTrackByPosition ( DbU::Unit axis, unsigned int mode ) const
Track* RoutingPlane::getTrackByPosition ( DbU::Unit axis, uint32_t mode ) const
{
return getTrackByIndex( getLayerGauge()->getTrackIndex( getAxisMin()
, getAxisMax()
@ -171,7 +171,7 @@ namespace Katana {
}
bool RoutingPlane::_check ( unsigned int& overlaps ) const
bool RoutingPlane::_check ( uint32_t& overlaps ) const
{
bool coherency = true;

View File

@ -41,14 +41,14 @@ namespace {
class CompareCostArray {
public:
inline CompareCostArray ( unsigned int flags=0 );
inline CompareCostArray ( uint32_t flags=0 );
inline bool operator() ( const array<TrackCost,2>& lhs, const array<TrackCost,2>& rhs );
private:
TrackCost::Compare _compare;
};
inline CompareCostArray::CompareCostArray ( unsigned int flags )
inline CompareCostArray::CompareCostArray ( uint32_t flags )
: _compare(flags)
{ }
@ -366,9 +366,9 @@ namespace Katana {
// Class : "SegmentAction".
SegmentAction::SegmentAction ( TrackElement* segment
, unsigned int type
, uint32_t type
, DbU::Unit axisHint
, unsigned int toState
, uint32_t toState
)
: _segment (segment)
, _type (type)
@ -427,12 +427,12 @@ namespace Katana {
}
if (_type & ToRipupLimit) {
unsigned int limit = Session::getKatanaEngine()->getRipupLimit(_segment);
uint32_t limit = Session::getKatanaEngine()->getRipupLimit(_segment);
if (limit > data->getRipupCount())
data->setRipupCount( limit );
}
unsigned int eventLevel = 0;
uint32_t eventLevel = 0;
if (_type & EventLevel1) eventLevel = 1;
if (_type & EventLevel2) eventLevel = 2;
if (_type & EventLevel3) eventLevel = 3;
@ -443,7 +443,7 @@ namespace Katana {
RoutingEvent* fork = event->reschedule( queue, eventLevel );
if (fork) {
unsigned int mode = RoutingEvent::Repair;
uint32_t mode = RoutingEvent::Repair;
if (RoutingEvent::getStage() < RoutingEvent::Repair)
mode = (_type&PackingMode) ? RoutingEvent::Pack : RoutingEvent::Negociate;
fork->setMode( mode );
@ -479,7 +479,7 @@ namespace Katana {
DataSymmetric* symData = NULL;
TrackElement* segment1 = _event1->getSegment();
TrackElement* segment2 = segment1->getSymmetric();
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment1->getLayer());
uint32_t depth = Session::getRoutingGauge()->getLayerDepth(segment1->getLayer());
_event1->setTracksFree( 0 );
_data1 = segment1->getDataNegociate();
@ -565,7 +565,7 @@ namespace Katana {
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(segment1->getLayer());
for ( Track* track1 : Tracks_Range::get(plane,_constraint) ) {
unsigned int costflags = 0;
uint32_t costflags = 0;
costflags |= (segment1->isLocal() and (depth >= 3)) ? TrackCost::LocalAndTopDepth : 0;
Track* track2 = NULL;
@ -629,7 +629,7 @@ namespace Katana {
_state = EmptyTrackList;
}
unsigned int flags = 0;
uint32_t flags = 0;
flags |= (segment1->isStrap()) ? TrackCost::IgnoreAxisWeight : 0;
flags |= (segment1->isLocal()
and (_data1->getState() < DataNegociate::Minimize)
@ -656,7 +656,7 @@ namespace Katana {
}
void SegmentFsm::setDataState ( unsigned int state )
void SegmentFsm::setDataState ( uint32_t state )
{
_data1->setState( state );
if (_data2) _data2->setState( state );
@ -664,9 +664,9 @@ namespace Katana {
void SegmentFsm::addAction ( TrackElement* segment
, unsigned int type
, uint32_t type
, DbU::Unit axisHint
, unsigned int toSegmentFsm )
, uint32_t toSegmentFsm )
{
if ( not segment->isFixed() ) {
_actions.push_back ( SegmentAction(segment,type,axisHint,toSegmentFsm) );
@ -796,7 +796,7 @@ namespace Katana {
}
bool SegmentFsm::canRipup ( unsigned int flags )
bool SegmentFsm::canRipup ( uint32_t flags )
{
return Manipulator(getSegment1(),*this).canRipup(flags)
and (not _event2 or Manipulator(getSegment2(),*this).canRipup(flags));
@ -894,7 +894,7 @@ namespace Katana {
vector<Cs1Candidate> candidates;
TrackElement* segment = getEvent()->getSegment();
bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(0.5,Flags::NoFlags) : segment->canMoveUp(1.0,Flags::CheckLowDensity); // MARK 1
unsigned int relaxFlags = Manipulator::NoDoglegReuse
uint32_t relaxFlags = Manipulator::NoDoglegReuse
| ((_data1 and (_data1->getStateCount() < 2)) ? Manipulator::AllowExpand
: Manipulator::NoExpand);
@ -1169,13 +1169,13 @@ namespace Katana {
}
bool SegmentFsm::_slackenStrap ( TrackElement*& segment, DataNegociate*& data, unsigned int flags )
bool SegmentFsm::_slackenStrap ( TrackElement*& segment, DataNegociate*& data, uint32_t flags )
{
cdebug_log(159,0) << "Strap segment Fsm." << endl;
bool success = false;
unsigned int nextState = data->getState();
Manipulator manipulator ( segment, *this );
bool success = false;
uint32_t nextState = data->getState();
Manipulator manipulator ( segment, *this );
switch ( data->getState() ) {
case DataNegociate::RipupPerpandiculars:
@ -1211,13 +1211,13 @@ namespace Katana {
}
bool SegmentFsm::_slackenLocal ( TrackElement*& segment, DataNegociate*& data, unsigned int flags )
bool SegmentFsm::_slackenLocal ( TrackElement*& segment, DataNegociate*& data, uint32_t flags )
{
cdebug_log(159,0) << "Local segment Fsm." << endl;
bool success = false;
unsigned int nextState = data->getState();
Manipulator manipulator ( segment, *this );
bool success = false;
uint32_t nextState = data->getState();
Manipulator manipulator ( segment, *this );
switch (data->getState()) {
case DataNegociate::RipupPerpandiculars:
@ -1289,12 +1289,12 @@ namespace Katana {
}
bool SegmentFsm::_slackenGlobal ( TrackElement*& segment, DataNegociate*& data, unsigned int flags )
bool SegmentFsm::_slackenGlobal ( TrackElement*& segment, DataNegociate*& data, uint32_t flags )
{
bool success = false;
unsigned int nextState = data->getState();
Manipulator manipulator ( segment, *this );
unsigned int moveUpFlags = Manipulator::AllowShortPivotUp|Manipulator::IgnoreContacts;
bool success = false;
uint32_t nextState = data->getState();
Manipulator manipulator ( segment, *this );
uint32_t moveUpFlags = Manipulator::AllowShortPivotUp|Manipulator::IgnoreContacts;
switch ( data->getState() ) {
case DataNegociate::RipupPerpandiculars:
@ -1385,11 +1385,11 @@ namespace Katana {
}
bool SegmentFsm::slackenTopology ( unsigned int flags )
bool SegmentFsm::slackenTopology ( uint32_t flags )
{
bool success = false;
TrackElement* segment1 = getSegment1();
unsigned int actionFlags = SegmentAction::SelfInsert|SegmentAction::EventLevel5;
bool success = false;
TrackElement* segment1 = getSegment1();
uint32_t actionFlags = SegmentAction::SelfInsert|SegmentAction::EventLevel5;
DebugSession::open( segment1->getNet(), 156, 160 );
cdebug_log(159,1) << "Slacken Topology for " << segment1->getNet()

View File

@ -126,7 +126,7 @@ namespace Katana {
{ return _getKatanaEngine()->getNegociateWindow(); };
unsigned int Session::_getRipupCost ()
uint32_t Session::_getRipupCost ()
{ return _getKatanaEngine()->getRipupCost(); };
@ -197,7 +197,7 @@ namespace Katana {
_doglegReset();
# if defined(CHECK_DATABASE)
unsigned int overlaps = 0;
uint32_t overlaps = 0;
# endif
for ( Track* track : _sortEvents ) {
track->doReorder();

View File

@ -185,7 +185,7 @@ namespace {
if (not autoTerminal->isEndPoint()) continue;
_seed = autoTerminal->getSegment();
unsigned int flags = (_seed->getAutoSource() == autoTerminal) ? Flags::Target : Flags::Source;
Flags flags = (_seed->getAutoSource() == autoTerminal) ? Flags::Target : Flags::Source;
for ( AutoSegment* segment : _seed->getConnecteds(flags) )
_data->addReference( segment );

View File

@ -116,7 +116,7 @@ namespace Katana {
{ return _routingPlane->getKatanaEngine(); }
unsigned int Track::getDepth () const
uint32_t Track::getDepth () const
{ return _routingPlane->getDepth(); }
@ -148,8 +148,8 @@ namespace Katana {
TrackElement* Track::getSegment ( DbU::Unit position ) const
{
unsigned int state;
size_t begin;
uint32_t state;
size_t begin;
getBeginIndex( position, begin, state );
if (state & (BeginIsTrackMin|EndIsTrackMax)) return NULL;
@ -194,7 +194,7 @@ namespace Katana {
}
void Track::getBeginIndex ( DbU::Unit position, size_t& begin, unsigned int& state ) const
void Track::getBeginIndex ( DbU::Unit position, size_t& begin, uint32_t& state ) const
{
if (_segments.empty()) {
state = EmptyTrack;
@ -256,7 +256,7 @@ namespace Katana {
void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const
{
unsigned int iState;
uint32_t iState;
if ( _segments.empty()
or (interval.getVMax() <= _min)
@ -277,11 +277,11 @@ namespace Katana {
}
TrackCost Track::getOverlapCost ( Interval interval
, Net* net
, size_t begin
, size_t end
, unsigned int flags ) const
TrackCost Track::getOverlapCost ( Interval interval
, Net* net
, size_t begin
, size_t end
, uint32_t flags ) const
{
TrackCost cost ( const_cast<Track*>(this), interval, begin, end, net, flags );
@ -326,7 +326,7 @@ namespace Katana {
}
TrackCost Track::getOverlapCost ( Interval interval, Net* net, unsigned int flags ) const
TrackCost Track::getOverlapCost ( Interval interval, Net* net, uint32_t flags ) const
{
size_t begin;
size_t end;
@ -337,11 +337,11 @@ namespace Katana {
}
TrackCost Track::getOverlapCost ( TrackElement* segment, unsigned int flags ) const
TrackCost Track::getOverlapCost ( TrackElement* segment, uint32_t flags ) const
{ return getOverlapCost ( segment->getCanonicalInterval(), segment->getNet(), flags ); }
void Track::getTerminalWeight ( Interval interval, Net* net, size_t& count, unsigned int& weight ) const
void Track::getTerminalWeight ( Interval interval, Net* net, size_t& count, uint32_t& weight ) const
{
cdebug_log(155,1) << "getTerminalWeight() @" << DbU::getValueString(_axis)
<< " [" << interval.getVMin() << " " << interval.getVMax() << "]" << endl;
@ -390,9 +390,9 @@ namespace Katana {
Interval Track::getFreeInterval ( DbU::Unit position, Net* net ) const
{
unsigned int state;
size_t begin;
size_t end;
uint32_t state;
size_t begin;
size_t end;
if (_segments.empty()) return Interval(_min,_max);
@ -405,7 +405,7 @@ namespace Katana {
}
Interval Track::expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* net ) const
Interval Track::expandFreeInterval ( size_t& begin, size_t& end, uint32_t state, Net* net ) const
{
cdebug_log(155,1) << "Track::expandFreeInterval() begin:" << begin << " end:" << end << " " << net << endl;
cdebug_log(155,0) << _segments[begin] << endl;
@ -481,7 +481,7 @@ namespace Katana {
}
bool Track::check ( unsigned int& overlaps, const char* message ) const
bool Track::check ( uint32_t& overlaps, const char* message ) const
{
bool coherency = true;
bool holes = false;
@ -554,7 +554,7 @@ namespace Katana {
}
DbU::Unit Track::getMinimalPosition ( size_t index, unsigned int state ) const
DbU::Unit Track::getMinimalPosition ( size_t index, uint32_t state ) const
{
Interval canonical;
@ -564,14 +564,14 @@ namespace Katana {
case BeginIsSegmentMax: return _segments[index]->getTargetU ();
}
cerr << Bug( " Track::getMinimalPosition(size_t,unsigned int) :"
cerr << Bug( " Track::getMinimalPosition(size_t,uint32_t) :"
" invalid state value %ud.", state ) << endl;
return _min;
}
DbU::Unit Track::getMaximalPosition ( size_t index, unsigned int state ) const
DbU::Unit Track::getMaximalPosition ( size_t index, uint32_t state ) const
{
Interval canonical;
@ -583,7 +583,7 @@ namespace Katana {
case EndIsSegmentMax: return _segments[index ]->getTargetU ();
}
cerr << Bug( " Track::getMaximalPosition(size_t,unsigned int) :"
cerr << Bug( " Track::getMaximalPosition(size_t,uint32_t) :"
" invalid state value %ud.", state ) << endl;
return _min;
@ -667,7 +667,7 @@ namespace Katana {
}
unsigned int Track::checkOverlap ( unsigned int& overlaps ) const
uint32_t Track::checkOverlap ( uint32_t& overlaps ) const
{
if ( !_segments.size() ) return 0;

View File

@ -59,12 +59,12 @@ namespace Katana {
{ }
TrackCost::TrackCost ( Track* track
, const Interval& interval
, size_t begin
, size_t end
, Net* net
, unsigned int flags
TrackCost::TrackCost ( Track* track
, const Interval& interval
, size_t begin
, size_t end
, Net* net
, uint32_t flags
)
: _flags (flags)
, _track (track)

View File

@ -137,7 +137,7 @@ namespace Katana {
bool TrackElement::isGlobal () const { return not isLocal(); }
bool TrackElement::isBipoint () const { return false; }
bool TrackElement::isTerminal () const { return false; }
bool TrackElement::isStrongTerminal ( unsigned int ) const { return false; }
bool TrackElement::isStrongTerminal ( Flags ) const { return false; }
bool TrackElement::isStrap () const { return false; }
bool TrackElement::isSlackened () const { return false; }
bool TrackElement::isDogleg () const { return false; }
@ -147,23 +147,23 @@ namespace Katana {
// Predicates.
bool TrackElement::hasSymmetric () const { return false; }
bool TrackElement::canSlacken () const { return false; }
bool TrackElement::canPivotUp ( float, unsigned int ) const { return false; };
bool TrackElement::canPivotDown ( float, unsigned int ) const { return false; };
bool TrackElement::canMoveUp ( float, unsigned int ) const { return false; };
bool TrackElement::canPivotUp ( float, Flags ) const { return false; };
bool TrackElement::canPivotDown ( float, Flags ) const { return false; };
bool TrackElement::canMoveUp ( float, Flags ) const { return false; };
bool TrackElement::canDogleg () { return false; };
bool TrackElement::canDogleg ( Interval ) { return false; };
bool TrackElement::canDogleg ( Anabatic::GCell*, unsigned int ) { return false; };
bool TrackElement::canDogleg ( Anabatic::GCell*, Flags ) { return false; };
// Accessors.
unsigned long TrackElement::getId () const { return 0; }
unsigned long TrackElement::getFreedomDegree () const { return 0; }
DbU::Unit TrackElement::getPitch () const { return 0; }
DbU::Unit TrackElement::getPPitch () const { return 0; }
float TrackElement::getMaxUnderDensity ( unsigned int ) const { return 0.0; };
unsigned int TrackElement::getDoglegLevel () const { return 0; }
float TrackElement::getMaxUnderDensity ( Flags ) const { return 0.0; };
uint32_t TrackElement::getDoglegLevel () const { return 0; }
TrackElement* TrackElement::getParent () const { return NULL; }
Interval TrackElement::getSourceConstraints () const { return Interval(); }
Interval TrackElement::getTargetConstraints () const { return Interval(); }
DataNegociate* TrackElement::getDataNegociate ( unsigned int ) const { return NULL; }
DataNegociate* TrackElement::getDataNegociate ( Flags ) const { return NULL; }
TrackElements TrackElement::getPerpandiculars () { return new TrackElements_Perpandiculars(NULL); }
void TrackElement::invalidate () { }
TrackElement* TrackElement::getCanonical ( Interval& i ) { i=Interval(getSourceU(),getTargetU()); return this; }
@ -174,21 +174,21 @@ namespace Katana {
void TrackElement::setTrack ( Track* track ) { _track = track; }
void TrackElement::setSymmetric ( TrackElement* ) { }
void TrackElement::updateFreedomDegree () { }
void TrackElement::setDoglegLevel ( unsigned int ) { }
void TrackElement::setDoglegLevel ( uint32_t ) { }
void TrackElement::swapTrack ( TrackElement* ) { }
void TrackElement::reschedule ( unsigned int ) { }
void TrackElement::reschedule ( uint32_t ) { }
void TrackElement::detach () { }
void TrackElement::revalidate () { }
void TrackElement::updatePPitch () { }
void TrackElement::setAxis ( DbU::Unit, unsigned int flags ) { }
void TrackElement::setAxis ( DbU::Unit, uint32_t flags ) { }
TrackElement* TrackElement::makeDogleg () { return NULL; }
TrackElement* TrackElement::makeDogleg ( Interval, unsigned int& ) { return NULL; }
TrackElement* TrackElement::makeDogleg ( Interval, Flags& ) { return NULL; }
TrackElement* TrackElement::makeDogleg ( Anabatic::GCell*, TrackElement*&, TrackElement*& ) { return NULL; }
void TrackElement::_postDoglegs ( TrackElement*&, TrackElement*& ) { }
bool TrackElement::moveAside ( unsigned int ) { return false; }
bool TrackElement::slacken ( unsigned int ) { return false; }
bool TrackElement::moveUp ( unsigned int ) { return false; }
bool TrackElement::moveDown ( unsigned int ) { return false; }
bool TrackElement::moveAside ( Flags ) { return false; }
bool TrackElement::slacken ( Flags ) { return false; }
bool TrackElement::moveUp ( Flags ) { return false; }
bool TrackElement::moveDown ( Flags ) { return false; }
#if THIS_IS_DISABLED
void TrackElement::desalignate () { }
#endif

View File

@ -34,9 +34,9 @@ namespace Katana {
// Class : "TrackElements_Perpandiculars".
TrackElements_Perpandiculars::Locator::Locator ( TrackElement* segment )
TrackElements_Perpandiculars::Locator::Locator ( TrackElement* segment, Flags flags )
: TrackElementHL ()
, _locator (segment->base())
, _locator (segment->base(),flags)
, _element (NULL)
{
cdebug_log(155,0) << "TrackElements_Perpandiculars::Locator::Locator()" << endl;
@ -91,7 +91,7 @@ namespace Katana {
TrackElementHL* TrackElements_Perpandiculars::getLocator () const
{ return new Locator(_segment); }
{ return new Locator(_segment,_flags); }
string TrackElements_Perpandiculars::Locator::_getString () const

View File

@ -65,11 +65,11 @@ namespace Katana {
{
Box boundingBox = segment->getBoundingBox();
unsigned int flags = TElemFixed | ((segment->getNet() == _blockageNet) ? TElemBlockage : 0);
uint32_t flags = TElemFixed | ((segment->getNet() == _blockageNet) ? TElemBlockage : 0);
setFlags( flags );
if (track) {
unsigned int depth = track->getDepth();
uint32_t depth = track->getDepth();
Technology* technology = DataBase::getDB()->getTechnology();
const Layer* layer1 = track->getLayer()->getBlockageLayer();
RegularLayer* layer2 = dynamic_cast<RegularLayer*>(technology->getLayer(layer1->getMask()));

View File

@ -67,7 +67,7 @@ namespace Katana {
RoutingGauge* rg = Session::getRoutingGauge();
RoutingPlane* rp = Session::getKatanaEngine()->getRoutingPlaneByIndex(depth);
DbU::Unit pitch = DbU::toLambda(Session::getPitch(depth));
unsigned int rpDirection = rg->getLayerDirection(depth);
Flags rpDirection = rg->getLayerDirection(depth);
Interval trackSpan;
if ( rpDirection == Constant::Horizontal ) {
@ -80,10 +80,10 @@ namespace Katana {
trackSpan = Interval ( sourcePoint.getX(), targetPoint.getX() );
}
if ( rpDirection xor rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) {
_weight = (unsigned int)(( pitch / (pitch+DbU::toLambda(trackSpan.getSize())) ) * 100.0) ;
if ( rpDirection xor (uint64_t)rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) {
_weight = (uint32_t)(( pitch / (pitch+DbU::toLambda(trackSpan.getSize())) ) * 100.0) ;
} else {
_weight = (unsigned int)( (pitch + DbU::toLambda(trackSpan.getSize())) * 20.0 );
_weight = (uint32_t)( (pitch + DbU::toLambda(trackSpan.getSize())) * 20.0 );
}
Track* track = rp->getTrackByPosition ( trackSpan.getVMin() );

View File

@ -154,7 +154,7 @@ namespace Katana {
bool TrackSegment::isGlobal () const { return _base->isWeakGlobal() or _base->isGlobal(); }
bool TrackSegment::isBipoint () const { return _base->isBipoint(); }
bool TrackSegment::isTerminal () const { return _base->isTerminal(); }
bool TrackSegment::isStrongTerminal ( unsigned int flags ) const { return _base->isStrongTerminal(flags); }
bool TrackSegment::isStrongTerminal ( Flags flags ) const { return _base->isStrongTerminal(flags); }
bool TrackSegment::isStrap () const { return _base->isStrap(); }
bool TrackSegment::isSlackened () const { return _base->isSlackened(); }
bool TrackSegment::isDogleg () const { return _base->isDogleg(); }
@ -172,7 +172,7 @@ namespace Katana {
DbU::Unit TrackSegment::getPPitch () const { return _ppitch; }
DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); }
unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; }
unsigned int TrackSegment::getDoglegLevel () const { return _dogLegLevel; }
uint32_t TrackSegment::getDoglegLevel () const { return _dogLegLevel; }
Interval TrackSegment::getSourceConstraints () const { return _base->getSourceConstraints(); }
Interval TrackSegment::getTargetConstraints () const { return _base->getTargetConstraints(); }
TrackElement* TrackSegment::getCanonical ( Interval& i ) { return Session::lookup( _base->getCanonical(i)->base() ); }
@ -182,7 +182,7 @@ namespace Katana {
void TrackSegment::invalidate () { setFlags( TElemInvalidated ); _base->invalidate(); }
DataNegociate* TrackSegment::getDataNegociate ( unsigned int flags ) const
DataNegociate* TrackSegment::getDataNegociate ( Flags flags ) const
{
if (flags & Flags::DataSelf) return _data;
@ -292,7 +292,7 @@ namespace Katana {
}
void TrackSegment::setDoglegLevel ( unsigned int level )
void TrackSegment::setDoglegLevel ( uint32_t level )
{
if (level > 15) {
cerr << Bug("%s has reached maximum dog leg count (15)."
@ -344,7 +344,7 @@ namespace Katana {
}
void TrackSegment::setAxis ( DbU::Unit axis, unsigned int flags )
void TrackSegment::setAxis ( DbU::Unit axis, uint32_t flags )
{
_base->setAxis( axis, flags );
invalidate();
@ -393,7 +393,7 @@ namespace Katana {
}
void TrackSegment::reschedule ( unsigned int level )
void TrackSegment::reschedule ( uint32_t level )
{
cdebug_log(159,1) << "TrackSegment::reschedule() - " << this << endl;
@ -409,19 +409,19 @@ namespace Katana {
}
float TrackSegment::getMaxUnderDensity ( unsigned int flags ) const
float TrackSegment::getMaxUnderDensity ( Flags flags ) const
{ return _base->getMaxUnderDensity( flags ); }
bool TrackSegment::canPivotUp ( float reserve, unsigned int flags ) const
bool TrackSegment::canPivotUp ( float reserve, Flags flags ) const
{ return _base->canPivotUp( reserve, flags ); }
bool TrackSegment::canPivotDown ( float reserve, unsigned int flags ) const
bool TrackSegment::canPivotDown ( float reserve, Flags flags ) const
{ return _base->canPivotDown( reserve, flags ); }
bool TrackSegment::canMoveUp ( float reserve, unsigned int flags ) const
bool TrackSegment::canMoveUp ( float reserve, Flags flags ) const
{ return _base->canMoveUp( reserve, flags ); }
@ -432,7 +432,7 @@ namespace Katana {
}
bool TrackSegment::slacken ( unsigned int flags )
bool TrackSegment::slacken ( Flags flags )
{
cdebug_log(159,0) << "TrackSegment::slacken()" << endl;
@ -456,7 +456,7 @@ namespace Katana {
}
bool TrackSegment::moveUp ( unsigned int flags )
bool TrackSegment::moveUp ( Flags flags )
{
bool success = false;
@ -477,7 +477,7 @@ namespace Katana {
}
bool TrackSegment::moveDown ( unsigned int flags )
bool TrackSegment::moveDown ( Flags flags )
{
bool success = false;
@ -498,7 +498,7 @@ namespace Katana {
}
bool TrackSegment::moveAside ( unsigned int flags )
bool TrackSegment::moveAside ( Flags flags )
{
bool success = true;
@ -585,7 +585,7 @@ namespace Katana {
}
bool TrackSegment::canDogleg ( Anabatic::GCell* doglegGCell, unsigned int flags )
bool TrackSegment::canDogleg ( Anabatic::GCell* doglegGCell, Flags flags )
{
cdebug_log(159,1) << "TrackSegment::canDogleg(GCell*) " << doglegGCell << endl;
@ -747,7 +747,7 @@ namespace Katana {
}
TrackElement* TrackSegment::makeDogleg ( Interval interval, unsigned int& flags )
TrackElement* TrackSegment::makeDogleg ( Interval interval, Flags& flags )
{
TrackElement* perpandicular = NULL;
TrackElement* parallel = NULL;
@ -764,7 +764,7 @@ namespace Katana {
{
cdebug_log(159,1) << "TrackSegment::_postDoglegs()" << endl;
unsigned int doglegLevel = 0;
uint32_t doglegLevel = 0;
const vector<AutoSegment*>& doglegs = Session::getDoglegs();
vector<TrackElement*> segments;

View File

@ -25,7 +25,7 @@ namespace Katana {
// Class : "VerticalTrack".
VerticalTrack::VerticalTrack ( RoutingPlane* routingPlane, unsigned int index )
VerticalTrack::VerticalTrack ( RoutingPlane* routingPlane, uint32_t index )
: Track(routingPlane,index)
{ }
@ -34,7 +34,7 @@ namespace Katana {
{ }
VerticalTrack* VerticalTrack::create ( RoutingPlane* routingPlane, unsigned int index )
VerticalTrack* VerticalTrack::create ( RoutingPlane* routingPlane, uint32_t index )
{
VerticalTrack* track = new VerticalTrack ( routingPlane, index );

View File

@ -66,16 +66,16 @@ namespace Katana {
inline const Anabatic::Configuration* base () const;
inline PostEventCb_t& getPostEventCb ();
inline unsigned long getEventsLimit () const;
inline unsigned int getRipupCost () const;
unsigned int getRipupLimit ( unsigned int type ) const;
inline size_t getHTracksReservedLocal () const;
inline size_t getVTracksReservedLocal () const;
inline void setEventsLimit ( unsigned long );
inline void setRipupCost ( unsigned int );
void setRipupLimit ( unsigned int limit, unsigned int type );
inline uint32_t getRipupCost () const;
uint32_t getRipupLimit ( uint32_t type ) const;
inline uint32_t getHTracksReservedLocal () const;
inline uint32_t getVTracksReservedLocal () const;
inline void setEventsLimit ( uint64_t );
inline void setRipupCost ( uint32_t );
void setRipupLimit ( uint32_t limit, uint32_t type );
inline void setPostEventCb ( PostEventCb_t );
void setHTracksReservedLocal ( size_t );
void setVTracksReservedLocal ( size_t );
void setHTracksReservedLocal ( uint32_t );
void setVTracksReservedLocal ( uint32_t );
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setProfileEventCosts ( bool );
@ -85,14 +85,14 @@ namespace Katana {
virtual string _getTypeName () const;
private:
// Attributes.
PostEventCb_t _postEventCb;
size_t _hTracksReservedLocal;
size_t _vTracksReservedLocal;
unsigned int _ripupLimits [RipupLimitsTableSize];
unsigned int _ripupCost;
unsigned long _eventsLimit;
unsigned int _flags;
bool _profileEventCosts;
PostEventCb_t _postEventCb;
uint32_t _hTracksReservedLocal;
uint32_t _vTracksReservedLocal;
uint32_t _ripupLimits [RipupLimitsTableSize];
uint32_t _ripupCost;
uint64_t _eventsLimit;
unsigned int _flags;
bool _profileEventCosts;
private:
Configuration ( const Configuration& other );
Configuration& operator= ( const Configuration& );
@ -103,11 +103,11 @@ namespace Katana {
inline const Anabatic::Configuration* Configuration::base () const { return dynamic_cast<const Anabatic::Configuration*>(this); }
inline Anabatic::Configuration* Configuration::base () { return dynamic_cast<Anabatic::Configuration*>(this); }
inline Configuration::PostEventCb_t& Configuration::getPostEventCb () { return _postEventCb; }
inline unsigned long Configuration::getEventsLimit () const { return _eventsLimit; }
inline unsigned int Configuration::getRipupCost () const { return _ripupCost; }
inline size_t Configuration::getHTracksReservedLocal () const { return _hTracksReservedLocal; }
inline size_t Configuration::getVTracksReservedLocal () const { return _vTracksReservedLocal; }
inline void Configuration::setRipupCost ( unsigned int cost ) { _ripupCost = cost; }
inline uint64_t Configuration::getEventsLimit () const { return _eventsLimit; }
inline uint32_t Configuration::getRipupCost () const { return _ripupCost; }
inline uint32_t Configuration::getHTracksReservedLocal () const { return _hTracksReservedLocal; }
inline uint32_t Configuration::getVTracksReservedLocal () const { return _vTracksReservedLocal; }
inline void Configuration::setRipupCost ( uint32_t cost ) { _ripupCost = cost; }
inline void Configuration::setPostEventCb ( PostEventCb_t cb ) { _postEventCb = cb; }
inline void Configuration::setEventsLimit ( unsigned long limit ) { _eventsLimit = limit; }
inline bool Configuration::useClockTree () const { return _flags & UseClockTree; }

View File

@ -41,11 +41,13 @@ namespace Katana {
public:
inline Flags ( uint64_t );
inline Flags ( const Super& );
inline Flags ( const Hurricane::BaseFlags& );
};
inline Flags::Flags ( uint64_t flags ) : Super(flags) { }
inline Flags::Flags ( const Flags::Super& base ) : Super(base) { }
inline Flags::Flags ( uint64_t flags ) : Super(flags) { }
inline Flags::Flags ( const Flags::Super& flags ) : Super(flags) { }
inline Flags::Flags ( const Hurricane::BaseFlags& flags ) : Super(flags) { }
} // Katana namespace.

View File

@ -71,19 +71,19 @@ namespace Katana {
inline Track* getTrack () const;
inline DbU::Unit getLeftMinExtend () const;
inline DbU::Unit getRightMinExtend () const;
inline unsigned int getTerminals () const;
inline uint32_t getTerminals () const;
inline Net* getNet () const;
inline unsigned int getState () const;
inline unsigned int getStateCount () const;
inline unsigned int getRipupCount () const;
inline unsigned int getStateAndRipupCount () const;
inline uint32_t getState () const;
inline uint32_t getStateCount () const;
inline uint32_t getRipupCount () const;
inline uint32_t getStateAndRipupCount () const;
DbU::Unit getWiringDelta ( DbU::Unit axis ) const;
inline const vector<TrackElement*>& getPerpandiculars () const;
inline const Interval& getPerpandicularFree () const;
inline void setState ( unsigned int, unsigned int flags=0 );
inline void setState ( uint32_t, Flags flags=Flags::NoFlags );
inline void setRoutingEvent ( RoutingEvent* );
inline void setChildSegment ( TrackElement* );
inline void setRipupCount ( unsigned int );
inline void setRipupCount ( uint32_t );
inline void incRipupCount ();
inline void decRipupCount ();
inline void resetRipupCount ();
@ -121,25 +121,25 @@ namespace Katana {
inline TrackElement* DataNegociate::getTrackSegment () const { return _trackSegment; }
inline TrackElement* DataNegociate::getChildSegment () const { return _childSegment; }
inline Track* DataNegociate::getTrack () const { return _trackSegment->getTrack(); }
inline unsigned int DataNegociate::getState () const { return _state; }
inline unsigned int DataNegociate::getTerminals () const { return _terminals; }
inline unsigned int DataNegociate::getRipupCount () const { return _ripupCount; }
inline uint32_t DataNegociate::getState () const { return _state; }
inline uint32_t DataNegociate::getTerminals () const { return _terminals; }
inline uint32_t DataNegociate::getRipupCount () const { return _ripupCount; }
inline DbU::Unit DataNegociate::getLeftMinExtend () const { return _leftMinExtend; }
inline DbU::Unit DataNegociate::getRightMinExtend () const { return _rightMinExtend; }
inline Net* DataNegociate::getNet () const { return _net; }
inline const vector<TrackElement*>& DataNegociate::getPerpandiculars () const { return _perpandiculars; }
inline const Interval& DataNegociate::getPerpandicularFree () const { return _perpandicularFree; }
inline unsigned int DataNegociate::getStateCount () const { return _stateCount; }
inline uint32_t DataNegociate::getStateCount () const { return _stateCount; }
inline void DataNegociate::resetStateCount () { _stateCount=0; }
inline void DataNegociate::setRoutingEvent ( RoutingEvent* event ) { _routingEvent = event; }
inline void DataNegociate::setChildSegment ( TrackElement* child ) { _childSegment = child; }
inline void DataNegociate::setRipupCount ( unsigned int count ) { _ripupCount = count; }
inline void DataNegociate::setRipupCount ( uint32_t count ) { _ripupCount = count; }
inline void DataNegociate::incRipupCount () { _ripupCount++; }
inline void DataNegociate::decRipupCount () { if (_ripupCount) _ripupCount--; }
inline void DataNegociate::resetRipupCount () { _ripupCount = 0; }
inline string DataNegociate::_getTypeName () const { return "DataNegociate"; }
inline void DataNegociate::setState ( unsigned int state, unsigned int flags )
inline void DataNegociate::setState ( uint32_t state, Flags flags )
{
if ( (_state != state) or (flags & Flags::ResetCount) ) {
//std::cerr << "Changing state to:" << state << std::endl;
@ -149,7 +149,7 @@ namespace Katana {
_stateCount++;
}
inline unsigned int DataNegociate::getStateAndRipupCount () const
inline uint32_t DataNegociate::getStateAndRipupCount () const
{ return (_state << 4) + _ripupCount; }

View File

@ -68,7 +68,7 @@ namespace Katana {
, const Transformation&
);
KatanaEngine* createEngine ();
KatanaEngine* getForFramework ( unsigned int flags );
KatanaEngine* getForFramework ( uint32_t flags );
static GraphicKatanaEngine* grab ();
virtual const Name& getName () const;
Cell* getCell ();

View File

@ -30,7 +30,7 @@ namespace Katana {
class HorizontalTrack : public Track {
public:
static HorizontalTrack* create ( RoutingPlane*, unsigned int index );
static HorizontalTrack* create ( RoutingPlane*, uint32_t index );
virtual bool isHorizontal () const;
virtual bool isVertical () const;
virtual Flags getDirection () const;
@ -40,7 +40,7 @@ namespace Katana {
protected:
// Constructors & Destructors.
HorizontalTrack ( RoutingPlane*, unsigned int index );
HorizontalTrack ( RoutingPlane*, uint32_t index );
virtual ~HorizontalTrack ();
virtual void _postCreate ();
virtual void _preDestroy ();

View File

@ -72,12 +72,12 @@ namespace Katana {
inline Configuration* getKatanaConfiguration ();
virtual Configuration* getConfiguration ();
inline bool getToolSuccess () const;
inline unsigned long getEventsLimit () const;
inline unsigned int getRipupLimit ( unsigned int type ) const;
unsigned int getRipupLimit ( const TrackElement* ) const;
inline unsigned int getRipupCost () const;
inline size_t getHTracksReservedLocal () const;
inline size_t getVTracksReservedLocal () const;
inline uint64_t getEventsLimit () const;
inline uint32_t getRipupLimit ( uint32_t type ) const;
uint32_t getRipupLimit ( const TrackElement* ) const;
inline uint32_t getRipupCost () const;
inline uint32_t getHTracksReservedLocal () const;
inline uint32_t getVTracksReservedLocal () const;
inline bool profileEventCosts () const;
virtual const Name& getName () const;
inline Configuration::PostEventCb_t&
@ -86,7 +86,7 @@ namespace Katana {
inline size_t getRoutingPlanesSize () const;
RoutingPlane* getRoutingPlaneByIndex ( size_t index ) const;
RoutingPlane* getRoutingPlaneByLayer ( const Layer* ) const;
Track* getTrackByPosition ( const Layer*, DbU::Unit axis, unsigned int mode=Constant::Nearest ) const;
Track* getTrackByPosition ( const Layer*, DbU::Unit axis, uint32_t mode=Constant::Nearest ) const;
DataSymmetric* getDataSymmetric ( Net* );
inline const std::map<Net*,DataSymmetric*>&
getSymmetrics () const;
@ -97,24 +97,24 @@ namespace Katana {
virtual void openSession ();
inline void setViewer ( CellViewer* );
inline void setPostEventCb ( Configuration::PostEventCb_t );
inline void setEventLimit ( unsigned long );
inline void setEventLimit ( uint64_t );
inline void setMinimumWL ( double );
inline void setRipupLimit ( unsigned int type, unsigned int );
inline void setRipupCost ( unsigned int );
inline void setHTracksReservedLocal ( size_t );
inline void setVTracksReservedLocal ( size_t );
inline void setRipupLimit ( uint32_t type, uint32_t );
inline void setRipupCost ( uint32_t );
inline void setHTracksReservedLocal ( uint32_t );
inline void setVTracksReservedLocal ( uint32_t );
DataSymmetric* addDataSymmetric ( Net* );
void setupPowerRails ();
void protectRoutingPads ();
void preProcess ();
void setInterrupt ( bool );
void setupRoutingPlanes ();
void setupGlobalGraph ( unsigned int mode );
void setupGlobalGraph ( uint32_t mode );
void annotateGlobalGraph ();
void setFixedPreRouted ();
void digitalInit ();
void analogInit ();
void runNegociate ( unsigned int flags=Flags::NoFlags );
void runNegociate ( Flags flags=Flags::NoFlags );
void runGlobalRouter ();
void runSymmetricRouter ();
void runTest ();
@ -124,7 +124,7 @@ namespace Katana {
void _computeCagedConstraints ();
TrackElement* _lookup ( Segment* ) const;
inline TrackElement* _lookup ( AutoSegment* ) const;
bool _check ( unsigned int& overlap, const char* message=NULL ) const;
bool _check ( uint32_t& overlap, const char* message=NULL ) const;
void _check ( Net* ) const;
virtual Record* _getRecord () const;
virtual string _getString () const;
@ -159,22 +159,22 @@ namespace Katana {
inline Configuration* KatanaEngine::getKatanaConfiguration () { return _configuration; }
inline Configuration::PostEventCb_t& KatanaEngine::getPostEventCb () { return _configuration->getPostEventCb(); }
inline bool KatanaEngine::getToolSuccess () const { return _toolSuccess; }
inline unsigned long KatanaEngine::getEventsLimit () const { return _configuration->getEventsLimit(); }
inline unsigned int KatanaEngine::getRipupCost () const { return _configuration->getRipupCost(); }
inline size_t KatanaEngine::getHTracksReservedLocal () const { return _configuration->getHTracksReservedLocal(); }
inline size_t KatanaEngine::getVTracksReservedLocal () const { return _configuration->getVTracksReservedLocal(); }
inline unsigned int KatanaEngine::getRipupLimit ( unsigned int type ) const { return _configuration->getRipupLimit(type); }
inline uint64_t KatanaEngine::getEventsLimit () const { return _configuration->getEventsLimit(); }
inline uint32_t KatanaEngine::getRipupCost () const { return _configuration->getRipupCost(); }
inline uint32_t KatanaEngine::getHTracksReservedLocal () const { return _configuration->getHTracksReservedLocal(); }
inline uint32_t KatanaEngine::getVTracksReservedLocal () const { return _configuration->getVTracksReservedLocal(); }
inline uint32_t KatanaEngine::getRipupLimit ( uint32_t type ) const { return _configuration->getRipupLimit(type); }
inline bool KatanaEngine::profileEventCosts () const { return _configuration->profileEventCosts(); }
inline const std::map<Net*,DataSymmetric*>&
KatanaEngine::getSymmetrics () const { return _symmetrics; }
inline NegociateWindow* KatanaEngine::getNegociateWindow () { return _negociateWindow; }
inline size_t KatanaEngine::getRoutingPlanesSize () const { return _routingPlanes.size(); }
inline void KatanaEngine::setViewer ( CellViewer* viewer ) { _viewer=viewer; }
inline void KatanaEngine::setEventLimit ( unsigned long limit ) { _configuration->setEventsLimit(limit); }
inline void KatanaEngine::setRipupLimit ( unsigned int type, unsigned int limit ) { _configuration->setRipupLimit(limit,type); }
inline void KatanaEngine::setRipupCost ( unsigned int cost ) { _configuration->setRipupCost(cost); }
inline void KatanaEngine::setHTracksReservedLocal ( size_t reserved ) { _configuration->setHTracksReservedLocal(reserved); }
inline void KatanaEngine::setVTracksReservedLocal ( size_t reserved ) { _configuration->setVTracksReservedLocal(reserved); }
inline void KatanaEngine::setEventLimit ( uint64_t limit ) { _configuration->setEventsLimit(limit); }
inline void KatanaEngine::setRipupLimit ( uint32_t type, uint32_t limit ) { _configuration->setRipupLimit(limit,type); }
inline void KatanaEngine::setRipupCost ( uint32_t cost ) { _configuration->setRipupCost(cost); }
inline void KatanaEngine::setHTracksReservedLocal ( uint32_t reserved ) { _configuration->setHTracksReservedLocal(reserved); }
inline void KatanaEngine::setVTracksReservedLocal ( uint32_t reserved ) { _configuration->setVTracksReservedLocal(reserved); }
inline void KatanaEngine::setMinimumWL ( double minimum ) { _minimumWL = minimum; }
inline void KatanaEngine::setPostEventCb ( Configuration::PostEventCb_t cb ) { _configuration->setPostEventCb(cb); }
inline void KatanaEngine::printConfiguration () const { _configuration->print(getCell()); }

View File

@ -36,19 +36,19 @@ namespace Katana {
class Manipulator {
public:
enum FunctionFlag { ToRipupLimit = 0x0001
, AllowExpand = 0x0002
, NoExpand = 0x0004
, PerpandicularsFirst = 0x0008
, ToMoveUp = 0x0010
, AllowLocalMoveUp = 0x0020
, AllowTerminalMoveUp = 0x0040
, AllowShortPivotUp = 0x0080
, NoDoglegReuse = 0x0100
, LeftAxisHint = 0x0200
, RightAxisHint = 0x0400
, NotOnLastRipup = 0x0800
, IgnoreContacts = 0x1000
enum FunctionFlag { ToRipupLimit = (1 << 0)
, AllowExpand = (1 << 1)
, NoExpand = (1 << 2)
, PerpandicularsFirst = (1 << 3)
, ToMoveUp = (1 << 4)
, AllowLocalMoveUp = (1 << 5)
, AllowTerminalMoveUp = (1 << 6)
, AllowShortPivotUp = (1 << 7)
, NoDoglegReuse = (1 << 8)
, LeftAxisHint = (1 << 9)
, RightAxisHint = (1 << 10)
, NotOnLastRipup = (1 << 11)
, IgnoreContacts = (1 << 12)
};
public:
Manipulator ( TrackElement*, SegmentFsm& );
@ -59,27 +59,27 @@ namespace Katana {
inline const Layer* getLayer () const;
inline DbU::Unit getPitch () const;
inline DbU::Unit getPPitch () const;
bool canRipup ( unsigned int flags=0 ) const;
bool canRipup ( uint32_t flags=0 ) const;
bool isCaged ( DbU::Unit ) const;
bool ripup ( unsigned int type, DbU::Unit axisHint=0 );
bool ripupPerpandiculars ( unsigned int flags=0 );
bool ripup ( uint32_t type, DbU::Unit axisHint=0 );
bool ripupPerpandiculars ( uint32_t flags=0 );
void repackPerpandiculars ();
void reprocessPerpandiculars ();
bool ripple ();
bool minimize ();
bool slacken ( unsigned int flags=Flags::NoFlags );
bool slacken ( Flags flags=Flags::NoFlags );
bool pivotUp ();
bool pivotDown ();
bool moveUp ( unsigned int flags=0 );
bool moveUp ( uint32_t flags=0 );
bool makeDogleg ();
bool makeDogleg ( DbU::Unit );
bool makeDogleg ( Interval );
bool relax ( Interval, unsigned int flags=AllowExpand );
bool relax ( Interval, uint32_t flags=AllowExpand );
bool insertInTrack ( size_t );
bool shrinkToTrack ( size_t
, unsigned int flags=0
, DbU::Unit leftAxisHint=0
, DbU::Unit rightAxisHint=0
, uint32_t flags=0
, DbU::Unit leftAxisHint=0
, DbU::Unit rightAxisHint=0
);
bool forceToTrack ( size_t );
bool forceOverLocals ();

View File

@ -109,10 +109,10 @@ namespace Katana {
inline void setInterrupt ( bool );
inline void setStage ( Stage );
double computeWirelength ();
TrackElement* createTrackSegment ( AutoSegment*, unsigned int flags );
void addRoutingEvent ( TrackElement*, unsigned int level );
inline void rescheduleEvent ( RoutingEvent*, unsigned int level );
void run ( unsigned int flags );
TrackElement* createTrackSegment ( AutoSegment*, Flags flags );
void addRoutingEvent ( TrackElement*, uint32_t level );
inline void rescheduleEvent ( RoutingEvent*, uint32_t level );
void run ( Flags flags );
void printStatistics () const;
void _createRouting ( Anabatic::GCell* );
void _associateSymmetrics ();
@ -124,7 +124,7 @@ namespace Katana {
private:
// Attributes.
unsigned int _flags;
Flags _flags;
bool _interrupt;
KatanaEngine* _katana;
vector<GCell*> _gcells;
@ -151,7 +151,7 @@ namespace Katana {
inline RoutingEventQueue& NegociateWindow::getEventQueue () { return _eventQueue; }
inline RoutingEventHistory& NegociateWindow::getEventHistory () { return _eventHistory; }
inline void NegociateWindow::setInterrupt ( bool state ) { _interrupt = state; }
inline void NegociateWindow::rescheduleEvent ( RoutingEvent* event, unsigned int level ) { event->reschedule(_eventQueue,level); }
inline void NegociateWindow::rescheduleEvent ( RoutingEvent* event, uint32_t level ) { event->reschedule(_eventQueue,level); }
inline std::string NegociateWindow::_getTypeName () const { return "NegociateWindow"; }

View File

@ -65,16 +65,16 @@ namespace Katana {
Key ( const RoutingEvent* );
void update ( const RoutingEvent* );
private:
unsigned int _tracksNb:16;
float _priority;
unsigned int _eventLevel;
unsigned int _segFlags;
unsigned int _layerDepth;
DbU::Unit _length;
DbU::Unit _axis;
DbU::Unit _sourceU;
Net* _net;
unsigned long _id;
unsigned int _tracksNb:16;
float _priority;
uint32_t _eventLevel;
uint32_t _segFlags;
uint32_t _layerDepth;
DbU::Unit _length;
DbU::Unit _axis;
DbU::Unit _sourceU;
Net* _net;
uint64_t _id;
friend class Compare;
};
@ -95,14 +95,14 @@ namespace Katana {
enum Mode { Negociate=1, Pack=2, Repair=3 };
public:
static unsigned int getStage ();
static size_t getAllocateds ();
static size_t getProcesseds ();
static size_t getCloneds ();
static uint32_t getStage ();
static uint32_t getAllocateds ();
static uint32_t getProcesseds ();
static uint32_t getCloneds ();
static void resetProcesseds ();
static void setStage ( unsigned int );
static void setStage ( uint32_t );
public:
static RoutingEvent* create ( TrackElement*, unsigned int mode=Negociate );
static RoutingEvent* create ( TrackElement*, uint32_t mode=Negociate );
RoutingEvent* clone () const;
void destroy ();
inline bool isCloned () const;
@ -114,11 +114,11 @@ namespace Katana {
inline bool isSheared () const;
inline bool isRipedByLocal () const;
inline bool isOverConstrained () const;
inline unsigned int getId () const;
inline unsigned int getTimeStamp () const;
inline uint32_t getId () const;
inline uint32_t getTimeStamp () const;
inline bool getMode () const;
inline bool canMinimize () const;
unsigned int getState () const;
uint32_t getState () const;
inline const Key& getKey () const;
inline TrackElement* getSegment () const;
inline const vector<TrackElement*>& getPerpandiculars () const;
@ -129,10 +129,10 @@ namespace Katana {
inline const Interval& getOptimal () const;
inline const Interval& getPerpandicularFree () const;
inline float getPriority () const;
inline unsigned int getTracksNb () const;
inline unsigned int getTracksFree () const;
inline unsigned int getInsertState () const;
inline unsigned int getEventLevel () const;
inline uint32_t getTracksNb () const;
inline uint32_t getTracksFree () const;
inline uint32_t getInsertState () const;
inline uint32_t getEventLevel () const;
void revalidate ();
inline void updateKey ();
void process ( RoutingEventQueue&
@ -140,23 +140,23 @@ namespace Katana {
, RoutingEventLoop&
);
void setSegment ( TrackElement* );
RoutingEvent* reschedule ( RoutingEventQueue&, unsigned int eventLevel );
void setMode ( unsigned int );
void setState ( unsigned int );
inline void setTimeStamp ( unsigned int );
RoutingEvent* reschedule ( RoutingEventQueue&, uint32_t eventLevel );
void setMode ( uint32_t );
void setState ( uint32_t );
inline void setTimeStamp ( uint32_t );
inline void setProcessed ( bool state=true );
inline void setDisabled ( bool state=true );
inline void setMinimized ( bool state=true );
inline void setRipedByLocal ( bool state=true );
inline void setTracksFree ( unsigned int );
inline void setTracksFree ( uint32_t );
inline void setForcedToHint ( bool state = true );
void setAxisHint ( DbU::Unit );
void setAxisHintFromParent ();
inline void updateAxisHistory ();
inline void setInsertState ( unsigned int );
inline void setInsertState ( uint32_t );
inline void incInsertState ();
inline void resetInsertState ();
inline void setEventLevel ( unsigned int );
inline void setEventLevel ( uint32_t );
void _processNegociate ( RoutingEventQueue&, RoutingEventHistory& );
void _processPack ( RoutingEventQueue&, RoutingEventHistory& );
void _processRepair ( RoutingEventQueue&, RoutingEventHistory& );
@ -164,16 +164,16 @@ namespace Katana {
string _getString () const;
string _getTypeName () const;
private:
RoutingEvent ( TrackElement*, unsigned int mode );
RoutingEvent ( TrackElement*, uint32_t mode );
~RoutingEvent ();
protected:
// Attributes.
static unsigned int _idCounter;
static unsigned int _stage;
static size_t _allocateds;
static size_t _processeds;
static size_t _cloneds;
static uint32_t _idCounter;
static uint32_t _stage;
static uint32_t _allocateds;
static uint32_t _processeds;
static uint32_t _cloneds;
mutable bool _cloned;
bool _processed;
bool _disabled;
@ -181,8 +181,8 @@ namespace Katana {
bool _minimized;
bool _forceToHint;
bool _ripedByLocal;
unsigned int _id;
unsigned int _timeStamp;
uint32_t _id;
uint32_t _timeStamp;
TrackElement* _segment;
DataNegociate* _dataNegociate;
DbU::Unit _axisHistory;
@ -195,7 +195,7 @@ namespace Katana {
unsigned int _insertState : 6;
unsigned int _mode : 4;
unsigned int _rippleState : 4;
unsigned int _eventLevel;
uint32_t _eventLevel;
float _priority;
//vector<TrackElement*> _perpandiculars;
Key _key;
@ -209,8 +209,8 @@ namespace Katana {
inline bool RoutingEvent::isForcedToHint () const { return _forceToHint; }
inline bool RoutingEvent::isRipedByLocal () const { return _ripedByLocal; }
inline bool RoutingEvent::isOverConstrained () const { return _overConstrained; }
inline unsigned int RoutingEvent::getId () const { return _id; }
inline unsigned int RoutingEvent::getTimeStamp () const { return _timeStamp; }
inline uint32_t RoutingEvent::getId () const { return _id; }
inline uint32_t RoutingEvent::getTimeStamp () const { return _timeStamp; }
inline bool RoutingEvent::getMode () const { return _mode; }
inline bool RoutingEvent::canMinimize () const { return not _minimized; }
inline const RoutingEvent::Key& RoutingEvent::getKey () const { return _key; }
@ -225,22 +225,22 @@ namespace Katana {
inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); }
//inline const Interval& RoutingEvent::getPerpandicular () const { return _perpandicular; }
inline float RoutingEvent::getPriority () const { return _priority; }
inline unsigned int RoutingEvent::getEventLevel () const { return _eventLevel; }
inline unsigned int RoutingEvent::getTracksNb () const { return _tracksNb; }
inline unsigned int RoutingEvent::getTracksFree () const { return _tracksFree; }
inline unsigned int RoutingEvent::getInsertState () const { return _insertState; }
inline void RoutingEvent::setTimeStamp ( unsigned int stamp ) { _timeStamp = stamp; }
inline uint32_t RoutingEvent::getEventLevel () const { return _eventLevel; }
inline uint32_t RoutingEvent::getTracksNb () const { return _tracksNb; }
inline uint32_t RoutingEvent::getTracksFree () const { return _tracksFree; }
inline uint32_t RoutingEvent::getInsertState () const { return _insertState; }
inline void RoutingEvent::setTimeStamp ( uint32_t stamp ) { _timeStamp = stamp; }
inline void RoutingEvent::setProcessed ( bool state ) { _processed = state; }
inline void RoutingEvent::setDisabled ( bool state ) { _disabled = state; }
inline void RoutingEvent::setMinimized ( bool state ) { _minimized = state; }
inline void RoutingEvent::setRipedByLocal ( bool state ) { _ripedByLocal = state; }
inline void RoutingEvent::setTracksFree ( unsigned int nb ) { _tracksFree = nb; }
inline void RoutingEvent::setTracksFree ( uint32_t nb ) { _tracksFree = nb; }
inline void RoutingEvent::setForcedToHint ( bool state ) { _forceToHint = state; }
inline void RoutingEvent::updateAxisHistory () { _axisHistory = _segment->getAxis(); }
inline void RoutingEvent::setInsertState ( unsigned int state ) { _insertState = state; }
inline void RoutingEvent::setInsertState ( uint32_t state ) { _insertState = state; }
inline void RoutingEvent::incInsertState () { _insertState++; }
inline void RoutingEvent::resetInsertState () { _insertState = 0; }
inline void RoutingEvent::setEventLevel ( unsigned int level ) { _eventLevel = level; }
inline void RoutingEvent::setEventLevel ( uint32_t level ) { _eventLevel = level; }
inline void RoutingEvent::updateKey () { revalidate(); _key.update(this); }
inline bool RoutingEvent::CompareById::operator() ( const RoutingEvent* lhs, const RoutingEvent* rhs ) const

View File

@ -10,7 +10,7 @@
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
// | C++ Header : "./katana/RoutingEventQueue.h" |
// | C++ Header : "./katana/RoutingEventQueue.h" |
// +-----------------------------------------------------------------+
@ -39,10 +39,10 @@ namespace Katana {
~RoutingEventQueue ();
inline bool empty () const;
inline size_t size () const;
inline unsigned int getTopEventLevel () const;
inline uint32_t getTopEventLevel () const;
RoutingEvent* pop ();
void load ( const vector<TrackElement*>& );
void add ( TrackElement*, unsigned int level );
void add ( TrackElement*, uint32_t level );
inline void push ( RoutingEvent* );
void repush ( RoutingEvent* );
void repushInvalidateds ();
@ -57,7 +57,7 @@ namespace Katana {
protected:
// Attributes.
unsigned int _topEventLevel;
uint32_t _topEventLevel;
RoutingEventSet _pushRequests;
multiset<RoutingEvent*,RoutingEvent::Compare> _events;
@ -69,11 +69,11 @@ namespace Katana {
// Inline Functions.
inline bool RoutingEventQueue::empty () const { return _events.empty(); }
inline size_t RoutingEventQueue::size () const { return _events.size(); }
inline unsigned int RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; }
inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; }
inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); }
inline bool RoutingEventQueue::empty () const { return _events.empty(); }
inline size_t RoutingEventQueue::size () const { return _events.size(); }
inline uint32_t RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; }
inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; }
inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); }
} // Katana namespace.

View File

@ -39,7 +39,7 @@ namespace Katana {
inline bool isVertical () const;
inline KatanaEngine* getKatanaEngine () const;
inline RoutingLayerGauge* getLayerGauge () const;
inline unsigned int getDirection () const;
inline Flags getDirection () const;
inline size_t getDepth () const;
inline DbU::Unit getAxisMin () const;
inline DbU::Unit getAxisMax () const;
@ -53,8 +53,8 @@ namespace Katana {
inline size_t computeTracksSize () const;
inline DbU::Unit getTrackPosition ( size_t index ) const;
Track* getTrackByIndex ( size_t index ) const;
Track* getTrackByPosition ( DbU::Unit axis, unsigned int mode=Flags::Nearest ) const;
bool _check ( unsigned int& overlaps ) const;
Track* getTrackByPosition ( DbU::Unit axis, uint32_t mode=Constant::Nearest ) const;
bool _check ( uint32_t& overlaps ) const;
Record* _getRecord () const;
string _getString () const;
inline string _getTypeName () const;
@ -70,7 +70,7 @@ namespace Katana {
KatanaEngine* _katana;
RoutingLayerGauge* _layerGauge;
size_t _depth;
unsigned int _flags;
Flags _flags;
DbU::Unit _axisMin;
DbU::Unit _axisMax;
DbU::Unit _trackMin;
@ -93,7 +93,7 @@ namespace Katana {
inline KatanaEngine* RoutingPlane::getKatanaEngine () const { return _katana; }
inline RoutingLayerGauge* RoutingPlane::getLayerGauge () const { return _layerGauge; }
inline unsigned int RoutingPlane::getDirection () const { return _flags & Flags::DirectionMask; }
inline Flags RoutingPlane::getDirection () const { return _flags & Flags::DirectionMask; }
inline size_t RoutingPlane::getDepth () const { return _depth; }
inline DbU::Unit RoutingPlane::getAxisMin () const { return _axisMin; }
inline DbU::Unit RoutingPlane::getAxisMax () const { return _axisMax; }

View File

@ -62,27 +62,27 @@ namespace Katana {
};
public:
SegmentAction ( TrackElement*
, unsigned int type
, uint32_t type
, DbU::Unit axisHint=0
, unsigned int toState =0
, uint32_t toState =0
);
inline TrackElement* getSegment () const;
inline unsigned int getType () const;
inline uint32_t getType () const;
inline void setAxisHint ( DbU::Unit );
inline unsigned int setFlag ( unsigned int );
inline uint32_t setFlag ( uint32_t );
bool doAction ( RoutingEventQueue& );
private:
TrackElement* _segment;
unsigned int _type;
uint32_t _type;
DbU::Unit _axisHint;
unsigned int _toState;
uint32_t _toState;
};
inline TrackElement* SegmentAction::getSegment () const { return _segment; }
inline unsigned int SegmentAction::getType () const { return _type; }
inline uint32_t SegmentAction::getType () const { return _type; }
inline void SegmentAction::setAxisHint ( DbU::Unit axis ) { _axisHint = axis; }
inline unsigned int SegmentAction::setFlag ( unsigned int flag ) { _type |= flag; return _type; }
inline uint32_t SegmentAction::setFlag ( uint32_t flag ) { _type |= flag; return _type; }
// -------------------------------------------------------------------
@ -120,7 +120,7 @@ namespace Katana {
inline RoutingEventHistory& getHistory () const;
inline TrackElement* getSegment1 () const;
inline TrackElement* getSegment2 () const;
inline unsigned int getState () const;
inline uint32_t getState () const;
inline DataNegociate* getData ();
inline DataNegociate* getData1 ();
inline DataNegociate* getData2 ();
@ -134,12 +134,12 @@ namespace Katana {
inline size_t getBegin ( size_t );
inline size_t getEnd ( size_t );
inline vector<SegmentAction>& getActions ();
inline void setState ( unsigned int );
void setDataState ( unsigned int );
inline void setState ( uint32_t );
void setDataState ( uint32_t );
void addAction ( TrackElement*
, unsigned int type
, DbU::Unit axisHint=0
, unsigned int toState =0
, uint32_t type
, DbU::Unit axisHint=0
, uint32_t toState =0
);
void doActions ();
inline void clearActions ();
@ -150,29 +150,29 @@ namespace Katana {
void bindToTrack ( size_t );
void moveToTrack ( size_t );
void ripupPerpandiculars ();
bool canRipup ( unsigned int flags=0 );
bool canRipup ( uint32_t flags=0 );
bool conflictSolveByHistory ();
bool conflictSolveByPlaceds ();
bool solveTerminalVsGlobal ();
bool desaturate ();
bool slackenTopology ( unsigned int flags=0 );
bool slackenTopology ( uint32_t flags=0 );
bool solveFullBlockages ();
private:
bool _slackenStrap ( TrackElement*&
, DataNegociate*&
, unsigned int flags );
, uint32_t flags );
bool _slackenLocal ( TrackElement*&
, DataNegociate*&
, unsigned int flags );
, uint32_t flags );
bool _slackenGlobal ( TrackElement*&
, DataNegociate*&
, unsigned int flags );
, uint32_t flags );
private:
RoutingEvent* _event1;
RoutingEvent* _event2;
RoutingEventQueue& _queue;
RoutingEventHistory& _history;
unsigned int _state;
uint32_t _state;
DataNegociate* _data1;
DataNegociate* _data2;
Interval _constraint;
@ -192,7 +192,7 @@ namespace Katana {
inline RoutingEvent* SegmentFsm::getEvent2 () const { return _event2; }
inline RoutingEventQueue& SegmentFsm::getQueue () const { return _queue; }
inline RoutingEventHistory& SegmentFsm::getHistory () const { return _history; }
inline unsigned int SegmentFsm::getState () const { return _state; }
inline uint32_t SegmentFsm::getState () const { return _state; }
inline TrackElement* SegmentFsm::getSegment1 () const { return _event1->getSegment(); }
inline TrackElement* SegmentFsm::getSegment2 () const { return (_event2) ? _event2->getSegment() : NULL; }
inline DataNegociate* SegmentFsm::getData () { return (_useEvent2) ? _data2 : _data1; }
@ -208,7 +208,7 @@ namespace Katana {
inline size_t SegmentFsm::getBegin ( size_t i ) { return (_useEvent2) ? _costs[i][1].getBegin() : _costs[i][0].getBegin(); }
inline size_t SegmentFsm::getEnd ( size_t i ) { return (_useEvent2) ? _costs[i][1].getEnd () : _costs[i][0].getEnd (); }
inline vector<SegmentAction>& SegmentFsm::getActions () { return _actions; }
inline void SegmentFsm::setState ( unsigned int state ) { _state = state; }
inline void SegmentFsm::setState ( uint32_t state ) { _state = state; }
inline void SegmentFsm::clearActions () { _actions.clear(); }
inline SegmentFsm& SegmentFsm::useEvent1 () { _useEvent2 = false; return *this; }
inline SegmentFsm& SegmentFsm::useEvent2 () { _useEvent2 = true ; return *this; }

View File

@ -72,7 +72,7 @@ namespace Katana {
static Configuration* getConfiguration ();
inline static Net* getBlockageNet ();
inline static NegociateWindow* getNegociateWindow ();
inline static unsigned int getRipupCost ();
inline static uint32_t getRipupCost ();
inline static Anabatic::GCell* getGCellUnder ( DbU::Unit, DbU::Unit );
static void setInterrupt ( bool );
inline static void addInsertEvent ( TrackMarker* , Track* );
@ -88,7 +88,7 @@ namespace Katana {
private:
KatanaEngine* _getKatanaEngine ();
Net* _getBlockageNet ();
unsigned int _getRipupCost ();
uint32_t _getRipupCost ();
Anabatic::GCell* _getGCellUnder ( DbU::Unit, DbU::Unit );
void _doRemovalEvents ();
virtual size_t _revalidate ();
@ -155,7 +155,7 @@ namespace Katana {
inline NegociateWindow* Session::getNegociateWindow ()
{ return get("getNegociateWindow()")->_getNegociateWindow(); }
inline unsigned int Session::getRipupCost ()
inline uint32_t Session::getRipupCost ()
{ return get("getRipupCost()")->_getRipupCost(); }
inline Anabatic::GCell* Session::getGCellUnder ( DbU::Unit x, DbU::Unit y )

View File

@ -42,13 +42,13 @@ namespace Katana {
class Track {
public:
enum IndexState { BeginIsTrackMin = 0x00000001
, BeginIsSegmentMin = 0x00000002
, BeginIsSegmentMax = 0x00000004
, EndIsTrackMax = 0x00000008
, EndIsSegmentMin = 0x00000010
, EndIsNextSegmentMin = 0x00000020
, EndIsSegmentMax = 0x00000040
enum IndexState { BeginIsTrackMin = (1 << 0)
, BeginIsSegmentMin = (1 << 1)
, BeginIsSegmentMax = (1 << 2)
, EndIsTrackMax = (1 << 3)
, EndIsSegmentMin = (1 << 4)
, EndIsNextSegmentMin = (1 << 5)
, EndIsSegmentMax = (1 << 6)
, BeforeFirstElement = BeginIsTrackMin |EndIsSegmentMin
, InsideElement = BeginIsSegmentMin|EndIsSegmentMax
, OutsideElement = BeginIsSegmentMax|EndIsNextSegmentMin
@ -71,7 +71,7 @@ namespace Katana {
KatanaEngine* getKatanaEngine () const;
virtual Flags getDirection () const = 0;
inline size_t getIndex () const;
unsigned int getDepth () const;
uint32_t getDepth () const;
const Layer* getLayer () const;
const Layer* getBlockageLayer () const;
inline DbU::Unit getAxis () const;
@ -88,20 +88,20 @@ namespace Katana {
TrackElement* getNextFixed ( size_t& index ) const;
size_t find ( const TrackElement* ) const;
DbU::Unit getSourcePosition ( vector<TrackElement*>::iterator ) const;
DbU::Unit getMinimalPosition ( size_t index, unsigned int state ) const;
DbU::Unit getMaximalPosition ( size_t index, unsigned int state ) const;
DbU::Unit getMinimalPosition ( size_t index, uint32_t state ) const;
DbU::Unit getMaximalPosition ( size_t index, uint32_t state ) const;
Interval getFreeInterval ( DbU::Unit position, Net* net=NULL ) const;
Interval getOccupiedInterval ( size_t& begin ) const;
Interval expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* ) const;
void getBeginIndex ( DbU::Unit position, size_t& begin, unsigned int& state ) const;
Interval expandFreeInterval ( size_t& begin, size_t& end, uint32_t state, Net* ) const;
void getBeginIndex ( DbU::Unit position, size_t& begin, uint32_t& state ) const;
void getOverlapBounds ( Interval, size_t& begin, size_t& end ) const;
TrackCost getOverlapCost ( Interval, Net*, size_t begin, size_t end, unsigned int flags ) const;
TrackCost getOverlapCost ( Interval, Net*, unsigned int flags ) const;
TrackCost getOverlapCost ( TrackElement*, unsigned int flags ) const;
void getTerminalWeight ( Interval, Net*, size_t& count, unsigned int& weight ) const;
TrackCost getOverlapCost ( Interval, Net*, size_t begin, size_t end, uint32_t flags ) const;
TrackCost getOverlapCost ( Interval, Net*, uint32_t flags ) const;
TrackCost getOverlapCost ( TrackElement*, uint32_t flags ) const;
void getTerminalWeight ( Interval, Net*, size_t& count, uint32_t& weight ) const;
DbU::Unit getSourcePosition ( size_t index ) const;
bool check ( unsigned int& overlaps, const char* message=NULL ) const;
unsigned int checkOverlap ( unsigned int& overlaps ) const;
bool check ( uint32_t& overlaps, const char* message=NULL ) const;
uint32_t checkOverlap ( uint32_t& overlaps ) const;
inline void setLocalAssigned ( bool );
void invalidate ();
void insert ( TrackElement* );
@ -128,7 +128,7 @@ namespace Katana {
protected:
// Constructors & Destructors.
Track ( RoutingPlane*, unsigned int index );
Track ( RoutingPlane*, uint32_t index );
virtual ~Track ();
virtual void _postCreate ();
virtual void _preDestroy ();
@ -137,8 +137,8 @@ namespace Katana {
Track& operator= ( const Track& );
protected:
// Protected functions.
inline unsigned int setMinimalFlags ( unsigned int& state, unsigned int flags ) const;
inline unsigned int setMaximalFlags ( unsigned int& state, unsigned int flags ) const;
inline uint32_t setMinimalFlags ( uint32_t& state, uint32_t flags ) const;
inline uint32_t setMaximalFlags ( uint32_t& state, uint32_t flags ) const;
protected:
// Sub-Classes.
@ -195,14 +195,14 @@ namespace Katana {
inline size_t Track::getSize () const { return _segments.size(); }
inline void Track::setLocalAssigned ( bool state ) { _localAssigned=state; }
inline unsigned int Track::setMinimalFlags ( unsigned int& state, unsigned int flags ) const
inline uint32_t Track::setMinimalFlags ( uint32_t& state, uint32_t flags ) const
{
state &= ~BeginMask;
state |= (flags & BeginMask);
return state;
}
inline unsigned int Track::setMaximalFlags ( unsigned int& state, unsigned int flags ) const
inline uint32_t Track::setMaximalFlags ( uint32_t& state, uint32_t flags ) const
{
state &= ~EndMask;
state |= (flags & EndMask);

View File

@ -54,20 +54,20 @@ namespace Katana {
};
class Compare {
public:
inline Compare ( unsigned int flags=0 );
inline Compare ( uint32_t flags=0 );
bool operator() ( const TrackCost& lhs, const TrackCost& rhs );
private:
unsigned int _flags;
uint32_t _flags;
};
public:
TrackCost ( Track* track );
TrackCost ( Track* track
, const Interval& interval
, size_t begin
, size_t end
, Net* net
, unsigned int flags
TrackCost ( Track* track );
TrackCost ( Track* track
, const Interval& interval
, size_t begin
, size_t end
, Net* net
, uint32_t flags
);
~TrackCost ();
inline bool isForGlobal () const;
@ -81,18 +81,18 @@ namespace Katana {
inline bool isOverlapGlobal () const;
inline bool isGlobalEnclosed () const;
bool isFree () const;
inline unsigned int getFlags () const;
inline uint32_t getFlags () const;
inline Track* getTrack () const;
inline size_t getBegin () const;
inline size_t getEnd () const;
inline const Interval& getInterval () const;
inline unsigned int getTerminals () const;
inline uint32_t getTerminals () const;
inline DbU::Unit getDelta () const;
inline DbU::Unit getDeltaPerpand () const;
inline DbU::Unit getLongestOverlap () const;
inline long getAxisWeight () const;
inline int getRipupCount () const;
inline unsigned int getDataState () const;
inline uint32_t getDataState () const;
inline void setForGlobal ();
inline void setBlockage ();
inline void setFixed ();
@ -103,14 +103,14 @@ namespace Katana {
inline void setHardOverlap ();
inline void setOverlapGlobal ();
inline void setGlobalEnclosed ();
inline void incTerminals ( unsigned int );
inline void incTerminals ( uint32_t );
inline void incDelta ( DbU::Unit );
inline void incDeltaPerpand ( DbU::Unit );
inline void incDeltaShared ( DbU::Unit );
inline void setAxisWeight ( DbU::Unit );
inline void setLonguestOverlap ( DbU::Unit );
inline void mergeRipupCount ( int );
inline void mergeDataState ( unsigned int );
inline void mergeDataState ( uint32_t );
void merge ( const TrackCost& );
void consolidate ();
Record* _getRecord () const;
@ -120,7 +120,7 @@ namespace Katana {
// Attributes.
protected:
unsigned int _flags;
uint32_t _flags;
Track* _track;
size_t _begin;
size_t _end;
@ -135,14 +135,14 @@ namespace Katana {
bool _rightOverlap;
bool _overlapGlobal;
bool _globalEnclosed;
unsigned int _terminals;
uint32_t _terminals;
DbU::Unit _delta;
DbU::Unit _deltaShared;
DbU::Unit _deltaPerpand;
DbU::Unit _axisWeight;
DbU::Unit _distanceToFixed;
DbU::Unit _longuestOverlap;
unsigned int _dataState;
uint32_t _dataState;
int _ripupCount;
};
@ -159,17 +159,17 @@ namespace Katana {
inline bool TrackCost::isHardOverlap () const { return _hardOverlap; }
inline bool TrackCost::isOverlapGlobal () const { return _overlapGlobal; }
inline bool TrackCost::isGlobalEnclosed () const { return _globalEnclosed; }
inline unsigned int TrackCost::getFlags () const { return _flags; }
inline uint32_t TrackCost::getFlags () const { return _flags; }
inline Track* TrackCost::getTrack () const { return _track; }
inline size_t TrackCost::getBegin () const { return _begin; }
inline size_t TrackCost::getEnd () const { return _end; }
inline const Interval& TrackCost::getInterval () const { return _interval; }
inline unsigned int TrackCost::getTerminals () const { return _terminals; }
inline uint32_t TrackCost::getTerminals () const { return _terminals; }
inline DbU::Unit TrackCost::getLongestOverlap () const { return _longuestOverlap; }
inline DbU::Unit TrackCost::getDelta () const { return _delta; }
inline long TrackCost::getAxisWeight () const { return _axisWeight; }
inline int TrackCost::getRipupCount () const { return _ripupCount; }
inline unsigned int TrackCost::getDataState () const { return _dataState; }
inline uint32_t TrackCost::getDataState () const { return _dataState; }
inline void TrackCost::setForGlobal () { _forGlobal = true; }
inline void TrackCost::setBlockage () { _blockage = true; }
inline void TrackCost::setFixed () { _fixed = true; }
@ -180,17 +180,17 @@ namespace Katana {
inline void TrackCost::setHardOverlap () { _hardOverlap = true; }
inline void TrackCost::setOverlapGlobal () { _overlapGlobal = true; }
inline void TrackCost::setGlobalEnclosed () { _globalEnclosed = true; }
inline void TrackCost::incTerminals ( unsigned int terminals ) { _terminals += terminals; }
inline void TrackCost::incTerminals ( uint32_t terminals ) { _terminals += terminals; }
inline void TrackCost::incDelta ( DbU::Unit delta ) { _delta += delta; }
inline void TrackCost::incDeltaPerpand ( DbU::Unit delta ) { _deltaPerpand += delta; }
inline void TrackCost::incDeltaShared ( DbU::Unit delta ) { _deltaShared += delta; }
inline void TrackCost::setAxisWeight ( DbU::Unit weight ) { _axisWeight = weight; }
inline void TrackCost::setLonguestOverlap ( DbU::Unit overlap ) { _longuestOverlap = (overlap > _longuestOverlap) ? overlap : _longuestOverlap; }
inline void TrackCost::mergeRipupCount ( int count ) { _ripupCount = (count>_ripupCount)?count:_ripupCount; }
inline void TrackCost::mergeDataState ( unsigned int state ) { _dataState = (state>_dataState)?state:_dataState; }
inline void TrackCost::mergeDataState ( uint32_t state ) { _dataState = (state>_dataState)?state:_dataState; }
inline string TrackCost::_getTypeName () const { return "TrackCost"; }
inline TrackCost::Compare::Compare ( unsigned int flags ) : _flags(flags) { }
inline TrackCost::Compare::Compare ( uint32_t flags ) : _flags(flags) { }
} // Katana namespace.

View File

@ -98,7 +98,7 @@ namespace Katana {
virtual bool isGlobal () const;
virtual bool isBipoint () const;
virtual bool isTerminal () const;
virtual bool isStrongTerminal ( unsigned int flags=0 ) const;
virtual bool isStrongTerminal ( Flags flags=Flags::NoFlags ) const;
virtual bool isStrap () const;
virtual bool isSlackened () const;
virtual bool isDogleg () const;
@ -116,12 +116,12 @@ namespace Katana {
inline bool hasTargetDogleg () const;
inline bool canRipple () const;
virtual bool canSlacken () const;
virtual bool canPivotUp ( float reserve, unsigned int flags ) const;
virtual bool canPivotDown ( float reserve, unsigned int flags ) const;
virtual bool canMoveUp ( float reserve, unsigned int flags=Flags::WithPerpands ) const;
virtual bool canPivotUp ( float reserve, Flags flags ) const;
virtual bool canPivotDown ( float reserve, Flags flags ) const;
virtual bool canMoveUp ( float reserve, Flags flags=Flags::WithPerpands ) const;
virtual bool canDogleg ();
virtual bool canDogleg ( Interval );
virtual bool canDogleg ( Anabatic::GCell*, unsigned int flags=0 );
virtual bool canDogleg ( Anabatic::GCell*, Flags flags=0 );
// Accessors
inline Observer<TrackElement>* getObserver ();
virtual unsigned long getId () const;
@ -133,7 +133,7 @@ namespace Katana {
inline Track* getTrack () const;
inline size_t getIndex () const;
virtual unsigned long getFreedomDegree () const;
virtual float getMaxUnderDensity ( unsigned int flags=0 ) const;
virtual float getMaxUnderDensity ( Flags flags=Flags::NoFlags ) const;
inline Box getBoundingBox () const;
virtual TrackElement* getNext () const;
virtual TrackElement* getPrevious () const;
@ -145,41 +145,41 @@ namespace Katana {
virtual Interval getFreeInterval () const;
virtual Interval getSourceConstraints () const;
virtual Interval getTargetConstraints () const;
virtual DataNegociate* getDataNegociate ( unsigned int flags=Flags::DataSelf ) const;
virtual DataNegociate* getDataNegociate ( Flags flags=Flags::DataSelf ) const;
virtual TrackElement* getCanonical ( Interval& );
virtual size_t getGCells ( vector<GCell*>& ) const;
virtual TrackElement* getParent () const;
virtual unsigned int getDoglegLevel () const;
virtual uint32_t getDoglegLevel () const;
virtual TrackElement* getSourceDogleg ();
virtual TrackElement* getTargetDogleg ();
virtual TrackElement* getSymmetric ();
virtual TrackElements getPerpandiculars ();
// Mutators.
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setFlags ( uint32_t );
inline void unsetFlags ( uint32_t );
inline void setRouted ();
virtual void setTrack ( Track* );
inline void setIndex ( size_t );
virtual void setSymmetric ( TrackElement* );
virtual void updateFreedomDegree ();
virtual void setDoglegLevel ( unsigned int );
virtual void setDoglegLevel ( uint32_t );
virtual void swapTrack ( TrackElement* );
virtual void reschedule ( unsigned int level );
virtual void reschedule ( uint32_t level );
virtual void detach ();
virtual void invalidate ();
virtual void revalidate ();
virtual void updatePPitch ();
virtual void incOverlapCost ( Net*, TrackCost& ) const;
virtual void setAxis ( DbU::Unit, unsigned int flags=Anabatic::SegAxisSet );
virtual void setAxis ( DbU::Unit, uint32_t flags=Anabatic::SegAxisSet );
virtual TrackElement* makeDogleg ();
inline bool makeDogleg ( Anabatic::GCell* );
virtual TrackElement* makeDogleg ( Anabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel );
virtual TrackElement* makeDogleg ( Interval, unsigned int& flags );
virtual TrackElement* makeDogleg ( Interval, Flags& flags );
virtual void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel );
virtual bool moveAside ( unsigned int flags );
virtual bool slacken ( unsigned int flags=Flags::NoFlags );
virtual bool moveUp ( unsigned int flags );
virtual bool moveDown ( unsigned int flags );
virtual bool moveAside ( Flags flags );
virtual bool slacken ( Flags flags=Flags::NoFlags );
virtual bool moveUp ( Flags flags );
virtual bool moveDown ( Flags flags );
#if THIS_IS_DISABLED
virtual void desalignate ();
#endif
@ -192,7 +192,7 @@ namespace Katana {
// Static Attributes.
static SegmentOverlapCostCB* _overlapCostCallback;
// Attributes.
unsigned int _flags;
uint32_t _flags;
Track* _track;
size_t _index;
DbU::Unit _sourceU;
@ -214,8 +214,8 @@ namespace Katana {
// Inline functions.
inline Observer<TrackElement>* TrackElement::getObserver () { return &_observer; }
inline void TrackElement::setFlags ( unsigned int flags ) { _flags|= flags; }
inline void TrackElement::unsetFlags ( unsigned int flags ) { _flags&=~flags; }
inline void TrackElement::setFlags ( uint32_t flags ) { _flags|= flags; }
inline void TrackElement::unsetFlags ( uint32_t flags ) { _flags&=~flags; }
inline bool TrackElement::isCreated () const { return _flags & TElemCreated; }
inline bool TrackElement::isInvalidated () const { return _flags & TElemInvalidated; }
inline bool TrackElement::isBlockage () const { return _flags & TElemBlockage; }

View File

@ -11,7 +11,7 @@
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== |
// | C++ Header : "./katana/TrackElements.h" |
// | C++ Header : "./katana/TrackElements.h" |
// +-----------------------------------------------------------------+
@ -66,7 +66,7 @@ namespace Katana {
// Sub-Class: Locator.
class Locator : public TrackElementHL {
public:
Locator ( TrackElement* segment );
Locator ( TrackElement* segment, Flags flags );
inline Locator ( const Locator& );
virtual TrackElement* getElement () const;
virtual TrackElementHL* getClone () const;
@ -80,7 +80,7 @@ namespace Katana {
public:
// TrackElements_Perpandiculars Methods.
inline TrackElements_Perpandiculars ( TrackElement* segment );
inline TrackElements_Perpandiculars ( TrackElement* segment, Flags flags=Flags::NoFlags );
inline TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& );
virtual TrackElementHC* getClone () const;
virtual TrackElementHL* getLocator () const;
@ -88,6 +88,7 @@ namespace Katana {
protected:
// TrackElements_Perpandiculars Attributes.
Flags _flags;
TrackElement* _segment;
};
@ -99,14 +100,16 @@ namespace Katana {
{ }
inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( TrackElement* segment )
inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( TrackElement* segment, Flags flags )
: TrackElementHC()
, _flags (flags)
, _segment (segment)
{ }
inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& tracksegments )
: TrackElementHC()
, _flags (tracksegments._flags)
, _segment (tracksegments._segment)
{ }

View File

@ -50,7 +50,7 @@ namespace Katana {
inline DbU::Unit getSourceU () const;
inline DbU::Unit getTargetU () const;
inline Track* getTrack () const;
inline unsigned int getWeight ( const Track* ) const;
inline uint32_t getWeight ( const Track* ) const;
inline void setTrack ( Track* );
Record* _getRecord () const;
std::string _getString () const;
@ -67,12 +67,12 @@ namespace Katana {
protected:
// Attributes.
RoutingPad* _routingPad;
DbU::Unit _sourcePosition;
DbU::Unit _targetPosition;
Track* _track;
unsigned int _weight;
unsigned int _refcount;
RoutingPad* _routingPad;
DbU::Unit _sourcePosition;
DbU::Unit _targetPosition;
Track* _track;
uint32_t _weight;
uint32_t _refcount;
protected:
// Constructors & destructors.
@ -88,7 +88,7 @@ namespace Katana {
inline DbU::Unit TrackMarker::getSourceU () const { return _sourcePosition; }
inline DbU::Unit TrackMarker::getTargetU () const { return _targetPosition; }
inline Track* TrackMarker::getTrack () const { return _track; }
inline unsigned int TrackMarker::getWeight ( const Track* track ) const { return _weight; }
inline uint32_t TrackMarker::getWeight ( const Track* track ) const { return _weight; }
inline void TrackMarker::setTrack ( Track* track ) { _track = track; }
inline bool TrackMarker::Compare::operator() ( const TrackMarker* lhs, const TrackMarker* rhs ) const

View File

@ -64,7 +64,7 @@ namespace Katana {
virtual bool isGlobal () const;
virtual bool isBipoint () const;
virtual bool isTerminal () const;
virtual bool isStrongTerminal ( unsigned int flags=0 ) const;
virtual bool isStrongTerminal ( Flags flags=Flags::NoFlags ) const;
virtual bool isStrap () const;
virtual bool isSlackened () const;
virtual bool isDogleg () const;
@ -75,12 +75,12 @@ namespace Katana {
virtual bool hasSymmetric () const;
virtual bool canDogleg ();
virtual bool canDogleg ( Interval );
virtual bool canDogleg ( Anabatic::GCell*, unsigned int flags=0 );
virtual bool canPivotUp ( float reserve, unsigned int flags ) const;
virtual bool canPivotDown ( float reserve, unsigned int flags ) const;
virtual bool canMoveUp ( float reserve, unsigned int flags ) const;
virtual bool canDogleg ( Anabatic::GCell*, Flags flags=0 );
virtual bool canPivotUp ( float reserve, Flags flags ) const;
virtual bool canPivotDown ( float reserve, Flags flags ) const;
virtual bool canMoveUp ( float reserve, Flags flags ) const;
virtual bool canSlacken () const;
virtual float getMaxUnderDensity ( unsigned int flags ) const;
virtual float getMaxUnderDensity ( Flags flags ) const;
virtual unsigned long getId () const;
virtual Flags getDirection () const;
virtual Net* getNet () const;
@ -88,7 +88,7 @@ namespace Katana {
virtual DbU::Unit getPitch () const;
virtual DbU::Unit getPPitch () const;
virtual unsigned long getFreedomDegree () const;
virtual unsigned int getDoglegLevel () const;
virtual uint32_t getDoglegLevel () const;
virtual TrackElement* getNext () const;
virtual TrackElement* getPrevious () const;
virtual TrackElement* getParent () const;
@ -96,7 +96,7 @@ namespace Katana {
virtual Interval getFreeInterval () const;
virtual Interval getSourceConstraints () const;
virtual Interval getTargetConstraints () const;
virtual DataNegociate* getDataNegociate ( unsigned int flags=Flags::DataSelf ) const;
virtual DataNegociate* getDataNegociate ( Flags flags=Flags::DataSelf ) const;
virtual TrackElement* getCanonical ( Interval& );
virtual size_t getGCells ( vector<GCell*>& ) const;
virtual TrackElement* getSourceDogleg ();
@ -108,22 +108,22 @@ namespace Katana {
virtual void setTrack ( Track* );
virtual void setSymmetric ( TrackElement* );
virtual void updateFreedomDegree ();
virtual void setDoglegLevel ( unsigned int );
virtual void setDoglegLevel ( uint32_t );
virtual void swapTrack ( TrackElement* );
virtual void reschedule ( unsigned int level );
virtual void reschedule ( uint32_t level );
virtual void detach ();
virtual void invalidate ();
virtual void revalidate ();
virtual void updatePPitch ();
virtual void setAxis ( DbU::Unit, unsigned int flags );
virtual void setAxis ( DbU::Unit, uint32_t flags );
virtual TrackElement* makeDogleg ();
virtual TrackElement* makeDogleg ( Anabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel );
virtual TrackElement* makeDogleg ( Interval, unsigned int& flags );
virtual TrackElement* makeDogleg ( Interval, Flags& flags );
virtual void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel );
virtual bool moveAside ( unsigned int flags );
virtual bool slacken ( unsigned int flags=Flags::NoFlags );
virtual bool moveUp ( unsigned int flags );
virtual bool moveDown ( unsigned int flags );
virtual bool moveAside ( Flags flags );
virtual bool slacken ( Flags flags=Flags::NoFlags );
virtual bool moveUp ( Flags flags );
virtual bool moveDown ( Flags flags );
#if THIS_IS_DISABLED
virtual void desalignate ();
#endif

View File

@ -48,22 +48,22 @@ namespace Katana {
class TrackSegmentCost {
public:
TrackSegmentCost ( TrackElement* );
~TrackSegmentCost ();
inline unsigned int getTerminals () const;
inline unsigned int getRipupCount () const;
inline DbU::Unit getLeftMinExtend () const;
inline DbU::Unit getRightMinExtend() const;
inline Net* getNet () const;
DbU::Unit getWiringDelta ( DbU::Unit axis ) const;
inline void setRipupCount ( unsigned int );
inline void incRipupCount ();
inline void decRipupCount ();
inline void resetRipupCount ();
void update ( TrackElement* );
Record* _getRecord () const;
string _getString () const;
inline string _getTypeName () const;
TrackSegmentCost ( TrackElement* );
~TrackSegmentCost ();
inline uint32_t getTerminals () const;
inline uint32_t getRipupCount () const;
inline DbU::Unit getLeftMinExtend () const;
inline DbU::Unit getRightMinExtend() const;
inline Net* getNet () const;
DbU::Unit getWiringDelta ( DbU::Unit axis ) const;
inline void setRipupCount ( uint32_t );
inline void incRipupCount ();
inline void decRipupCount ();
inline void resetRipupCount ();
void update ( TrackElement* );
Record* _getRecord () const;
string _getString () const;
inline string _getTypeName () const;
protected:
// Attributes.
@ -77,16 +77,16 @@ namespace Katana {
};
// Inline Functions.
inline unsigned int TrackSegmentCost::getTerminals () const { return _terminals; }
inline unsigned int TrackSegmentCost::getRipupCount () const { return _ripupCount; }
inline DbU::Unit TrackSegmentCost::getLeftMinExtend () const { return _leftMinExtend; }
inline DbU::Unit TrackSegmentCost::getRightMinExtend () const { return _rightMinExtend; }
inline Net* TrackSegmentCost::getNet () const { return _net; }
inline void TrackSegmentCost::setRipupCount ( unsigned int count ) { _ripupCount = count; }
inline void TrackSegmentCost::incRipupCount () { _ripupCount++; }
inline void TrackSegmentCost::decRipupCount () { if (_ripupCount) _ripupCount--; }
inline void TrackSegmentCost::resetRipupCount () { _ripupCount = 0; }
inline string TrackSegmentCost::_getTypeName () const { return "TrackSegmentCost"; }
inline uint32_t TrackSegmentCost::getTerminals () const { return _terminals; }
inline uint32_t TrackSegmentCost::getRipupCount () const { return _ripupCount; }
inline DbU::Unit TrackSegmentCost::getLeftMinExtend () const { return _leftMinExtend; }
inline DbU::Unit TrackSegmentCost::getRightMinExtend () const { return _rightMinExtend; }
inline Net* TrackSegmentCost::getNet () const { return _net; }
inline void TrackSegmentCost::setRipupCount ( uint32_t count ) { _ripupCount = count; }
inline void TrackSegmentCost::incRipupCount () { _ripupCount++; }
inline void TrackSegmentCost::decRipupCount () { if (_ripupCount) _ripupCount--; }
inline void TrackSegmentCost::resetRipupCount () { _ripupCount = 0; }
inline string TrackSegmentCost::_getTypeName () const { return "TrackSegmentCost"; }
} // End of Katana namespace.

View File

@ -30,7 +30,7 @@ namespace Katana {
class VerticalTrack : public Track {
public:
static VerticalTrack* create ( RoutingPlane*, unsigned int index );
static VerticalTrack* create ( RoutingPlane*, uint32_t index );
virtual bool isHorizontal () const;
virtual bool isVertical () const;
virtual Flags getDirection () const;
@ -40,7 +40,7 @@ namespace Katana {
protected:
// Constructors & Destructors.
VerticalTrack ( RoutingPlane*, unsigned int index );
VerticalTrack ( RoutingPlane*, uint32_t index );
virtual ~VerticalTrack ();
virtual void _postCreate ();
virtual void _preDestroy ();