First intergration of the Analogic router parts.

* New: In Anabatic::AutoSegment, introduce a the kind (associated to a
    flag) "LongLocal". Analog GCells can be very wide, so at least some
    carefuly choosen long local segments must be took into account as
    attractors in the computation of the optimal axis.
* New: In Anabatic::AutoSegment::computeOptimal(), take LongLocal into
    account as attractors.
* Change: In ::GCellTopology constructors compare the layers of the
    RoutingPads using layer masks instead of Layer pointers. Allows to
    find both "METALx" (symbolic) and "metalX" (real).
* Change: In ::GCellTopology::_doHChannel(), _doChannel(), _doStrut()
    and _doDevice(), tag long locals as "LongLocal". This need to be
    reviewed as it as bind done a bit too quickly.
* Change: In Anabatic::AutoSegment, due too a much bigger span of the
    analogic GCells the _optimalMin & _optimalMax bitfields must use
    16 bits instead of 8 (they where overflowed).
* New: In Katana, reorganisation of the initialization procedure to fit
    both digital and analogic cases. Create an analogInit() method.
* Change: In Katana::RoutingEvent, the _tracksNb and _tracksFree bitfields
    where too short for the Analog GCell size, now uses 16 bits instead of
    6.
* Bug: In Katana::GraphicKatanEngine::drawGCell(), skip drawing of a
    GCell if *both* width and height are under 150 pixels.
* New: In Katana::Session, add a new isOpen() method.
This commit is contained in:
Jean-Paul Chaput 2016-10-04 17:12:58 +02:00
parent 5f25ba349f
commit 47c9961ef3
20 changed files with 154 additions and 116 deletions

View File

@ -813,7 +813,7 @@ namespace Anabatic {
} }
cdebug_log(149,0) << "Align on " << aligneds[0] cdebug_log(149,0) << "Align on " << aligneds[0]
<< " " << DbU::toLambda(aligneds[0]->getAxis()) << endl; << " " << DbU::getValueString(aligneds[0]->getAxis()) << endl;
aligneds[0]->setAxis( aligneds[0]->getAxis(), Flags::Realignate ); aligneds[0]->setAxis( aligneds[0]->getAxis(), Flags::Realignate );
aligneds.clear(); aligneds.clear();

View File

