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

View File

@ -157,7 +157,7 @@ namespace Anabatic {
{ return _goName; } { return _goName; }
bool AutoContact::canDestroy ( unsigned int flags ) const bool AutoContact::canDestroy ( Flags flags ) const
{ {
if (not _contact->getSlaveComponents().isEmpty()) { if (not _contact->getSlaveComponents().isEmpty()) {
if (flags & Flags::WarnOnError) { 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(); Box nativeConstraints = getNativeConstraintBox();
Interval constraint; Interval constraint;
@ -262,7 +262,7 @@ namespace Anabatic {
} }
Interval AutoContact::getUConstraints ( unsigned int direction ) const Interval AutoContact::getUConstraints ( Flags direction ) const
{ {
Interval constraint; Interval constraint;
if (direction & Flags::Horizontal) { if (direction & Flags::Horizontal) {
@ -275,7 +275,7 @@ namespace Anabatic {
} }
void AutoContact::invalidate ( unsigned int flags ) void AutoContact::invalidate ( Flags flags )
{ {
if (not isInvalidated()) { if (not isInvalidated()) {
cdebug_log(145,1) << "AutoContact::invalidate() - " << this << endl; 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; Component* anchor = NULL;
Horizontal** horizontals = new Horizontal* [10]; 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)) return (isHTee() and (direction & Flags::Horizontal))
or (isVTee() and (direction & Flags::Vertical )); or (isVTee() and (direction & Flags::Vertical ));
@ -444,7 +444,7 @@ namespace Anabatic {
bool AutoContact::restrictConstraintBox ( DbU::Unit constraintMin bool AutoContact::restrictConstraintBox ( DbU::Unit constraintMin
, DbU::Unit constraintMax , DbU::Unit constraintMax
, unsigned int flags , Flags flags
) )
{ {
cdebug_log(149,0) << "restrictConstraintBox() - " << this << " " << getConstraintBox() << endl; 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 and _horizontal2) {
if (_horizontal1->isInvalidated() xor _horizontal2->isInvalidated()) if (_horizontal1->isInvalidated() xor _horizontal2->isInvalidated())
flags = Flags::NoFlags; 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(); if (_segment) _segment->invalidate();
} }
@ -364,7 +364,7 @@ namespace Anabatic {
_segment->getConstraints( intv ); _segment->getConstraints( intv );
message << "\n Segment constraints: " << intv << endl; message << "\n Segment constraints: " << intv << endl;
unsigned int flags = 0; Flags flags = Flags::NoFlags;
if (_segment->isCreated()) flags |= Flags::CParanoid; if (_segment->isCreated()) flags |= Flags::CParanoid;
showTopologyError( message.str(), flags ); showTopologyError( message.str(), flags );
} else } else
@ -375,7 +375,7 @@ namespace Anabatic {
message << "Terminal vertical segment X" << DbU::getValueString(_segment->getX()) message << "Terminal vertical segment X" << DbU::getValueString(_segment->getX())
<< " axis is outside RoutingPad " << getUConstraints(Flags::Horizontal) << "."; << " axis is outside RoutingPad " << getUConstraints(Flags::Horizontal) << ".";
unsigned int flags = 0; Flags flags = Flags::NoFlags;
if (_segment->isCreated()) flags |= Flags::CParanoid; if (_segment->isCreated()) flags |= Flags::CParanoid;
showTopologyError( message.str(), flags ); showTopologyError( message.str(), flags );
} else } 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 (_horizontal1) _horizontal1->invalidate();
if (_vertical1 ) _vertical1 ->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 and _vertical2) {
if (_vertical1->isInvalidated() xor _vertical2->isInvalidated()) if (_vertical1->isInvalidated() xor _vertical2->isInvalidated())
flags = Flags::NoFlags; 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) { if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoSource()->getNativeConstraintBox() ); 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) { if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoTarget()->getNativeConstraintBox() ); 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; 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; cdebug_log(145,0) << "updateOrient() " << this << " (before S/T swap)" << endl;
_horizontal->invert(); _horizontal->invert();
unsigned int spinFlags = _flags & SegDepthSpin; Flags spinFlags = _flags & SegDepthSpin;
unsetFlags( SegDepthSpin ); unsetFlags( SegDepthSpin );
if (spinFlags & SegSourceTop ) setFlags( SegTargetTop ); if (spinFlags & SegSourceTop ) setFlags( SegTargetTop );
if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom ); if (spinFlags & SegSourceBottom) setFlags( SegTargetBottom );
if (spinFlags & SegTargetTop ) setFlags( SegSourceTop ); if (spinFlags & SegTargetTop ) setFlags( SegSourceTop );
if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom ); if (spinFlags & SegTargetBottom) setFlags( SegSourceBottom );
unsigned int invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget); Flags invalidatedFlags = _flags & (SegInvalidatedSource|SegInvalidatedTarget);
unsetFlags( SegInvalidatedSource|SegInvalidatedTarget ); unsetFlags( SegInvalidatedSource|SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedSource) setFlags( SegInvalidatedTarget ); if (invalidatedFlags & SegInvalidatedSource) setFlags( SegInvalidatedTarget );
if (invalidatedFlags & SegInvalidatedTarget) setFlags( SegInvalidatedSource ); if (invalidatedFlags & SegInvalidatedTarget) setFlags( SegInvalidatedSource );
unsigned int terminalFlags = _flags & SegStrongTerminal; Flags terminalFlags = _flags & SegStrongTerminal;
unsetFlags( SegStrongTerminal ); unsetFlags( SegStrongTerminal );
if (terminalFlags & SegSourceTerminal) setFlags( SegTargetTerminal ); if (terminalFlags & SegSourceTerminal) setFlags( SegTargetTerminal );
if (terminalFlags & SegTargetTerminal) setFlags( SegSourceTerminal ); 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 ); DebugSession::open( getNet(), 140, 150 );
cdebug_log(149,0) << "AutoHorizontal::_makeDogleg(GCell*) in " << doglegGCell << endl; 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 (Session::doDestroyTool()) return;
if (flags & Flags::Source) setFlags( SegInvalidatedSource ); if (flags & Flags::Source) setFlags( SegInvalidatedSource );
@ -463,7 +463,7 @@ namespace Anabatic {
updateOrient (); updateOrient ();
updatePositions(); updatePositions();
unsigned int oldSpinFlags = _flags & SegDepthSpin; uint32_t oldSpinFlags = _flags & SegDepthSpin;
if (_flags & (SegInvalidatedSource|SegCreated)) { if (_flags & (SegInvalidatedSource|SegCreated)) {
AutoContact* source = getAutoSource(); 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 & SegStrongTerminal) return true;
if ((flags & Flags::Propagate) and not isNotAligned()) { if ((flags & Flags::Propagate) and not isNotAligned()) {
forEach( AutoSegment*, isegment, const_cast<AutoSegment*>(this)->getAligneds() ) { for ( AutoSegment* segment : const_cast<AutoSegment*>(this)->getAligneds() ) {
if (isegment->_flags & SegStrongTerminal) return true; if (segment->_flags & SegStrongTerminal) return true;
} }
} }
return false; return false;
@ -606,36 +606,36 @@ namespace Anabatic {
} }
AutoSegments AutoSegment::getOnSourceContact ( unsigned int direction ) AutoSegments AutoSegment::getOnSourceContact ( Flags direction )
{ {
return AutoSegments_OnContact return AutoSegments_OnContact
( this, getSource() ).getSubSet( AutoSegments_InDirection(direction) ); ( this, getSource() ).getSubSet( AutoSegments_InDirection(direction) );
} }
AutoSegments AutoSegment::getOnTargetContact ( unsigned int direction ) AutoSegments AutoSegment::getOnTargetContact ( Flags direction )
{ {
return AutoSegments_OnContact return AutoSegments_OnContact
( this, getTarget() ).getSubSet( AutoSegments_InDirection(direction) ); ( this, getTarget() ).getSubSet( AutoSegments_InDirection(direction) );
} }
AutoSegments AutoSegment::getCachedOnSourceContact ( unsigned int direction ) AutoSegments AutoSegment::getCachedOnSourceContact ( Flags direction )
{ return AutoSegments_CachedOnContact( getAutoSource(), direction ); } { return AutoSegments_CachedOnContact( getAutoSource(), direction ); }
AutoSegments AutoSegment::getCachedOnTargetContact ( unsigned int direction ) AutoSegments AutoSegment::getCachedOnTargetContact ( Flags direction )
{ return AutoSegments_CachedOnContact( getAutoTarget(), 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; cdebug_log(145,0) << "AutoSegment::getAligneds() - flags:" << flags << endl;
return AutoSegments_Aligneds( this, flags ); 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; cdebug_log(145,0) << "AutoSegment::getConnecteds() - flags:" << flags << endl;
return AutoSegments_Connecteds( this, flags ); 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 ); setFlags( flags );
if (not isNotAligned()) { 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; 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; 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; if (not isCanonical()) return;
@ -886,7 +886,7 @@ namespace Anabatic {
if (not source->isTerminal()) if (not source->isTerminal())
source->setFlags( CntWeakTerminal ); source->setFlags( CntWeakTerminal );
} else { } else {
unsigned int terminalFlag = 0; uint32_t terminalFlag = 0;
switch ( _getFlags() & SegWeakTerminal ) { switch ( _getFlags() & SegWeakTerminal ) {
case 0: break; case 0: break;
case SegSourceTerminal|SegTargetTerminal: case SegSourceTerminal|SegTargetTerminal:
@ -975,6 +975,8 @@ namespace Anabatic {
if (perpandMax > maxGCell) attractors.addAttractor( maxGCell ); if (perpandMax > maxGCell) attractors.addAttractor( maxGCell );
} else if (autoSegment->isLocal()) { } else if (autoSegment->isLocal()) {
if (autoSegment->isStrongTerminal()) { if (autoSegment->isStrongTerminal()) {
cdebug_log(145,0) << "Used as strong terminal." << endl;
DbU::Unit terminalMin; DbU::Unit terminalMin;
DbU::Unit terminalMax; DbU::Unit terminalMax;
@ -988,7 +990,7 @@ namespace Anabatic {
attractors.addAttractor( terminalMax ); attractors.addAttractor( terminalMax );
} }
} else if (autoSegment->isLongLocal()) { } 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 perpandMin = autoSegment->getSourceU();
DbU::Unit perpandMax = autoSegment->getTargetU(); DbU::Unit perpandMax = autoSegment->getTargetU();
@ -1009,6 +1011,8 @@ namespace Anabatic {
optimalMin = attractors.getLowerMedian(); optimalMin = attractors.getLowerMedian();
optimalMax = attractors.getUpperMedian(); optimalMax = attractors.getUpperMedian();
} else { } else {
cdebug_log(145,0) << "No attractors, reverting to GCell bounding box" << endl;
optimalMin = 0; optimalMin = 0;
optimalMax = (isHorizontal()) ? _gcell->getBoundingBox().getYMax() optimalMax = (isHorizontal()) ? _gcell->getBoundingBox().getYMax()
: _gcell->getBoundingBox().getXMax(); : _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; cdebug_log(149,0) << "canonize() - " << this << endl;
@ -1131,7 +1135,7 @@ namespace Anabatic {
DbU::Unit spanMin = DbU::Min; DbU::Unit spanMin = DbU::Min;
DbU::Unit spanMax = DbU::Max; DbU::Unit spanMax = DbU::Max;
Interval constraints; Interval constraints;
unsigned int direction = getDirection(); Flags direction = getDirection();
for ( icontact=contacts.begin() ; icontact != contacts.end() ; icontact++ ) { for ( icontact=contacts.begin() ; icontact != contacts.end() ; icontact++ ) {
constraints = icontact->first->getUConstraints( direction ); 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; cdebug_log(149,1) << "changeDepth() " << depth << " - " << this << endl;
Session::invalidate( getNet() ); 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; 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; 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; 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; 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 cdebug_log(149,0) << "AutoSegment::canPivotUp() - " << flags
<< " (reserve:" << reserve << ")" << endl; << " (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()" cdebug_log(149,0) << "AutoSegment::canPivotDown()"
<< " (reserve:" << reserve << ")" << endl; << " (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 cdebug_log(159,0) << "AutoSegment::canMoveUp() " << flags
<< " (reserve:" << reserve << ") " << this << endl; << " (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; //if ( not canMoveUp(0.0,flags) ) return false;
changeDepth( Session::getRoutingGauge()->getLayerDepth(getLayer()) + 2, flags&Flags::Propagate ); 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; //if ( not canPivotDown(0.0,flags) ) return false;
changeDepth( Session::getRoutingGauge()->getLayerDepth(getLayer()) - 2, flags&Flags::Propagate ); changeDepth( Session::getRoutingGauge()->getLayerDepth(getLayer()) - 2, flags&Flags::Propagate );
@ -1648,7 +1652,7 @@ namespace Anabatic {
#if THIS_IS_DISABLED #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; cdebug_log(149,0) << "AutoSegment::shearUp() " << this << endl;
@ -1719,7 +1723,7 @@ namespace Anabatic {
#endif #endif
unsigned int AutoSegment::canDogleg ( Interval interval ) Flags AutoSegment::canDogleg ( Interval interval )
{ {
cdebug_log(149,0) << "AutoSegment::canDogleg(Interval) " << interval << endl; 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; cdebug_log(149,1) << "AutoSegment::makeDogleg(Interval) - " << interval << endl;
bool leftDogleg = true; bool leftDogleg = true;
unsigned int rflags = 0; Flags rflags = Flags::NoFlags;
size_t leftDoglegCount = 0; size_t leftDoglegCount = 0;
size_t rightDoglegCount = 0; size_t rightDoglegCount = 0;
AutoSegment* leftCandidate = NULL; AutoSegment* leftCandidate = NULL;
@ -1875,7 +1879,7 @@ namespace Anabatic {
cdebug_log(149,0) << "Break @" << DbU::getValueString(axis) << " " << leftCandidate << endl; cdebug_log(149,0) << "Break @" << DbU::getValueString(axis) << " " << leftCandidate << endl;
unsigned int direction = getDirection(); Flags direction = getDirection();
GCell* gcell = leftCandidate->getAutoSource()->getGCell(); GCell* gcell = leftCandidate->getAutoSource()->getGCell();
GCell* end = leftCandidate->getAutoTarget()->getGCell(); GCell* end = leftCandidate->getAutoTarget()->getGCell();
while ( gcell != end ) { while ( gcell != end ) {
@ -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| AutoSegment::makeDogleg(GCell*) " << doglegGCell << endl;
cdebug_log(9000,0) << "Deter| in " << this << endl; cdebug_log(9000,0) << "Deter| in " << this << endl;
cdebug_tabw(149,1); cdebug_tabw(149,1);
unsigned int rflags = 0; Flags rflags = Flags::NoFlags;
if ( doglegGCell->isIoPad() if ( doglegGCell->isIoPad()
and (Session::getAnabatic()->getState() != EngineGlobalLoaded) ) { and (Session::getAnabatic()->getState() != EngineGlobalLoaded) ) {
@ -2132,7 +2136,7 @@ namespace Anabatic {
AutoSegment* AutoSegment::create ( AutoContact* source AutoSegment* AutoSegment::create ( AutoContact* source
, AutoContact* target , AutoContact* target
, unsigned int dir , Flags dir
, size_t depth , size_t depth
) )
{ {
@ -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; cdebug_log(145,1) << "isTopologicalBound() - " << seed << endl;
@ -2288,13 +2313,13 @@ namespace Anabatic {
#if THIS_IS_DISABLED #if THIS_IS_DISABLED
unsigned int AutoSegment::getPerpandicularState ( AutoContact* contact Flags AutoSegment::getPerpandicularState ( AutoContact* contact
, AutoSegment* source , AutoSegment* source
, AutoSegment* current , AutoSegment* current
, bool isHorizontalMaster , bool isHorizontalMaster
, const Layer* masterLayer ) , const Layer* masterLayer )
{ {
unsigned int state = 0; Flags state = Flags::NoFlags;
bool sourcePerpandicular = arePerpandiculars ( isHorizontalMaster, source ); bool sourcePerpandicular = arePerpandiculars ( isHorizontalMaster, source );
bool currentPerpandicular = arePerpandiculars ( isHorizontalMaster, current ); bool currentPerpandicular = arePerpandiculars ( isHorizontalMaster, current );

View File

@ -196,7 +196,7 @@ namespace Anabatic {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "AutoSegments_Connecteds". // Class : "AutoSegments_Connecteds".
AutoSegments_Connecteds::Locator::Locator ( AutoSegment* segment, unsigned int flags ) AutoSegments_Connecteds::Locator::Locator ( AutoSegment* segment, Flags flags )
: AutoSegmentHL() : AutoSegmentHL()
, _stack () , _stack ()
{ {
@ -292,7 +292,7 @@ namespace Anabatic {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "AutoSegments_Aligneds". // Class : "AutoSegments_Aligneds".
AutoSegments_Aligneds::Locator::Locator ( AutoSegment* segment, unsigned int flags ) AutoSegments_Aligneds::Locator::Locator ( AutoSegment* segment, Flags flags )
: AutoSegmentHL() : AutoSegmentHL()
, _flags (flags) , _flags (flags)
, _master(segment) , _master(segment)
@ -389,9 +389,10 @@ namespace Anabatic {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "AutoSegments_Perpandiculars". // Class : "AutoSegments_Perpandiculars".
AutoSegments_Perpandiculars::Locator::Locator ( AutoSegment* master ) AutoSegments_Perpandiculars::Locator::Locator ( AutoSegment* master, Flags flags )
: AutoSegmentHL() : AutoSegmentHL()
, _flags (Flags::WithPerpands) //, _flags (Flags::WithPerpands|Flags::WithDoglegs)
, _flags (Flags::WithPerpands|flags)
, _master (master) , _master (master)
, _stack () , _stack ()
, _perpandiculars() , _perpandiculars()
@ -422,7 +423,7 @@ namespace Anabatic {
void AutoSegments_Perpandiculars::Locator::progress () 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()) _perpandiculars.pop_back();
if (not _perpandiculars.empty()) return; if (not _perpandiculars.empty()) return;
@ -432,31 +433,61 @@ namespace Anabatic {
AutoSegment* sourceSegment = _stack.getAutoSegment(); AutoSegment* sourceSegment = _stack.getAutoSegment();
_stack.pop(); _stack.pop();
cdebug_log(145,0) << "Iterate over: " << sourceContact << endl;
LocatorHelper helper (sourceContact, _flags); LocatorHelper helper (sourceContact, _flags);
for ( ; helper.isValid() ; helper.progress() ) { for ( ; helper.isValid() ; helper.progress() ) {
AutoSegment* currentSegment = helper.getSegment(); AutoSegment* currentSegment = helper.getSegment();
if (currentSegment == sourceSegment) continue; if (currentSegment == sourceSegment) continue;
cdebug_log(145,0) << "| " << currentSegment << endl;
if (AutoSegment::areAligneds(currentSegment,_master)) { if (AutoSegment::areAligneds(currentSegment,_master)) {
AutoContact* targetContact = currentSegment->getOppositeAnchor( sourceContact ); AutoContact* targetContact = currentSegment->getOppositeAnchor( sourceContact );
if (targetContact) { if (targetContact) {
if ( (_master->isHorizontal() and sourceContact->isHTee()) if (_master->getLayer() != currentSegment->getLayer()) {
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; continue;
} }
cdebug_log(145,0) << "Stacking target. " << endl; cdebug_log(145,0) << "Stacking target. " << endl;
_stack.push( targetContact, currentSegment ); _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 { } 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 ); _perpandiculars.push_back( currentSegment );
} }
} }
@ -465,6 +496,8 @@ namespace Anabatic {
if (_stack.getAutoSegment() == _master) continue; if (_stack.getAutoSegment() == _master) continue;
if (not _perpandiculars.empty()) break; if (not _perpandiculars.empty()) break;
} }
cdebug_tabw(145,-1);
} }
@ -481,7 +514,7 @@ namespace Anabatic {
AutoSegmentHL* AutoSegments_Perpandiculars::getLocator () const AutoSegmentHL* AutoSegments_Perpandiculars::getLocator () const
{ return new Locator(_segment); } { return new Locator(_master,_flags); }
string AutoSegments_Perpandiculars::Locator::_getString () const string AutoSegments_Perpandiculars::Locator::_getString () const
@ -494,7 +527,7 @@ namespace Anabatic {
string AutoSegments_Perpandiculars::_getString () const string AutoSegments_Perpandiculars::_getString () const
{ {
string s = "<" + _TName("AutoSegments_Perpandiculars") + " " string s = "<" + _TName("AutoSegments_Perpandiculars") + " "
+ getString(_segment) + getString(_master)
+ ">"; + ">";
return s; return s;
} }
@ -503,7 +536,7 @@ namespace Anabatic {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "AutoSegments_AnchorOnGCell". // Class : "AutoSegments_AnchorOnGCell".
AutoSegments_AnchorOnGCell::Locator::Locator ( GCell* fcell, unsigned int flags ) AutoSegments_AnchorOnGCell::Locator::Locator ( GCell* fcell, Flags flags )
: AutoSegmentHL() : AutoSegmentHL()
, _flags (flags) , _flags (flags)
, _itContact (fcell->getContacts().begin()) , _itContact (fcell->getContacts().begin())
@ -600,7 +633,7 @@ namespace Anabatic {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Class : "Anabatic::AutoSegments_CachedOnContact". // Class : "Anabatic::AutoSegments_CachedOnContact".
AutoSegments_CachedOnContact::Locator::Locator ( AutoContact* sourceContact, unsigned int direction ) AutoSegments_CachedOnContact::Locator::Locator ( AutoContact* sourceContact, Flags direction )
: AutoSegmentHL() : AutoSegmentHL()
, _helper(new LocatorHelper(sourceContact,direction)) , _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) { if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoSource()->getNativeConstraintBox() ); 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) { if (flags & Flags::NativeConstraints) {
Box nativeBox ( getAutoTarget()->getNativeConstraintBox() ); 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; 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; cdebug_log(149,0) << "AutoVertical::_makeDogleg(GCell*)" << endl;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -123,8 +123,8 @@ namespace Anabatic {
float _density; float _density;
}; };
public: public:
static unsigned int getDisplayMode (); static uint32_t getDisplayMode ();
static void setDisplayMode ( unsigned int ); static void setDisplayMode ( uint32_t );
static Box getBorder ( const GCell*, const GCell* ); static Box getBorder ( const GCell*, const GCell* );
public: public:
static GCell* create ( AnabaticEngine* ); static GCell* create ( AnabaticEngine* );
@ -193,14 +193,13 @@ namespace Anabatic {
// Detailed routing functions. // Detailed routing functions.
bool hasFreeTrack ( size_t depth, float reserve ) const; bool hasFreeTrack ( size_t depth, float reserve ) const;
inline size_t getDepth () const; inline size_t getDepth () const;
Interval getSide ( unsigned int ) const;
float getHCapacity () const; float getHCapacity () const;
float getVCapacity () const; float getVCapacity () const;
float getDensity ( unsigned int flags=Flags::NoFlags ) const; float getDensity ( Flags flags=Flags::NoFlags ) const;
float getAverageHVDensity () const; float getAverageHVDensity () const;
float getMaxHVDensity () const; float getMaxHVDensity () const;
inline float getCDensity ( unsigned int flags=Flags::NoFlags ) const; inline float getCDensity ( Flags flags=Flags::NoFlags ) const;
inline float getWDensity ( size_t depth, unsigned int flags=Flags::NoFlags ) const; inline float getWDensity ( size_t depth, Flags flags=Flags::NoFlags ) const;
inline DbU::Unit getBlockage ( size_t depth ) const; inline DbU::Unit getBlockage ( size_t depth ) const;
inline float getFragmentation ( size_t depth ) const; inline float getFragmentation ( size_t depth ) const;
inline float getFeedthroughs ( size_t depth ) const; inline float getFeedthroughs ( size_t depth ) const;
@ -212,8 +211,8 @@ namespace Anabatic {
AutoSegments getVStartSegments (); AutoSegments getVStartSegments ();
AutoSegments getHStopSegments (); AutoSegments getHStopSegments ();
AutoSegments getVStopSegments (); AutoSegments getVStopSegments ();
inline AutoSegments getStartSegments ( unsigned int direction ); inline AutoSegments getStartSegments ( Flags direction );
inline AutoSegments getStopSegments ( unsigned int direction ); inline AutoSegments getStopSegments ( Flags direction );
size_t getRoutingPads ( set<RoutingPad*>& ); size_t getRoutingPads ( set<RoutingPad*>& );
inline const Key& getKey () const; inline const Key& getKey () const;
size_t checkDensity () const; size_t checkDensity () const;
@ -234,7 +233,7 @@ namespace Anabatic {
void rpDesaturate ( set<Net*>& ); void rpDesaturate ( set<Net*>& );
bool stepDesaturate ( size_t depth bool stepDesaturate ( size_t depth
, set<Net*>&, AutoSegment*& moved , set<Net*>&, AutoSegment*& moved
, unsigned int flags=Flags::NoFlags ); , Flags flags=Flags::NoFlags );
bool stepNetDesaturate ( size_t depth bool stepNetDesaturate ( size_t depth
, set<Net*>& globalNets , set<Net*>& globalNets
, Set& invalidateds ); , Set& invalidateds );
@ -274,7 +273,7 @@ namespace Anabatic {
GCell& operator= ( const GCell& ); GCell& operator= ( const GCell& );
private: private:
static Name _extensionName; static Name _extensionName;
static unsigned int _displayMode; static uint32_t _displayMode;
Observable _observable; Observable _observable;
AnabaticEngine* _anabatic; AnabaticEngine* _anabatic;
Flags _flags; Flags _flags;
@ -381,16 +380,16 @@ namespace Anabatic {
inline GCell::Observable::Observable () : StaticObservable<1>() { } 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(); } { 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(); } { 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; } { 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]; } { if (isInvalidated() and not(flags & Flags::NoUpdate)) const_cast<GCell*>(this)->updateDensity(); return _densities[depth]; }
inline float GCell::getFragmentation ( size_t depth ) const 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 size_t getLayerDepth ( const Layer* layer );
static inline const Layer* getRoutingLayer ( size_t ); static inline const Layer* getRoutingLayer ( size_t );
static inline const Layer* getContactLayer ( size_t ); static inline const Layer* getContactLayer ( size_t );
static unsigned int getDirection ( size_t depth ); static Flags getDirection ( size_t depth );
static inline DbU::Unit getPitch ( size_t depth, unsigned int flags ); static inline DbU::Unit getPitch ( size_t depth, Flags flags );
static inline DbU::Unit getOffset ( size_t depth ); static inline DbU::Unit getOffset ( size_t depth );
static inline DbU::Unit getWireWidth ( size_t depth ); static inline DbU::Unit getWireWidth ( size_t depth );
static inline DbU::Unit getViaWidth ( size_t depth ); static inline DbU::Unit getViaWidth ( size_t depth );
static inline unsigned int getDirection ( const Layer* ); static inline Flags getDirection ( const Layer* );
static inline DbU::Unit getPitch ( const Layer*, unsigned int flags ); static inline DbU::Unit getPitch ( const Layer*, Flags flags );
static inline DbU::Unit getOffset ( const Layer* ); static inline DbU::Unit getOffset ( const Layer* );
static inline DbU::Unit getWireWidth ( const Layer* ); static inline DbU::Unit getWireWidth ( const Layer* );
static inline DbU::Unit getViaWidth ( const Layer* ); static inline DbU::Unit getViaWidth ( const Layer* );
@ -114,11 +114,11 @@ namespace Anabatic {
static inline const vector<AutoSegment*>& getDoglegs (); static inline const vector<AutoSegment*>& getDoglegs ();
static inline const set<Net*>& getNetsModificateds (); static inline const set<Net*>& getNetsModificateds ();
static void close (); static void close ();
static void setAnabaticFlags ( unsigned int ); static void setAnabaticFlags ( Flags );
static inline void dogleg ( AutoSegment* ); static inline void dogleg ( AutoSegment* );
static inline void doglegReset (); static inline void doglegReset ();
static inline void revalidateTopology (); static inline void revalidateTopology ();
static inline void setInvalidateMask ( unsigned int ); static inline void setInvalidateMask ( Flags );
static inline void invalidate ( Net* ); static inline void invalidate ( Net* );
static inline void invalidate ( AutoContact* ); static inline void invalidate ( AutoContact* );
static inline void invalidate ( AutoSegment* ); static inline void invalidate ( AutoSegment* );
@ -145,7 +145,7 @@ namespace Anabatic {
void _canonize (); void _canonize ();
void _revalidateTopology (); void _revalidateTopology ();
virtual size_t _revalidate (); 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 ); Point _getNearestGridPoint ( Point, Box constraints );
Record* _getRecord () const; Record* _getRecord () const;
string _getString () const; string _getString () const;
@ -212,16 +212,16 @@ namespace Anabatic {
inline size_t Session::getLayerDepth ( const Layer* layer ) { return getRoutingGauge()->getLayerDepth(layer); } 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::getRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth); }
inline const Layer* Session::getContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(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::getOffset ( size_t depth ) { return getRoutingGauge()->getLayerOffset(depth); }
inline DbU::Unit Session::getWireWidth ( size_t depth ) { return getRoutingGauge()->getLayerWireWidth(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::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::getOffset ( const Layer* layer ) { return getOffset ( getLayerDepth(layer) ); }
inline DbU::Unit Session::getWireWidth ( const Layer* layer ) { return getWireWidth( 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::getViaWidth ( const Layer* layer ) { return getViaWidth ( getViaDepth(layer) ); }
inline DbU::Unit Session::getExtensionCap ( const Layer* layer ) { return getConfiguration()->getExtensionCap(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 Point Session::getNearestGridPoint ( Point p, Box b ) { return get("getNearestGridPoint()")->_getNearestGridPoint(p,b); }
inline void Session::_dogleg ( AutoSegment* segment ) { _doglegs.push_back(segment); } inline void Session::_dogleg ( AutoSegment* segment ) { _doglegs.push_back(segment); }

View File

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

View File

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

View File

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

View File

@ -86,7 +86,7 @@ namespace Katana {
QRect pixelBb = widget->dbuToScreenRect(bb); QRect pixelBb = widget->dbuToScreenRect(bb);
if (GCell::getDisplayMode() == GCell::Density) { 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; if (density > 255) density = 255;
painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) ); painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) );
@ -139,9 +139,9 @@ namespace Katana {
if (edge) { if (edge) {
Box bb = edge->getBoundingBox(); Box bb = edge->getBoundingBox();
unsigned int occupancy = 255; uint32_t occupancy = 255;
if (edge->getRealOccupancy() < edge->getCapacity()) 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(); QPainter& painter = widget->getPainter();
if (edge->getRealOccupancy() > edge->getCapacity()) { 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. // Currently, only one framework is avalaible: Alliance.
@ -322,7 +322,7 @@ namespace Katana {
void GraphicKatanaEngine::postEvent () void GraphicKatanaEngine::postEvent ()
{ {
static unsigned int count = 0; static uint32_t count = 0;
if (not (count++ % 500)) { if (not (count++ % 500)) {
QApplication::processEvents(); QApplication::processEvents();

View File

@ -25,7 +25,7 @@ namespace Katana {
// Class : "HorizontalTrack". // Class : "HorizontalTrack".
HorizontalTrack::HorizontalTrack ( RoutingPlane* routingPlane, unsigned int index ) HorizontalTrack::HorizontalTrack ( RoutingPlane* routingPlane, uint32_t index )
: Track(routingPlane,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 ); HorizontalTrack* track = new HorizontalTrack ( routingPlane, index );

View File

@ -295,7 +295,7 @@ namespace Katana {
{ return _configuration; } { return _configuration; }
unsigned int KatanaEngine::getRipupLimit ( const TrackElement* segment ) const uint32_t KatanaEngine::getRipupLimit ( const TrackElement* segment ) const
{ {
if (segment->isBlockage()) return 0; 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 ); RoutingPlane* plane = getRoutingPlaneByLayer( layer );
if (not plane) return NULL; 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; if (_negociateWindow) return;
@ -449,7 +449,7 @@ namespace Katana {
printMeasures( "algo" ); printMeasures( "algo" );
openSession(); openSession();
unsigned int overlaps = 0; uint32_t overlaps = 0;
// size_t hTracksReservedLocal = getHTracksReservedLocal(); // size_t hTracksReservedLocal = getHTracksReservedLocal();
// size_t vTracksReservedLocal = getVTracksReservedLocal(); // 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; cmess1 << " o Checking Katana Database coherency." << endl;

View File

@ -106,13 +106,13 @@ namespace Katana {
{ DebugSession::close(); } { DebugSession::close(); }
bool Manipulator::canRipup ( unsigned int flags ) const bool Manipulator::canRipup ( uint32_t flags ) const
{ {
if (_data) { if (_data) {
if (not _event or _event->isUnimplemented()) return false; if (not _event or _event->isUnimplemented()) return false;
unsigned int limit = Session::getKatanaEngine()->getRipupLimit(_segment); uint32_t limit = Session::getKatanaEngine()->getRipupLimit(_segment);
unsigned int count = _data->getRipupCount() + ((flags & NotOnLastRipup) ? 1 : 0); uint32_t count = _data->getRipupCount() + ((flags & NotOnLastRipup) ? 1 : 0);
return (count < limit); 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; cdebug_log(159,0) << "Manipulator::ripup() " << endl;
@ -155,7 +155,7 @@ namespace Katana {
} }
bool Manipulator::ripupPerpandiculars ( unsigned int flags ) bool Manipulator::ripupPerpandiculars ( uint32_t flags )
{ {
cdebug_log(159,0) << "Manipulator::ripupPerpandiculars() - " << flags << endl; cdebug_log(159,0) << "Manipulator::ripupPerpandiculars() - " << flags << endl;
@ -164,8 +164,8 @@ namespace Katana {
Interval constraints ( _event->getConstraints() ); Interval constraints ( _event->getConstraints() );
Interval perpandicularConstraints ( constraints ); Interval perpandicularConstraints ( constraints );
size_t placedPerpandiculars = 0; size_t placedPerpandiculars = 0;
unsigned int parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4; uint32_t parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4;
unsigned int perpandicularActionFlags = SegmentAction::SelfRipupPerpand; uint32_t perpandicularActionFlags = SegmentAction::SelfRipupPerpand;
if (flags & Manipulator::PerpandicularsFirst) { if (flags & Manipulator::PerpandicularsFirst) {
parallelActionFlags &= ~SegmentAction::EventLevel4; 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()) ); interval.inflate( - Session::getExtensionCap(getLayer()) );
cdebug_log(159,0) << "Manipulator::relax() of: " << _segment << " " << interval << endl; cdebug_log(159,0) << "Manipulator::relax() of: " << _segment << " " << interval << endl;
@ -301,7 +301,7 @@ namespace Katana {
return false; return false;
} }
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer()); uint32_t depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer());
Interval uside; Interval uside;
size_t dogLegCount = 0; size_t dogLegCount = 0;
size_t iminconflict = gcells.size(); size_t iminconflict = gcells.size();
@ -783,7 +783,7 @@ namespace Katana {
, SegmentAction::SelfInsert|SegmentAction::MoveToAxis|SegmentAction::EventLevel4 , SegmentAction::SelfInsert|SegmentAction::MoveToAxis|SegmentAction::EventLevel4
, _fsm.getCost(itrack).getTrack()->getAxis() ); , _fsm.getCost(itrack).getTrack()->getAxis() );
unsigned int flags = 0; uint32_t flags = 0;
if ( rightIntrication ) flags |= RightAxisHint; if ( rightIntrication ) flags |= RightAxisHint;
if ( leftIntrication ) flags |= LeftAxisHint; if ( leftIntrication ) flags |= LeftAxisHint;
if ( flags ) 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 #if THIS_IS_DISABLED
Track* track = _fsm.getTrack(i); 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; 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; 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 & AllowLocalMoveUp ) ? Flags::AutoSegment::AllowLocal : 0;
kflags |= (flags & AllowTerminalMoveUp) ? Flags::AllowTerminal : 0; kflags |= (flags & AllowTerminalMoveUp) ? Flags::AllowTerminal : 0;
kflags |= (flags & IgnoreContacts ) ? Flags::IgnoreContacts : 0; kflags |= (flags & IgnoreContacts ) ? Flags::IgnoreContacts : 0;
@ -1156,7 +1156,7 @@ namespace Katana {
if ( _segment->isFixed () ) return false; if ( _segment->isFixed () ) return false;
if (not _segment->canDogleg(overlap)) return false; if (not _segment->canDogleg(overlap)) return false;
unsigned int flags = 0; Flags flags = Flags::NoFlags;
TrackElement* dogleg = _segment->makeDogleg(overlap,flags); TrackElement* dogleg = _segment->makeDogleg(overlap,flags);
if (dogleg) { if (dogleg) {
cdebug_log(159,0) << "Manipulator::makeDogleg(Interval) - Push dogleg to the " 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(); DataNegociate* data = segment->getDataNegociate();
if (not data or not data->hasRoutingEvent()) 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; cdebug_log(159,1) << "NegociateWindow::createTrackSegment() - " << autoSegment << endl;
@ -370,8 +370,8 @@ namespace Katana {
void NegociateWindow::_pack ( size_t& count, bool last ) void NegociateWindow::_pack ( size_t& count, bool last )
{ {
unsigned long limit = _katana->getEventsLimit(); uint64_t limit = _katana->getEventsLimit();
unsigned int pushStage = RoutingEvent::getStage(); uint32_t pushStage = RoutingEvent::getStage();
RoutingEvent::setStage( RoutingEvent::Pack ); RoutingEvent::setStage( RoutingEvent::Pack );
RoutingEventQueue packQueue; 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; cdebug_log(159,1) << "NegociateWindow::run()" << endl;
@ -570,7 +570,7 @@ namespace Katana {
_katana->setMinimumWL( computeWirelength() ); _katana->setMinimumWL( computeWirelength() );
#if defined(CHECK_DATABASE) #if defined(CHECK_DATABASE)
unsigned int overlaps = 0; uint32_t overlaps = 0;
Session::getKatanaEngine()->_check( overlaps, "after _createRouting(GCell*)" ); Session::getKatanaEngine()->_check( overlaps, "after _createRouting(GCell*)" );
#endif #endif

View File

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

View File

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

View File

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

View File

@ -141,22 +141,22 @@ namespace Katana {
// Class : "RoutingEvent". // Class : "RoutingEvent".
unsigned int RoutingEvent::_idCounter = 0; uint32_t RoutingEvent::_idCounter = 0;
unsigned int RoutingEvent::_stage = RoutingEvent::Negociate; uint32_t RoutingEvent::_stage = RoutingEvent::Negociate;
size_t RoutingEvent::_allocateds = 0; uint32_t RoutingEvent::_allocateds = 0;
size_t RoutingEvent::_processeds = 0; uint32_t RoutingEvent::_processeds = 0;
size_t RoutingEvent::_cloneds = 0; uint32_t RoutingEvent::_cloneds = 0;
unsigned int RoutingEvent::getStage () { return _stage; } uint32_t RoutingEvent::getStage () { return _stage; }
size_t RoutingEvent::getAllocateds () { return _allocateds; } uint32_t RoutingEvent::getAllocateds () { return _allocateds; }
size_t RoutingEvent::getProcesseds () { return _processeds; } uint32_t RoutingEvent::getProcesseds () { return _processeds; }
size_t RoutingEvent::getCloneds () { return _cloneds; } uint32_t RoutingEvent::getCloneds () { return _cloneds; }
void RoutingEvent::setStage ( unsigned int stage ) { _stage = stage; } void RoutingEvent::setStage ( uint32_t stage ) { _stage = stage; }
void RoutingEvent::resetProcesseds () { _processeds = 0; } void RoutingEvent::resetProcesseds () { _processeds = 0; }
RoutingEvent::RoutingEvent ( TrackElement* segment, unsigned int mode ) RoutingEvent::RoutingEvent ( TrackElement* segment, uint32_t mode )
: _cloned (false) : _cloned (false)
, _processed (false) , _processed (false)
, _disabled (false) , _disabled (false)
@ -180,9 +180,9 @@ namespace Katana {
, _priority (0.0) , _priority (0.0)
, _key (this) , _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)." 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(); 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)) { // if (not dynamic_cast<TrackSegment*>(segment)) {
// cerr << Error( "RoutingEvent::create() Can only create event from TrackSegment:\n" // cerr << Error( "RoutingEvent::create() Can only create event from TrackSegment:\n"
@ -256,18 +256,18 @@ namespace Katana {
{ return getState() == DataNegociate::Unimplemented; } { return getState() == DataNegociate::Unimplemented; }
void RoutingEvent::setMode ( unsigned int mode ) void RoutingEvent::setMode ( uint32_t mode )
{ _mode = mode; } { _mode = mode; }
unsigned int RoutingEvent::getState () const uint32_t RoutingEvent::getState () const
{ {
DataNegociate* data = _segment->getDataNegociate(); DataNegociate* data = _segment->getDataNegociate();
return (data) ? data->getState() : 0; return (data) ? data->getState() : 0;
} }
void RoutingEvent::setState ( unsigned int state ) void RoutingEvent::setState ( uint32_t state )
{ {
DataNegociate* data = _segment->getDataNegociate(); DataNegociate* data = _segment->getDataNegociate();
if (data) data->setState( state ); 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(); RoutingEvent* active = _segment->getDataNegociate()->getRoutingEvent();
if (active != this) return active->reschedule( queue, eventLevel ); 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()) { if (segment->getTrack()) {
cinfo << "[INFO] Already in Track " << (void*)segment->base()->base() cinfo << "[INFO] Already in Track " << (void*)segment->base()->base()

View File

@ -97,7 +97,7 @@ namespace Katana {
DbU::Unit hExtension = 0; DbU::Unit hExtension = 0;
DbU::Unit vExtension = 0; DbU::Unit vExtension = 0;
unsigned int gaugeDepth = 0; uint32_t gaugeDepth = 0;
if (Session::getLayerGauge(gaugeDepth)->getType() == Constant::PinOnly) ++gaugeDepth; if (Session::getLayerGauge(gaugeDepth)->getType() == Constant::PinOnly) ++gaugeDepth;
bool HV = (Session::getLayerGauge(gaugeDepth)->getDirection() == Constant::Horizontal); 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() return getTrackByIndex( getLayerGauge()->getTrackIndex( getAxisMin()
, getAxisMax() , getAxisMax()
@ -171,7 +171,7 @@ namespace Katana {
} }
bool RoutingPlane::_check ( unsigned int& overlaps ) const bool RoutingPlane::_check ( uint32_t& overlaps ) const
{ {
bool coherency = true; bool coherency = true;

View File

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

View File

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

View File

@ -185,7 +185,7 @@ namespace {
if (not autoTerminal->isEndPoint()) continue; if (not autoTerminal->isEndPoint()) continue;
_seed = autoTerminal->getSegment(); _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) ) for ( AutoSegment* segment : _seed->getConnecteds(flags) )
_data->addReference( segment ); _data->addReference( segment );

View File

@ -116,7 +116,7 @@ namespace Katana {
{ return _routingPlane->getKatanaEngine(); } { return _routingPlane->getKatanaEngine(); }
unsigned int Track::getDepth () const uint32_t Track::getDepth () const
{ return _routingPlane->getDepth(); } { return _routingPlane->getDepth(); }
@ -148,7 +148,7 @@ namespace Katana {
TrackElement* Track::getSegment ( DbU::Unit position ) const TrackElement* Track::getSegment ( DbU::Unit position ) const
{ {
unsigned int state; uint32_t state;
size_t begin; size_t begin;
getBeginIndex( position, begin, state ); getBeginIndex( position, begin, state );
@ -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()) { if (_segments.empty()) {
state = EmptyTrack; state = EmptyTrack;
@ -256,7 +256,7 @@ namespace Katana {
void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const
{ {
unsigned int iState; uint32_t iState;
if ( _segments.empty() if ( _segments.empty()
or (interval.getVMax() <= _min) or (interval.getVMax() <= _min)
@ -281,7 +281,7 @@ namespace Katana {
, Net* net , Net* net
, size_t begin , size_t begin
, size_t end , size_t end
, unsigned int flags ) const , uint32_t flags ) const
{ {
TrackCost cost ( const_cast<Track*>(this), interval, begin, end, net, flags ); 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 begin;
size_t end; 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 ); } { 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) cdebug_log(155,1) << "getTerminalWeight() @" << DbU::getValueString(_axis)
<< " [" << interval.getVMin() << " " << interval.getVMax() << "]" << endl; << " [" << interval.getVMin() << " " << interval.getVMax() << "]" << endl;
@ -390,7 +390,7 @@ namespace Katana {
Interval Track::getFreeInterval ( DbU::Unit position, Net* net ) const Interval Track::getFreeInterval ( DbU::Unit position, Net* net ) const
{ {
unsigned int state; uint32_t state;
size_t begin; size_t begin;
size_t end; size_t end;
@ -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,1) << "Track::expandFreeInterval() begin:" << begin << " end:" << end << " " << net << endl;
cdebug_log(155,0) << _segments[begin] << 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 coherency = true;
bool holes = false; 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; Interval canonical;
@ -564,14 +564,14 @@ namespace Katana {
case BeginIsSegmentMax: return _segments[index]->getTargetU (); 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; " invalid state value %ud.", state ) << endl;
return _min; 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; Interval canonical;
@ -583,7 +583,7 @@ namespace Katana {
case EndIsSegmentMax: return _segments[index ]->getTargetU (); 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; " invalid state value %ud.", state ) << endl;
return _min; 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; if ( !_segments.size() ) return 0;

View File

@ -64,7 +64,7 @@ namespace Katana {
, size_t begin , size_t begin
, size_t end , size_t end
, Net* net , Net* net
, unsigned int flags , uint32_t flags
) )
: _flags (flags) : _flags (flags)
, _track (track) , _track (track)

View File

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

View File

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

View File

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

View File

@ -67,7 +67,7 @@ namespace Katana {
RoutingGauge* rg = Session::getRoutingGauge(); RoutingGauge* rg = Session::getRoutingGauge();
RoutingPlane* rp = Session::getKatanaEngine()->getRoutingPlaneByIndex(depth); RoutingPlane* rp = Session::getKatanaEngine()->getRoutingPlaneByIndex(depth);
DbU::Unit pitch = DbU::toLambda(Session::getPitch(depth)); DbU::Unit pitch = DbU::toLambda(Session::getPitch(depth));
unsigned int rpDirection = rg->getLayerDirection(depth); Flags rpDirection = rg->getLayerDirection(depth);
Interval trackSpan; Interval trackSpan;
if ( rpDirection == Constant::Horizontal ) { if ( rpDirection == Constant::Horizontal ) {
@ -80,10 +80,10 @@ namespace Katana {
trackSpan = Interval ( sourcePoint.getX(), targetPoint.getX() ); trackSpan = Interval ( sourcePoint.getX(), targetPoint.getX() );
} }
if ( rpDirection xor rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) { if ( rpDirection xor (uint64_t)rg->getLayerDirection(rg->getLayerDepth(pad->getLayer())) ) {
_weight = (unsigned int)(( pitch / (pitch+DbU::toLambda(trackSpan.getSize())) ) * 100.0) ; _weight = (uint32_t)(( pitch / (pitch+DbU::toLambda(trackSpan.getSize())) ) * 100.0) ;
} else { } 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() ); 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::isGlobal () const { return _base->isWeakGlobal() or _base->isGlobal(); }
bool TrackSegment::isBipoint () const { return _base->isBipoint(); } bool TrackSegment::isBipoint () const { return _base->isBipoint(); }
bool TrackSegment::isTerminal () const { return _base->isTerminal(); } 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::isStrap () const { return _base->isStrap(); }
bool TrackSegment::isSlackened () const { return _base->isSlackened(); } bool TrackSegment::isSlackened () const { return _base->isSlackened(); }
bool TrackSegment::isDogleg () const { return _base->isDogleg(); } bool TrackSegment::isDogleg () const { return _base->isDogleg(); }
@ -172,7 +172,7 @@ namespace Katana {
DbU::Unit TrackSegment::getPPitch () const { return _ppitch; } DbU::Unit TrackSegment::getPPitch () const { return _ppitch; }
DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); } DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); }
unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; } 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::getSourceConstraints () const { return _base->getSourceConstraints(); }
Interval TrackSegment::getTargetConstraints () const { return _base->getTargetConstraints(); } Interval TrackSegment::getTargetConstraints () const { return _base->getTargetConstraints(); }
TrackElement* TrackSegment::getCanonical ( Interval& i ) { return Session::lookup( _base->getCanonical(i)->base() ); } 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(); } 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; 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) { if (level > 15) {
cerr << Bug("%s has reached maximum dog leg count (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 ); _base->setAxis( axis, flags );
invalidate(); 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; 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 ); } { 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 ); } { 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 ); } { 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 ); } { 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; 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; bool success = false;
@ -477,7 +477,7 @@ namespace Katana {
} }
bool TrackSegment::moveDown ( unsigned int flags ) bool TrackSegment::moveDown ( Flags flags )
{ {
bool success = false; bool success = false;
@ -498,7 +498,7 @@ namespace Katana {
} }
bool TrackSegment::moveAside ( unsigned int flags ) bool TrackSegment::moveAside ( Flags flags )
{ {
bool success = true; 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; 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* perpandicular = NULL;
TrackElement* parallel = NULL; TrackElement* parallel = NULL;
@ -764,7 +764,7 @@ namespace Katana {
{ {
cdebug_log(159,1) << "TrackSegment::_postDoglegs()" << endl; cdebug_log(159,1) << "TrackSegment::_postDoglegs()" << endl;
unsigned int doglegLevel = 0; uint32_t doglegLevel = 0;
const vector<AutoSegment*>& doglegs = Session::getDoglegs(); const vector<AutoSegment*>& doglegs = Session::getDoglegs();
vector<TrackElement*> segments; vector<TrackElement*> segments;

View File

@ -25,7 +25,7 @@ namespace Katana {
// Class : "VerticalTrack". // Class : "VerticalTrack".
VerticalTrack::VerticalTrack ( RoutingPlane* routingPlane, unsigned int index ) VerticalTrack::VerticalTrack ( RoutingPlane* routingPlane, uint32_t index )
: Track(routingPlane,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 ); VerticalTrack* track = new VerticalTrack ( routingPlane, index );

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -39,10 +39,10 @@ namespace Katana {
~RoutingEventQueue (); ~RoutingEventQueue ();
inline bool empty () const; inline bool empty () const;
inline size_t size () const; inline size_t size () const;
inline unsigned int getTopEventLevel () const; inline uint32_t getTopEventLevel () const;
RoutingEvent* pop (); RoutingEvent* pop ();
void load ( const vector<TrackElement*>& ); void load ( const vector<TrackElement*>& );
void add ( TrackElement*, unsigned int level ); void add ( TrackElement*, uint32_t level );
inline void push ( RoutingEvent* ); inline void push ( RoutingEvent* );
void repush ( RoutingEvent* ); void repush ( RoutingEvent* );
void repushInvalidateds (); void repushInvalidateds ();
@ -57,7 +57,7 @@ namespace Katana {
protected: protected:
// Attributes. // Attributes.
unsigned int _topEventLevel; uint32_t _topEventLevel;
RoutingEventSet _pushRequests; RoutingEventSet _pushRequests;
multiset<RoutingEvent*,RoutingEvent::Compare> _events; multiset<RoutingEvent*,RoutingEvent::Compare> _events;
@ -71,7 +71,7 @@ namespace Katana {
// Inline Functions. // Inline Functions.
inline bool RoutingEventQueue::empty () const { return _events.empty(); } inline bool RoutingEventQueue::empty () const { return _events.empty(); }
inline size_t RoutingEventQueue::size () const { return _events.size(); } inline size_t RoutingEventQueue::size () const { return _events.size(); }
inline unsigned int RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; } inline uint32_t RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; }
inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; } inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; }
inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); } inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -66,7 +66,7 @@ namespace Katana {
// Sub-Class: Locator. // Sub-Class: Locator.
class Locator : public TrackElementHL { class Locator : public TrackElementHL {
public: public:
Locator ( TrackElement* segment ); Locator ( TrackElement* segment, Flags flags );
inline Locator ( const Locator& ); inline Locator ( const Locator& );
virtual TrackElement* getElement () const; virtual TrackElement* getElement () const;
virtual TrackElementHL* getClone () const; virtual TrackElementHL* getClone () const;
@ -80,7 +80,7 @@ namespace Katana {
public: public:
// TrackElements_Perpandiculars Methods. // TrackElements_Perpandiculars Methods.
inline TrackElements_Perpandiculars ( TrackElement* segment ); inline TrackElements_Perpandiculars ( TrackElement* segment, Flags flags=Flags::NoFlags );
inline TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& ); inline TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& );
virtual TrackElementHC* getClone () const; virtual TrackElementHC* getClone () const;
virtual TrackElementHL* getLocator () const; virtual TrackElementHL* getLocator () const;
@ -88,6 +88,7 @@ namespace Katana {
protected: protected:
// TrackElements_Perpandiculars Attributes. // TrackElements_Perpandiculars Attributes.
Flags _flags;
TrackElement* _segment; 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() : TrackElementHC()
, _flags (flags)
, _segment (segment) , _segment (segment)
{ } { }
inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& tracksegments ) inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& tracksegments )
: TrackElementHC() : TrackElementHC()
, _flags (tracksegments._flags)
, _segment (tracksegments._segment) , _segment (tracksegments._segment)
{ } { }

View File

@ -50,7 +50,7 @@ namespace Katana {
inline DbU::Unit getSourceU () const; inline DbU::Unit getSourceU () const;
inline DbU::Unit getTargetU () const; inline DbU::Unit getTargetU () const;
inline Track* getTrack () const; inline Track* getTrack () const;
inline unsigned int getWeight ( const Track* ) const; inline uint32_t getWeight ( const Track* ) const;
inline void setTrack ( Track* ); inline void setTrack ( Track* );
Record* _getRecord () const; Record* _getRecord () const;
std::string _getString () const; std::string _getString () const;
@ -71,8 +71,8 @@ namespace Katana {
DbU::Unit _sourcePosition; DbU::Unit _sourcePosition;
DbU::Unit _targetPosition; DbU::Unit _targetPosition;
Track* _track; Track* _track;
unsigned int _weight; uint32_t _weight;
unsigned int _refcount; uint32_t _refcount;
protected: protected:
// Constructors & destructors. // Constructors & destructors.
@ -88,7 +88,7 @@ namespace Katana {
inline DbU::Unit TrackMarker::getSourceU () const { return _sourcePosition; } inline DbU::Unit TrackMarker::getSourceU () const { return _sourcePosition; }
inline DbU::Unit TrackMarker::getTargetU () const { return _targetPosition; } inline DbU::Unit TrackMarker::getTargetU () const { return _targetPosition; }
inline Track* TrackMarker::getTrack () const { return _track; } 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 void TrackMarker::setTrack ( Track* track ) { _track = track; }
inline bool TrackMarker::Compare::operator() ( const TrackMarker* lhs, const TrackMarker* rhs ) const 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 isGlobal () const;
virtual bool isBipoint () const; virtual bool isBipoint () const;
virtual bool isTerminal () 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 isStrap () const;
virtual bool isSlackened () const; virtual bool isSlackened () const;
virtual bool isDogleg () const; virtual bool isDogleg () const;
@ -75,12 +75,12 @@ namespace Katana {
virtual bool hasSymmetric () const; virtual bool hasSymmetric () const;
virtual bool canDogleg (); virtual bool canDogleg ();
virtual bool canDogleg ( Interval ); virtual bool canDogleg ( Interval );
virtual bool canDogleg ( Anabatic::GCell*, unsigned int flags=0 ); virtual bool canDogleg ( Anabatic::GCell*, Flags flags=0 );
virtual bool canPivotUp ( float reserve, unsigned int flags ) const; virtual bool canPivotUp ( float reserve, Flags flags ) const;
virtual bool canPivotDown ( float reserve, unsigned int flags ) const; virtual bool canPivotDown ( float reserve, Flags flags ) const;
virtual bool canMoveUp ( float reserve, unsigned int flags ) const; virtual bool canMoveUp ( float reserve, Flags flags ) const;
virtual bool canSlacken () const; virtual bool canSlacken () const;
virtual float getMaxUnderDensity ( unsigned int flags ) const; virtual float getMaxUnderDensity ( Flags flags ) const;
virtual unsigned long getId () const; virtual unsigned long getId () const;
virtual Flags getDirection () const; virtual Flags getDirection () const;
virtual Net* getNet () const; virtual Net* getNet () const;
@ -88,7 +88,7 @@ namespace Katana {
virtual DbU::Unit getPitch () const; virtual DbU::Unit getPitch () const;
virtual DbU::Unit getPPitch () const; virtual DbU::Unit getPPitch () const;
virtual unsigned long getFreedomDegree () const; virtual unsigned long getFreedomDegree () const;
virtual unsigned int getDoglegLevel () const; virtual uint32_t getDoglegLevel () const;
virtual TrackElement* getNext () const; virtual TrackElement* getNext () const;
virtual TrackElement* getPrevious () const; virtual TrackElement* getPrevious () const;
virtual TrackElement* getParent () const; virtual TrackElement* getParent () const;
@ -96,7 +96,7 @@ namespace Katana {
virtual Interval getFreeInterval () const; virtual Interval getFreeInterval () const;
virtual Interval getSourceConstraints () const; virtual Interval getSourceConstraints () const;
virtual Interval getTargetConstraints () 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 TrackElement* getCanonical ( Interval& );
virtual size_t getGCells ( vector<GCell*>& ) const; virtual size_t getGCells ( vector<GCell*>& ) const;
virtual TrackElement* getSourceDogleg (); virtual TrackElement* getSourceDogleg ();
@ -108,22 +108,22 @@ namespace Katana {
virtual void setTrack ( Track* ); virtual void setTrack ( Track* );
virtual void setSymmetric ( TrackElement* ); virtual void setSymmetric ( TrackElement* );
virtual void updateFreedomDegree (); virtual void updateFreedomDegree ();
virtual void setDoglegLevel ( unsigned int ); virtual void setDoglegLevel ( uint32_t );
virtual void swapTrack ( TrackElement* ); virtual void swapTrack ( TrackElement* );
virtual void reschedule ( unsigned int level ); virtual void reschedule ( uint32_t level );
virtual void detach (); virtual void detach ();
virtual void invalidate (); virtual void invalidate ();
virtual void revalidate (); virtual void revalidate ();
virtual void updatePPitch (); 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 ();
virtual TrackElement* makeDogleg ( Anabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel ); 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 void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel );
virtual bool moveAside ( unsigned int flags ); virtual bool moveAside ( Flags flags );
virtual bool slacken ( unsigned int flags=Flags::NoFlags ); virtual bool slacken ( Flags flags=Flags::NoFlags );
virtual bool moveUp ( unsigned int flags ); virtual bool moveUp ( Flags flags );
virtual bool moveDown ( unsigned int flags ); virtual bool moveDown ( Flags flags );
#if THIS_IS_DISABLED #if THIS_IS_DISABLED
virtual void desalignate (); virtual void desalignate ();
#endif #endif

View File

@ -50,13 +50,13 @@ namespace Katana {
public: public:
TrackSegmentCost ( TrackElement* ); TrackSegmentCost ( TrackElement* );
~TrackSegmentCost (); ~TrackSegmentCost ();
inline unsigned int getTerminals () const; inline uint32_t getTerminals () const;
inline unsigned int getRipupCount () const; inline uint32_t getRipupCount () const;
inline DbU::Unit getLeftMinExtend () const; inline DbU::Unit getLeftMinExtend () const;
inline DbU::Unit getRightMinExtend() const; inline DbU::Unit getRightMinExtend() const;
inline Net* getNet () const; inline Net* getNet () const;
DbU::Unit getWiringDelta ( DbU::Unit axis ) const; DbU::Unit getWiringDelta ( DbU::Unit axis ) const;
inline void setRipupCount ( unsigned int ); inline void setRipupCount ( uint32_t );
inline void incRipupCount (); inline void incRipupCount ();
inline void decRipupCount (); inline void decRipupCount ();
inline void resetRipupCount (); inline void resetRipupCount ();
@ -77,12 +77,12 @@ namespace Katana {
}; };
// Inline Functions. // Inline Functions.
inline unsigned int TrackSegmentCost::getTerminals () const { return _terminals; } inline uint32_t TrackSegmentCost::getTerminals () const { return _terminals; }
inline unsigned int TrackSegmentCost::getRipupCount () const { return _ripupCount; } inline uint32_t TrackSegmentCost::getRipupCount () const { return _ripupCount; }
inline DbU::Unit TrackSegmentCost::getLeftMinExtend () const { return _leftMinExtend; } inline DbU::Unit TrackSegmentCost::getLeftMinExtend () const { return _leftMinExtend; }
inline DbU::Unit TrackSegmentCost::getRightMinExtend () const { return _rightMinExtend; } inline DbU::Unit TrackSegmentCost::getRightMinExtend () const { return _rightMinExtend; }
inline Net* TrackSegmentCost::getNet () const { return _net; } inline Net* TrackSegmentCost::getNet () const { return _net; }
inline void TrackSegmentCost::setRipupCount ( unsigned int count ) { _ripupCount = count; } inline void TrackSegmentCost::setRipupCount ( uint32_t count ) { _ripupCount = count; }
inline void TrackSegmentCost::incRipupCount () { _ripupCount++; } inline void TrackSegmentCost::incRipupCount () { _ripupCount++; }
inline void TrackSegmentCost::decRipupCount () { if (_ripupCount) _ripupCount--; } inline void TrackSegmentCost::decRipupCount () { if (_ripupCount) _ripupCount--; }
inline void TrackSegmentCost::resetRipupCount () { _ripupCount = 0; } inline void TrackSegmentCost::resetRipupCount () { _ripupCount = 0; }

View File

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