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]
<< " " << DbU::toLambda(aligneds[0]->getAxis()) << endl;
<< " " << DbU::getValueString(aligneds[0]->getAxis()) << endl;
aligneds[0]->setAxis( aligneds[0]->getAxis(), Flags::Realignate );
aligneds.clear();

View File

@ -89,10 +89,10 @@ namespace Anabatic {
restoreNativeConstraintBox();
cdebug_log(145,0) << "Native CBox: " << this
<< " <" << DbU::toLambda(getCBXMin())
<< " " << DbU::toLambda(getCBYMin())
<< " " << DbU::toLambda(getCBXMax())
<< " " << DbU::toLambda(getCBYMax()) << ">" << endl;
<< " <" << DbU::getValueString(getCBXMin())
<< " " << DbU::getValueString(getCBYMin())
<< " " << DbU::getValueString(getCBXMax())
<< " " << DbU::getValueString(getCBYMax()) << ">" << endl;
Session::link( this );
invalidate( Flags::Topology );
@ -221,7 +221,8 @@ namespace Anabatic {
DbU::Unit sideLength = (segment->isHorizontal()) ? hSideLength : vSideLength;
if ( not segment->isUnbound() and (abs(length) > sideLength) )
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 {
if (segment->isHorizontal()) {
if (isSourceHook)

View File

@ -389,7 +389,7 @@ namespace Anabatic {
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 );
invalidate();

View File

@ -198,7 +198,7 @@ namespace {
_attractors[position]++;
_attractorsCount++;
cdebug_log(145,0) << "add Attractor @" << DbU::toLambda(position)
cdebug_log(145,0) << "add Attractor @" << DbU::getValueString(position)
<< " [" << _attractors[position] << "]" << endl;
}
@ -814,6 +814,9 @@ namespace Anabatic {
DbU::Unit optimalMin = max( min(getOptimalMin(),constraintMax), constraintMin );
DbU::Unit optimalMax = min( max(getOptimalMax(),constraintMin), constraintMax );
cdebug_log(149,0) << "optimal:[" << DbU::getValueString(optimalMin)
<< " " << DbU::getValueString(optimalMin) << "]" << endl;
if (getAxis() < optimalMin) {
setAxis( optimalMin, flags );
cdebug_tabw(149,-1);
@ -840,8 +843,8 @@ namespace Anabatic {
if ( (axis == getAxis()) and not (flags & Flags::Realignate) ) return;
cdebug_log(159,0) << "setAxis() @"
<< ((isHorizontal())?"Y ":"X ") << DbU::toLambda(getAxis())
<< " to " << DbU::toLambda(axis) << " on " << this << endl;
<< ((isHorizontal())?"Y ":"X ") << DbU::getValueString(getAxis())
<< " to " << DbU::getValueString(axis) << " on " << this << endl;
cdebug_tabw(145,1);
_setAxis( axis );
@ -955,8 +958,25 @@ namespace Anabatic {
}
forEach( AutoSegment*, autoSegment, getPerpandiculars() ) {
cdebug_log(145,1) << "Perpandicular " << *autoSegment << endl;
if (autoSegment->isLocal()) {
cdebug_log(145,1) << "| Perpandicular " << *autoSegment << endl;
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; }
DbU::Unit terminalMin;
@ -971,30 +991,13 @@ namespace Anabatic {
if (terminalMin != 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);
}
if (attractors.getAttractorsCount()) {
cdebug_log(145,0) << "Lower Median " << DbU::toLambda(attractors.getLowerMedian()) << endl;
cdebug_log(145,0) << "Upper Median " << DbU::toLambda(attractors.getUpperMedian()) << endl;
cdebug_log(145,0) << "Lower Median " << DbU::getValueString(attractors.getLowerMedian()) << endl;
cdebug_log(145,0) << "Upper Median " << DbU::getValueString(attractors.getUpperMedian()) << endl;
optimalMin = attractors.getLowerMedian();
optimalMax = attractors.getUpperMedian();
@ -1959,6 +1962,7 @@ namespace Anabatic {
state += isCanonical () ? "C": "-";
state += isGlobal () ? "G": "-";
state += isWeakGlobal () ? "g": "-";
state += isLongLocal () ? "L": "-";
state += isStrongTerminal() ? "T": "-";
state += isWeakTerminal1 () ? "W": "-";
state += isWeakTerminal2 () ? "w": "-";

View File

@ -73,6 +73,8 @@ namespace Anabatic {
setOptimalMax( getGCell()->getXMax() );
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()) {
setFlags( SegGlobal );
@ -326,7 +328,7 @@ namespace Anabatic {
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 );
invalidate();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -112,8 +112,6 @@ namespace Katana {
cell->flattenNets( Cell::Flags::BuildRings|Cell::Flags::WarnOnUnplacedInstances );
cell->createRoutingPadRings( Cell::Flags::BuildRings );
Super::chipPrep();
startMeasures();
@ -128,8 +126,6 @@ namespace Katana {
stopMeasures();
printMeasures( "Anabatic Grid" );
//setupSpecialNets();
//setupPreRouteds();
setupNetDatas();
for ( GCell* gcell : getGCells() ) {
@ -140,14 +136,6 @@ namespace Katana {
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();
QRect pixelBb = widget->dbuToScreenRect(bb);
if (gcell->isFlat()) return;
if (GCell::getDisplayMode() == GCell::Density) {
unsigned int density = (unsigned int)( 255.0 * gcell->getDensity() );
if (density > 255) density = 255;
@ -94,12 +92,12 @@ namespace Katana {
painter.setBrush( Graphics::getColorScale( ColorScale::Fire ).getBrush( density, widget->getDarkening() ) );
painter.drawRect( pixelBb );
} else {
if (pixelBb.width() > 150) {
if ( (pixelBb.width() > 150) or (pixelBb.height() > 150) ) {
painter.setPen ( pen );
painter.setBrush( Graphics::getBrush("Anabatic::GCell",widget->getDarkening()) );
painter.drawRect( pixelBb );
if (pixelBb.width() > 300) {
if ( (pixelBb.width() > 300) and (pixelBb.height() > 100) ) {
QString text = QString("id:%1").arg(gcell->getId());
QFont font = Graphics::getFixedFont( QFont::Bold );
painter.setFont(font);
@ -109,8 +107,8 @@ namespace Katana {
painter.save ();
painter.translate( widget->dbuToScreenPoint(bb.getCenter().getX(), bb.getCenter().getY()) );
painter.drawRect (QRect( -75, -25, 150, 50 ));
painter.drawText (QRect( -75, -25, 150, 50 )
painter.drawRect ( QRect( -80, -25, 160, 50 ) );
painter.drawText ( QRect( -80, -25, 160, 50 )
, text
, QTextOption(Qt::AlignCenter)
);

View File

@ -147,7 +147,10 @@ namespace Katana {
{
cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl;
Super::chipPrep();
setupGlobalGraph( Flags::NoFlags );
setupRoutingPlanes();
setupSpecialNets();
setupPreRouteds();
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* katana = new KatanaEngine ( cell );

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
// | Author : Jean-Paul CHAPUT |
// | 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:
static Session* get ( const char* message=NULL );
inline static Super* base ();
inline static bool isOpen ();
inline static bool isEmpty ();
inline static KatanaEngine* getKatanaEngine ();
static Configuration* getConfiguration ();
@ -173,6 +174,9 @@ namespace Katana {
inline size_t Session::revalidate ()
{ return get("revalidate()")->_revalidate(); }
inline bool Session::isOpen ()
{ return get() != NULL; }
inline bool Session::isEmpty ()
{ return get("isEmpty()")->_isEmpty(); }