@ -89,10 +89,10 @@ namespace Anabatic {
restoreNativeConstraintBox(); restoreNativeConstraintBox();
cdebug_log(145,0) << "Native CBox: " << this cdebug_log(145,0) << "Native CBox: " << this
<< " <" << DbU::toLambda(getCBXMin()) << " <" << DbU::getValueString(getCBXMin())
<< " " << DbU::toLambda(getCBYMin()) << " " << DbU::getValueString(getCBYMin())
<< " " << DbU::toLambda(getCBXMax()) << " " << DbU::getValueString(getCBXMax())
<< " " << DbU::toLambda(getCBYMax()) << ">" << endl; << " " << DbU::getValueString(getCBYMax()) << ">" << endl;
Session::link( this ); Session::link( this );
invalidate( Flags::Topology ); invalidate( Flags::Topology );
@ -221,7 +221,8 @@ namespace Anabatic {
DbU::Unit sideLength = (segment->isHorizontal()) ? hSideLength : vSideLength; DbU::Unit sideLength = (segment->isHorizontal()) ? hSideLength : vSideLength;
if ( not segment->isUnbound() and (abs(length) > sideLength) ) if ( not segment->isUnbound() and (abs(length) > sideLength) )
cerr << Error("Suspicious length:%.2f of %s." cerr << Error("Suspicious length:%.2f of %s."
,DbU::toLambda(length),getString(segment).c_str()) << endl; ,DbU::getValueString(length).c_str()
,getString(segment).c_str()) << endl;
} else { } else {
if (segment->isHorizontal()) { if (segment->isHorizontal()) {
if (isSourceHook) if (isSourceHook)

View File

@ -389,7 +389,7 @@ namespace Anabatic {
if (_horizontal->getY() == axis) return; if (_horizontal->getY() == axis) return;
cdebug_log(145,0) << "_setAxis() @Y " << DbU::toLambda(axis) << " " << this << endl; cdebug_log(145,0) << "_setAxis() @Y " << DbU::getValueString(axis) << " " << this << endl;
_horizontal->setY( axis ); _horizontal->setY( axis );
invalidate(); invalidate();

View File

@ -198,7 +198,7 @@ namespace {
_attractors[position]++; _attractors[position]++;
_attractorsCount++; _attractorsCount++;
cdebug_log(145,0) << "add Attractor @" << DbU::toLambda(position) cdebug_log(145,0) << "add Attractor @" << DbU::getValueString(position)
<< " [" << _attractors[position] << "]" << endl; << " [" << _attractors[position] << "]" << endl;
} }
@ -814,6 +814,9 @@ namespace Anabatic {
DbU::Unit optimalMin = max( min(getOptimalMin(),constraintMax), constraintMin ); DbU::Unit optimalMin = max( min(getOptimalMin(),constraintMax), constraintMin );
DbU::Unit optimalMax = min( max(getOptimalMax(),constraintMin), constraintMax ); DbU::Unit optimalMax = min( max(getOptimalMax(),constraintMin), constraintMax );
cdebug_log(149,0) << "optimal:[" << DbU::getValueString(optimalMin)
<< " " << DbU::getValueString(optimalMin) << "]" << endl;
if (getAxis() < optimalMin) { if (getAxis() < optimalMin) {
setAxis( optimalMin, flags ); setAxis( optimalMin, flags );
cdebug_tabw(149,-1); cdebug_tabw(149,-1);
@ -840,8 +843,8 @@ namespace Anabatic {
if ( (axis == getAxis()) and not (flags & Flags::Realignate) ) return; if ( (axis == getAxis()) and not (flags & Flags::Realignate) ) return;
cdebug_log(159,0) << "setAxis() @" cdebug_log(159,0) << "setAxis() @"
<< ((isHorizontal())?"Y ":"X ") << DbU::toLambda(getAxis()) << ((isHorizontal())?"Y ":"X ") << DbU::getValueString(getAxis())
<< " to " << DbU::toLambda(axis) << " on " << this << endl; << " to " << DbU::getValueString(axis) << " on " << this << endl;
cdebug_tabw(145,1); cdebug_tabw(145,1);
_setAxis( axis ); _setAxis( axis );
@ -955,8 +958,25 @@ namespace Anabatic {
} }
forEach( AutoSegment*, autoSegment, getPerpandiculars() ) { forEach( AutoSegment*, autoSegment, getPerpandiculars() ) {
cdebug_log(145,1) << "Perpandicular " << *autoSegment << endl; cdebug_log(145,1) << "| Perpandicular " << *autoSegment << endl;
if (autoSegment->isLocal()) { if (autoSegment->isGlobal()) {
// Sloppy implentation.
DbU::Unit perpandMin = autoSegment->getSourceU();
DbU::Unit perpandMax = autoSegment->getTargetU();
if (perpandMin < minGCell) attractors.addAttractor( minGCell );
if (perpandMax > maxGCell) attractors.addAttractor( maxGCell );
} else if (autoSegment->isLongLocal()) {
cdebug_log(145,0) << "| Used as long global attractor." << endl;
DbU::Unit perpandMin = autoSegment->getSourceU();
DbU::Unit perpandMax = autoSegment->getTargetU();
if (perpandMin != perpandMax) {
if (perpandMin == getAxis()) attractors.addAttractor( perpandMax );
if (perpandMax == getAxis()) attractors.addAttractor( perpandMin );
}
} else if (autoSegment->isLocal()) {
if (not autoSegment->isStrongTerminal()) { cdebug_tabw(145,-1); continue; } if (not autoSegment->isStrongTerminal()) { cdebug_tabw(145,-1); continue; }
DbU::Unit terminalMin; DbU::Unit terminalMin;
@ -971,30 +991,13 @@ namespace Anabatic {
if (terminalMin != terminalMax) if (terminalMin != terminalMax)
attractors.addAttractor( terminalMax ); attractors.addAttractor( terminalMax );
} }
} else {
#if THIS_IS_DISABLED
bool isMin = true;
if ( isHorizontal()
and (autoSegment->getAutoSource()->getGCell()->getRow() == _gcell->getRow()) )
isMin = false;
if ( isVertical()
and (autoSegment->getAutoSource()->getGCell()->getColumn() == _gcell->getColumn()) )
isMin = false;
attractors.addAttractor( (isMin) ? minGCell : maxGCell );
#endif
// Sloppy implentation.
DbU::Unit perpandMin = autoSegment->getSourceU();
DbU::Unit perpandMax = autoSegment->getTargetU();
if (perpandMin < minGCell) attractors.addAttractor( minGCell );
if (perpandMax > maxGCell) attractors.addAttractor( maxGCell );
} }
cdebug_tabw(145,-1); cdebug_tabw(145,-1);
} }
if (attractors.getAttractorsCount()) { if (attractors.getAttractorsCount()) {
cdebug_log(145,0) << "Lower Median " << DbU::toLambda(attractors.getLowerMedian()) << endl; cdebug_log(145,0) << "Lower Median " << DbU::getValueString(attractors.getLowerMedian()) << endl;
cdebug_log(145,0) << "Upper Median " << DbU::toLambda(attractors.getUpperMedian()) << endl; cdebug_log(145,0) << "Upper Median " << DbU::getValueString(attractors.getUpperMedian()) << endl;
optimalMin = attractors.getLowerMedian(); optimalMin = attractors.getLowerMedian();
optimalMax = attractors.getUpperMedian(); optimalMax = attractors.getUpperMedian();
@ -1959,6 +1962,7 @@ namespace Anabatic {
state += isCanonical () ? "C": "-"; state += isCanonical () ? "C": "-";
state += isGlobal () ? "G": "-"; state += isGlobal () ? "G": "-";
state += isWeakGlobal () ? "g": "-"; state += isWeakGlobal () ? "g": "-";
state += isLongLocal () ? "L": "-";
state += isStrongTerminal() ? "T": "-"; state += isStrongTerminal() ? "T": "-";
state += isWeakTerminal1 () ? "W": "-"; state += isWeakTerminal1 () ? "W": "-";
state += isWeakTerminal2 () ? "w": "-"; state += isWeakTerminal2 () ? "w": "-";

View File

@ -73,6 +73,8 @@ namespace Anabatic {
setOptimalMax( getGCell()->getXMax() ); setOptimalMax( getGCell()->getXMax() );
resetNativeConstraints( getGCell()->getXMin(), getGCell()->getConstraintXMax() ); resetNativeConstraints( getGCell()->getXMin(), getGCell()->getConstraintXMax() );
cdebug_log(145,0) << "Source in " << getGCell() << endl;
cdebug_log(145,0) << "Target in " << target->getGCell() << endl;
if (getGCell() != target->getGCell()) { if (getGCell() != target->getGCell()) {
setFlags( SegGlobal ); setFlags( SegGlobal );
@ -326,7 +328,7 @@ namespace Anabatic {
if (_vertical->getX() == axis) return; if (_vertical->getX() == axis) return;
cdebug_log(149,0) << "_setAxis() @X " << DbU::toLambda(axis) << " " << this << endl; cdebug_log(149,0) << "_setAxis() @X " << DbU::getValueString(axis) << " " << this << endl;
_vertical->setX( axis ); _vertical->setX( axis );
invalidate(); invalidate();

View File

@ -220,7 +220,7 @@ namespace Anabatic {
RoutingPad* rp = dynamic_cast<RoutingPad*>( component ); RoutingPad* rp = dynamic_cast<RoutingPad*>( component );
if (rp) { if (rp) {
rps.push_back( rp ); rps.push_back( rp );
cerr << "rp to route: " << rp << endl; cdebug_log(112,0) << "| " << rp << endl;
continue; continue;
} }
} }
@ -228,8 +228,6 @@ namespace Anabatic {
for ( auto rp : rps ) { for ( auto rp : rps ) {
Point center = rp->getBoundingBox().getCenter(); Point center = rp->getBoundingBox().getCenter();
GCell* gcell = _anabatic->getGCellUnder( center ); GCell* gcell = _anabatic->getGCellUnder( center );
cerr << "rp : " << rp << endl;
cerr << "gcell: " << gcell << endl;
if (gcell->isDevice()){ if (gcell->isDevice()){
_searchArea.merge( _net->getCell()->getAbutmentBox() ); _searchArea.merge( _net->getCell()->getAbutmentBox() );
@ -540,10 +538,6 @@ namespace Anabatic {
if (aligneds.front()->isHorizontal()) { if (aligneds.front()->isHorizontal()) {
if (sourceContact->getX() > targetContact->getX()) if (sourceContact->getX() > targetContact->getX())
std::swap( sourceContact, targetContact ); std::swap( sourceContact, targetContact );
if (sourceContact->getX() == targetContact->getX()){
cerr << "source Vertex: " << source << endl;
cerr << "target Vertex: " << source << endl;
}
segment = Horizontal::create( sourceContact segment = Horizontal::create( sourceContact
, targetContact , targetContact
@ -555,10 +549,6 @@ namespace Anabatic {
} else { } else {
if (sourceContact->getY() > targetContact->getY()) if (sourceContact->getY() > targetContact->getY())
std::swap( sourceContact, targetContact ); std::swap( sourceContact, targetContact );
if (sourceContact->getY() == targetContact->getY()){
cerr << "source Vertex: " << source << endl;
cerr << "target Vertex: " << source << endl;
}
segment = Vertical::create( sourceContact segment = Vertical::create( sourceContact
, targetContact , targetContact

View File

@ -502,7 +502,7 @@ namespace {
flags |= ((width == 0) && (height == 0)) ? Punctual : 0; flags |= ((width == 0) && (height == 0)) ? Punctual : 0;
cdebug_log(145,0) << "::checkRoutingPadSize(): pitch[" << anchorDepth << "]:" cdebug_log(145,0) << "::checkRoutingPadSize(): pitch[" << anchorDepth << "]:"
<< DbU::toLambda(Session::getPitch(anchorDepth)) << " " << DbU::getValueString(Session::getPitch(anchorDepth)) << " "
<< ((flags & HSmall) ? "HSmall " : " ") << ((flags & HSmall) ? "HSmall " : " ")
<< ((flags & VSmall) ? "VSmall " : " ") << ((flags & VSmall) ? "VSmall " : " ")
<< endl; << endl;
@ -908,10 +908,10 @@ namespace {
Segment* toSegment = dynamic_cast<Segment*>( hook->getComponent() ); Segment* toSegment = dynamic_cast<Segment*>( hook->getComponent() );
if (toSegment) { if (toSegment) {
switch ( getSegmentHookType(hook) ) { switch ( getSegmentHookType(hook) ) {
case WestBound: _west = hook; break; cdebug_log(145,0) << "hook is west"; case WestBound: _west = hook; break;
case EastBound: _east = hook; break; cdebug_log(145,0) << "hook is east"; case EastBound: _east = hook; break;
case SouthBound: _south = hook; break; cdebug_log(145,0) << "hook is south"; case SouthBound: _south = hook; break;
case NorthBound: _north = hook; break; cdebug_log(145,0) << "hook is north"; case NorthBound: _north = hook; break;
} }
_connexity.fields.globals++; _connexity.fields.globals++;
@ -949,11 +949,11 @@ namespace {
const Layer* layer = anchor->getLayer(); const Layer* layer = anchor->getLayer();
cdebug_log(145,0) << "rp: " << rp << endl; cdebug_log(145,0) << "rp: " << rp << endl;
if (layer == Session::getRoutingLayer(0)) _connexity.fields.M1++; // M1 V if (layer->getMask() == Session::getRoutingLayer(0)->getMask()) _connexity.fields.M1++; // M1 V
else if (layer == Session::getRoutingLayer(1)) _connexity.fields.M2++; // M2 H else if (layer->getMask() == Session::getRoutingLayer(1)->getMask()) _connexity.fields.M2++; // M2 H
else if (layer == Session::getRoutingLayer(2)) _connexity.fields.M3++; // M3 V else if (layer->getMask() == Session::getRoutingLayer(2)->getMask()) _connexity.fields.M3++; // M3 V
else if (layer == Session::getRoutingLayer(3)) _connexity.fields.M2++; // M4 H else if (layer->getMask() == Session::getRoutingLayer(3)->getMask()) _connexity.fields.M2++; // M4 H
else if (layer == Session::getRoutingLayer(4)) _connexity.fields.M3++; // M5 V else if (layer->getMask() == Session::getRoutingLayer(4)->getMask()) _connexity.fields.M3++; // M5 V
else { else {
cerr << Warning( "Terminal layer \"%s\" of %s is not managed yet (ignored)." cerr << Warning( "Terminal layer \"%s\" of %s is not managed yet (ignored)."
, getString(layer->getName()).c_str() , getString(layer->getName()).c_str()
@ -2770,6 +2770,7 @@ namespace {
, verticalWidth , verticalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} }
} }
@ -2808,6 +2809,7 @@ namespace {
, verticalWidth , verticalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
if (_fromHook->getComponent() == hooks[0]->getComponent()){ if (_fromHook->getComponent() == hooks[0]->getComponent()){
@ -2862,6 +2864,7 @@ namespace {
, horizontalWidth , horizontalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
if (_fromHook->getComponent() == hooks[0]->getComponent()){ if (_fromHook->getComponent() == hooks[0]->getComponent()){
@ -3016,6 +3019,7 @@ namespace {
, horizontalWidth , horizontalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} else if ((_east != NULL) && (_west != NULL) ) { } else if ((_east != NULL) && (_west != NULL) ) {
@ -3066,6 +3070,7 @@ namespace {
, verticalWidth , verticalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} else { } else {
@ -3115,6 +3120,7 @@ namespace {
, horizontalWidth , horizontalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} else if ((_north != NULL) && (_south != NULL) && (_west != NULL)){ } else if ((_north != NULL) && (_south != NULL) && (_west != NULL)){
@ -3152,6 +3158,7 @@ namespace {
, horizontalWidth , horizontalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
@ -3190,6 +3197,7 @@ namespace {
, verticalWidth , verticalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} else if ((_east != NULL) && (_south != NULL) && (_west != NULL)){ } else if ((_east != NULL) && (_south != NULL) && (_west != NULL)){
@ -3227,6 +3235,7 @@ namespace {
, verticalWidth , verticalWidth
) )
); );
if (not globalSegment->isGlobal()) globalSegment->setFlags( SegLongLocal );
cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl; cdebug_log(145,0) << "[Create global segment]: " << globalSegment << endl;
} else { } else {

View File

@ -172,8 +172,8 @@ namespace Anabatic {
} }
if (aligneds.empty()) canonical->setFlags( SegNotAligned ); if (aligneds.empty()) canonical->setFlags( SegNotAligned );
cdebug_log(149,0) << "Align @" << DbU::toLambda(canonical->getAxis()) cdebug_log(149,0) << "Align @" << DbU::getValueString(canonical->getAxis())
<< " on " << canonical << endl; << " on " << canonical << endl;
//canonical->setAxis( canonical->getAxis(), Flags::Realignate ); //canonical->setAxis( canonical->getAxis(), Flags::Realignate );
if (canonical->isUnsetAxis()) canonical->toOptimalAxis( Flags::Realignate|Flags::Propagate ); if (canonical->isUnsetAxis()) canonical->toOptimalAxis( Flags::Realignate|Flags::Propagate );

View File

@ -65,33 +65,34 @@ namespace Anabatic {
, SegFixed = (1<< 1) , SegFixed = (1<< 1)
, SegGlobal = (1<< 2) , SegGlobal = (1<< 2)
, SegWeakGlobal = (1<< 3) , SegWeakGlobal = (1<< 3)
, SegCanonical = (1<< 4) , SegLongLocal = (1<< 4)
, SegBipoint = (1<< 5) , SegCanonical = (1<< 5)
, SegDogleg = (1<< 6) , SegBipoint = (1<< 6)
, SegStrap = (1<< 7) , SegDogleg = (1<< 7)
, SegSourceTop = (1<< 8) , SegStrap = (1<< 8)
, SegSourceBottom = (1<< 9) , SegSourceTop = (1<< 9)
, SegTargetTop = (1<<10) , SegSourceBottom = (1<<10)
, SegTargetBottom = (1<<11) , SegTargetTop = (1<<11)
, SegIsReduced = (1<<12) , SegTargetBottom = (1<<12)
, SegLayerChange = (1<<13) , SegIsReduced = (1<<13)
, SegSourceTerminal = (1<<14) // Replace Terminal. , SegLayerChange = (1<<14)
, SegTargetTerminal = (1<<15) // Replace Terminal. , SegSourceTerminal = (1<<15) // Replace Terminal.
, SegTargetTerminal = (1<<16) // Replace Terminal.
, SegStrongTerminal = SegSourceTerminal|SegTargetTerminal , SegStrongTerminal = SegSourceTerminal|SegTargetTerminal
, SegWeakTerminal1 = (1<<16) // Replace TopologicalEnd. , SegWeakTerminal1 = (1<<17) // Replace TopologicalEnd.
, SegWeakTerminal2 = (1<<17) // Replace TopologicalEnd. , SegWeakTerminal2 = (1<<18) // Replace TopologicalEnd.
, SegNotSourceAligned = (1<<18) , SegNotSourceAligned = (1<<19)
, SegNotTargetAligned = (1<<19) , SegNotTargetAligned = (1<<20)
, SegUnbound = (1<<20) , SegUnbound = (1<<21)
, SegHalfSlackened = (1<<21) , SegHalfSlackened = (1<<22)
, SegSlackened = (1<<22) , SegSlackened = (1<<23)
, SegAxisSet = (1<<23) , SegAxisSet = (1<<24)
, SegInvalidated = (1<<24) , SegInvalidated = (1<<25)
, SegInvalidatedSource = (1<<25) , SegInvalidatedSource = (1<<26)
, SegInvalidatedTarget = (1<<26) , SegInvalidatedTarget = (1<<27)
, SegInvalidatedLayer = (1<<27) , SegInvalidatedLayer = (1<<28)
, SegCreated = (1<<28) , SegCreated = (1<<29)
, SegUserDefined = (1<<29) , SegUserDefined = (1<<30)
// Masks. // Masks.
, SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2 , SegWeakTerminal = SegStrongTerminal|SegWeakTerminal1|SegWeakTerminal2
, SegNotAligned = SegNotSourceAligned|SegNotTargetAligned , SegNotAligned = SegNotSourceAligned|SegNotTargetAligned
@ -169,6 +170,7 @@ namespace Anabatic {
inline bool isVertical () const; inline bool isVertical () const;
inline bool isGlobal () const; inline bool isGlobal () const;
inline bool isWeakGlobal () const; inline bool isWeakGlobal () const;
inline bool isLongLocal () const;
inline bool isLocal () const; inline bool isLocal () const;
inline bool isFixed () const; inline bool isFixed () const;
inline bool isBipoint () const; inline bool isBipoint () const;
@ -342,8 +344,8 @@ namespace Anabatic {
GCell* _gcell; GCell* _gcell;
unsigned int _flags; unsigned int _flags;
unsigned int _depth : 8; unsigned int _depth : 8;
unsigned int _optimalMin : 8; unsigned int _optimalMin :16;
unsigned int _optimalMax : 8; unsigned int _optimalMax :16;
unsigned int _reduceds : 2; unsigned int _reduceds : 2;
DbU::Unit _sourcePosition; DbU::Unit _sourcePosition;
DbU::Unit _targetPosition; DbU::Unit _targetPosition;
@ -460,6 +462,7 @@ namespace Anabatic {
inline bool AutoSegment::isFixed () const { return _flags & SegFixed; } inline bool AutoSegment::isFixed () const { return _flags & SegFixed; }
inline bool AutoSegment::isGlobal () const { return _flags & SegGlobal; } inline bool AutoSegment::isGlobal () const { return _flags & SegGlobal; }
inline bool AutoSegment::isWeakGlobal () const { return _flags & SegWeakGlobal; } inline bool AutoSegment::isWeakGlobal () const { return _flags & SegWeakGlobal; }
inline bool AutoSegment::isLongLocal () const { return _flags & SegLongLocal; }
inline bool AutoSegment::isLocal () const { return not (_flags & SegGlobal); } inline bool AutoSegment::isLocal () const { return not (_flags & SegGlobal); }
inline bool AutoSegment::isBipoint () const { return _flags & SegBipoint; } inline bool AutoSegment::isBipoint () const { return _flags & SegBipoint; }
inline bool AutoSegment::isWeakTerminal () const { return _flags & SegWeakTerminal; } inline bool AutoSegment::isWeakTerminal () const { return _flags & SegWeakTerminal; }

View File

@ -295,10 +295,11 @@ namespace CRL {
record->add ( getSlot ( "_type" , _type ) ); record->add ( getSlot ( "_type" , _type ) );
record->add ( getSlot ( "_depth" , _depth ) ); record->add ( getSlot ( "_depth" , _depth ) );
record->add ( getSlot ( "_density" , _density ) ); record->add ( getSlot ( "_density" , _density ) );
record->add ( getSlot ( "_offset" , _offset ) );
record->add ( getSlot ( "_pitch" , _pitch ) ); record->add ( DbU::getValueSlot ( "_offset" , &_offset ) );
record->add ( getSlot ( "_wireWidth", _wireWidth ) ); record->add ( DbU::getValueSlot ( "_pitch" , &_pitch ) );
record->add ( getSlot ( "_viaWidth" , _viaWidth ) ); record->add ( DbU::getValueSlot ( "_wireWidth", &_wireWidth ) );
record->add ( DbU::getValueSlot ( "_viaWidth" , &_viaWidth ) );
return ( record ); return ( record );
} }

View File

@ -140,8 +140,9 @@ namespace Hurricane {
if ( not ( (*islice)->getMask() & _extensionMask ) ) continue; if ( not ( (*islice)->getMask() & _extensionMask ) ) continue;
if ( not (*islice)->getBoundingBox().intersect(getArea()) ) continue; if ( not (*islice)->getBoundingBox().intersect(getArea()) ) continue;
forEach ( Go*, igo, (*islice)->getGosUnder(_stack.getArea()) ) for ( Go* go : (*islice)->getGosUnder(_stack.getArea()) ) {
extensionGoCallback ( *igo ); extensionGoCallback ( go );
}
} }
} }
} }

View File

@ -115,6 +115,7 @@ namespace Hurricane {
, _updateState (ExternalEmit) , _updateState (ExternalEmit)
, _pyScriptName () , _pyScriptName ()
{ {
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
setObjectName( "viewer" ); setObjectName( "viewer" );
menuBar()->setObjectName ( _getAbsWidgetPath("") ); menuBar()->setObjectName ( _getAbsWidgetPath("") );

View File

@ -1042,7 +1042,7 @@ namespace Hurricane {
// Class : "Hurricane::CellWidget". // Class : "Hurricane::CellWidget".
int CellWidget::_initialSide = 500; int CellWidget::_initialSide = 250;
CellWidget::CellWidget ( QWidget* parent ) CellWidget::CellWidget ( QWidget* parent )
@ -1075,7 +1075,7 @@ namespace Hurricane {
setAttribute ( Qt::WA_NoSystemBackground ); setAttribute ( Qt::WA_NoSystemBackground );
//setAttribute ( Qt::WA_PaintOnScreen ); //setAttribute ( Qt::WA_PaintOnScreen );
setAttribute ( Qt::WA_StaticContents ); setAttribute ( Qt::WA_StaticContents );
setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ); setSizePolicy ( QSizePolicy::Preferred, QSizePolicy::Preferred );
setFocusPolicy ( Qt::StrongFocus ); setFocusPolicy ( Qt::StrongFocus );
setMouseTracking ( true ); setMouseTracking ( true );
@ -1566,8 +1566,8 @@ namespace Hurricane {
PaletteItem* item = (_palette) ? _palette->find(extensionName) : NULL; PaletteItem* item = (_palette) ? _palette->find(extensionName) : NULL;
DbU::Unit unity = DbU::lambda(1.0); DbU::Unit unity = DbU::lambda(1.0);
return (!item || item->isItemVisible()) return (not item or item->isItemVisible())
&& ( Graphics::getThreshold(extensionName) < getScale()*unity ); and ( Graphics::getThreshold(extensionName) < getScale()*unity );
} }

View File

@ -113,8 +113,6 @@ namespace Katana {
cell->flattenNets( Cell::Flags::BuildRings|Cell::Flags::WarnOnUnplacedInstances ); cell->flattenNets( Cell::Flags::BuildRings|Cell::Flags::WarnOnUnplacedInstances );
cell->createRoutingPadRings( Cell::Flags::BuildRings ); cell->createRoutingPadRings( Cell::Flags::BuildRings );
Super::chipPrep();
startMeasures(); startMeasures();
if (getGCells().size() == 1) { if (getGCells().size() == 1) {
@ -128,8 +126,6 @@ namespace Katana {
stopMeasures(); stopMeasures();
printMeasures( "Anabatic Grid" ); printMeasures( "Anabatic Grid" );
//setupSpecialNets();
//setupPreRouteds();
setupNetDatas(); setupNetDatas();
for ( GCell* gcell : getGCells() ) { for ( GCell* gcell : getGCells() ) {
@ -140,14 +136,6 @@ namespace Katana {
else edge->incCapacity( -getVTracksReservedLocal() ); else edge->incCapacity( -getVTracksReservedLocal() );
} }
} }
openSession();
size_t maxDepth = getConfiguration()->getRoutingGauge()->getDepth();
_routingPlanes.reserve( maxDepth );
for ( size_t depth=0 ; depth < maxDepth ; depth++ ) {
_routingPlanes.push_back( RoutingPlane::create( this, depth ) );
}
Session::close();
} }

View File

@ -85,8 +85,6 @@ namespace Katana {
Box bb = gcell->getBoundingBox(); Box bb = gcell->getBoundingBox();
QRect pixelBb = widget->dbuToScreenRect(bb); QRect pixelBb = widget->dbuToScreenRect(bb);
if (gcell->isFlat()) return;
if (GCell::getDisplayMode() == GCell::Density) { if (GCell::getDisplayMode() == GCell::Density) {
unsigned int density = (unsigned int)( 255.0 * gcell->getDensity() ); unsigned int density = (unsigned int)( 255.0 * gcell->getDensity() );
if (density > 255) density = 255; if (density > 255) density = 255;
@ -94,12 +92,12 @@ namespace Katana {
painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) ); painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) );
painter.drawRect( pixelBb ); painter.drawRect( pixelBb );
} else { } else {
if (pixelBb.width() > 150) { if ( (pixelBb.width() > 150) or (pixelBb.height() > 150) ) {
painter.setPen ( pen ); painter.setPen ( pen );
painter.setBrush( Graphics::getBrush("Anabatic::GCell",widget->getDarkening()) ); painter.setBrush( Graphics::getBrush("Anabatic::GCell",widget->getDarkening()) );
painter.drawRect( pixelBb ); painter.drawRect( pixelBb );
if (pixelBb.width() > 300) { if ( (pixelBb.width() > 300) and (pixelBb.height() > 100) ) {
QString text = QString("id:%1").arg(gcell->getId()); QString text = QString("id:%1").arg(gcell->getId());
QFont font = Graphics::getFixedFont( QFont::Bold ); QFont font = Graphics::getFixedFont( QFont::Bold );
painter.setFont(font); painter.setFont(font);
@ -109,8 +107,8 @@ namespace Katana {
painter.save (); painter.save ();
painter.translate( widget->dbuToScreenPoint(bb.getCenter().getX(), bb.getCenter().getY()) ); painter.translate( widget->dbuToScreenPoint(bb.getCenter().getX(), bb.getCenter().getY()) );
painter.drawRect (QRect( -75, -25, 150, 50 )); painter.drawRect ( QRect( -80, -25, 160, 50 ) );
painter.drawText (QRect( -75, -25, 150, 50 ) painter.drawText ( QRect( -80, -25, 160, 50 )
, text , text
, QTextOption(Qt::AlignCenter) , QTextOption(Qt::AlignCenter)
); );

View File

@ -147,7 +147,10 @@ namespace Katana {
{ {
cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl; cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl;
Super::chipPrep();
setupGlobalGraph( Flags::NoFlags ); setupGlobalGraph( Flags::NoFlags );
setupRoutingPlanes();
setupSpecialNets(); setupSpecialNets();
setupPreRouteds(); setupPreRouteds();
setupPowerRails(); setupPowerRails();
@ -158,6 +161,36 @@ namespace Katana {
} }
void KatanaEngine::analogInit ()
{
cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl;
Super::chipPrep();
setupRoutingPlanes();
_runKatanaInit();
cdebug_tabw(155,-1);
}
void KatanaEngine::setupRoutingPlanes ()
{
cdebug_log(155,1) << "KatanaEngine::setupRoutingPlanes()" << endl;
bool sessionReUse = Session::isOpen();
if (not sessionReUse) openSession();
size_t maxDepth = getConfiguration()->getRoutingGauge()->getDepth();
_routingPlanes.reserve( maxDepth );
for ( size_t depth=0 ; depth < maxDepth ; depth++ ) {
_routingPlanes.push_back( RoutingPlane::create( this, depth ) );
}
if (not sessionReUse) Session::close();
}
KatanaEngine* KatanaEngine::create ( Cell* cell ) KatanaEngine* KatanaEngine::create ( Cell* cell )
{ {
KatanaEngine* katana = new KatanaEngine ( cell ); KatanaEngine* katana = new KatanaEngine ( cell );

View File

@ -462,9 +462,10 @@ namespace Katana {
fsm.getData()->incRipupCount(); fsm.getData()->incRipupCount();
cdebug_log(159,0) << "| Candidate Tracks:" << endl;
size_t itrack = 0; size_t itrack = 0;
for ( itrack = 0 ; itrack < fsm.getCosts().size() ; itrack++ ) for ( itrack = 0 ; itrack < fsm.getCosts().size() ; itrack++ )
cdebug_log(159,0) << "| " << fsm.getCost(itrack) << endl; cdebug_log(159,0) << "| " << itrack << ":" << fsm.getCost(itrack) << endl;
itrack = 0; itrack = 0;
if ( (not isOverConstrained()) and Manipulator(_segment,fsm).canRipup() ) { if ( (not isOverConstrained()) and Manipulator(_segment,fsm).canRipup() ) {

View File

@ -102,10 +102,12 @@ namespace Katana {
void protectRoutingPads (); void protectRoutingPads ();
void preProcess (); void preProcess ();
void setInterrupt ( bool ); void setInterrupt ( bool );
void setupRoutingPlanes ();
void setupGlobalGraph ( unsigned int mode ); void setupGlobalGraph ( unsigned int mode );
void annotateGlobalGraph (); void annotateGlobalGraph ();
void setFixedPreRouted (); void setFixedPreRouted ();
void digitalInit (); void digitalInit ();
void analogInit ();
void runNegociate ( unsigned int flags=Flags::NoFlags ); void runNegociate ( unsigned int flags=Flags::NoFlags );
void runGlobalRouter (); void runGlobalRouter ();
virtual void finalizeLayout (); virtual void finalizeLayout ();

View File

@ -65,7 +65,7 @@ namespace Katana {
Key ( const RoutingEvent* ); Key ( const RoutingEvent* );
void update ( const RoutingEvent* ); void update ( const RoutingEvent* );
private: private:
unsigned int _tracksNb:6; unsigned int _tracksNb:16;
float _priority; float _priority;
unsigned int _eventLevel; unsigned int _eventLevel;
unsigned int _segFlags; unsigned int _segFlags;
@ -188,8 +188,8 @@ namespace Katana {
Interval _constraints; Interval _constraints;
Interval _optimal; Interval _optimal;
//Interval _perpandicular; //Interval _perpandicular;
unsigned int _tracksNb : 6; unsigned int _tracksNb :16;
unsigned int _tracksFree : 4; unsigned int _tracksFree :16;
unsigned int _insertState : 6; unsigned int _insertState : 6;
unsigned int _mode : 4; unsigned int _mode : 4;
unsigned int _rippleState : 4; unsigned int _rippleState : 4;

View File

@ -10,7 +10,7 @@
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./katana/Session.h" | // | C++ Header : "./katana/Session.h" |
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
@ -62,6 +62,7 @@ namespace Katana {
public: public:
static Session* get ( const char* message=NULL ); static Session* get ( const char* message=NULL );
inline static Super* base (); inline static Super* base ();
inline static bool isOpen ();
inline static bool isEmpty (); inline static bool isEmpty ();
inline static KatanaEngine* getKatanaEngine (); inline static KatanaEngine* getKatanaEngine ();
static Configuration* getConfiguration (); static Configuration* getConfiguration ();
@ -173,6 +174,9 @@ namespace Katana {
inline size_t Session::revalidate () inline size_t Session::revalidate ()
{ return get("revalidate()")->_revalidate(); } { return get("revalidate()")->_revalidate(); }
inline bool Session::isOpen ()
{ return get() != NULL; }
inline bool Session::isEmpty () inline bool Session::isEmpty ()
{ return get("isEmpty()")->_isEmpty(); } { return get("isEmpty()")->_isEmpty(); }