Upgrade of Katana for support of real technologies.
* Bug: In Katana::PreProcess::protectCagedTerminals(), the contacts of the fixed segment must be fixed too. * Change: In Katana::RoutingPlane constructor, more accurate computation of the extensionCap (for real technologies). * Bug: In Katana::DataNegociate::update(), the perpandicular free interval must be shrunk of the extensionCap of the perpandicular layer. This problem did show with metal1 "half-offgrid" terminals. * Change: In Katana::runGlobalRouter(), increase the number of ripup passes to ten. Display the overloaded edges and the related nets.
This commit is contained in:
parent
9b2648241d
commit
757451b324
|
@ -145,7 +145,7 @@ namespace Katana {
|
|||
Interval trackFree = perpandicular->getFreeInterval();
|
||||
cdebug_log(159,0) << "Track Perpandicular Free: " << trackFree << endl;
|
||||
|
||||
_perpandicularFree.intersection( trackFree );
|
||||
_perpandicularFree.intersection( trackFree.inflate(-perpandicular->getExtensionCap()) );
|
||||
} else {
|
||||
cdebug_log(159,0) << "Not in any track " << perpandicular << endl;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace {
|
|||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::dec;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
using std::left;
|
||||
|
@ -76,17 +77,18 @@ namespace {
|
|||
viaCost += 2.5;
|
||||
}
|
||||
|
||||
float distance = (float)source->getDistance()
|
||||
+ (congestionCost + viaCost) * (float)edge->getDistance()
|
||||
+ edge->getHistoricCost();
|
||||
float hvDistort = (edge->isHorizontal()) ? 1.0 : 1.0 ;
|
||||
float distance = (float)source->getDistance()
|
||||
+ (congestionCost + viaCost) * (float)edge->getDistance() * hvDistort
|
||||
+ edge->getHistoricCost();
|
||||
|
||||
// Edge* sourceFrom = source->getFrom();
|
||||
// if (sourceFrom) {
|
||||
// distance += ((sourceFrom->isHorizontal() xor edge->isHorizontal()) ? 3.0 : 0.0) * (float)Edge::unity;
|
||||
// }
|
||||
cdebug_log(112,0) << "cong:" << congestion
|
||||
<< " ccost:" << congestionCost
|
||||
<< " digitalDistance:" << DbU::getValueString((DbU::Unit)distance) << endl;
|
||||
// cdebug_log(112,0) << "cong:" << congestion
|
||||
// << " ccost:" << congestionCost
|
||||
// << " digitalDistance:" << DbU::getValueString((DbU::Unit)distance) << endl;
|
||||
|
||||
return (DbU::Unit)distance;
|
||||
}
|
||||
|
@ -185,10 +187,11 @@ namespace Katana {
|
|||
float edgeHInc = getConfiguration()->getEdgeHInc();
|
||||
|
||||
openSession();
|
||||
Dijkstra* dijkstra = new Dijkstra ( this );
|
||||
DigitalDistance* distance =
|
||||
Dijkstra* dijkstra = new Dijkstra ( this );
|
||||
DigitalDistance* distance =
|
||||
dijkstra->setDistance( DigitalDistance( getConfiguration()->getEdgeCostH()
|
||||
, getConfiguration()->getEdgeCostK() ));
|
||||
const vector<Edge*>& ovEdges = getOvEdges();
|
||||
|
||||
if (isChannelMode())
|
||||
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*2 );
|
||||
|
@ -208,29 +211,32 @@ namespace Katana {
|
|||
++netCount;
|
||||
}
|
||||
cmess2 << left << setw(6) << netCount;
|
||||
|
||||
const vector<Edge*>& ovEdges = getOvEdges();
|
||||
cmess2 << " ovEdges:" << setw(4) << ovEdges.size();
|
||||
|
||||
for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc );
|
||||
// Session::close();
|
||||
// Breakpoint::stop( 1, "Before riping up overflowed edges." );
|
||||
// openSession();
|
||||
|
||||
netCount = 0;
|
||||
size_t iEdge = 0;
|
||||
while ( iEdge < ovEdges.size() ) {
|
||||
Edge* edge = ovEdges[iEdge];
|
||||
netCount += edge->ripup();
|
||||
if (iteration < 10 - 1) {
|
||||
size_t iEdge = 0;
|
||||
while ( iEdge < ovEdges.size() ) {
|
||||
Edge* edge = ovEdges[iEdge];
|
||||
netCount += edge->ripup();
|
||||
|
||||
if (ovEdges.empty()) break;
|
||||
if (ovEdges[iEdge] == edge) {
|
||||
cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n"
|
||||
if (ovEdges.empty()) break;
|
||||
if (ovEdges[iEdge] == edge) {
|
||||
cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n"
|
||||
" %s"
|
||||
, getString(edge).c_str()
|
||||
) << endl;
|
||||
++iEdge;
|
||||
, getString(edge).c_str()
|
||||
) << endl;
|
||||
++iEdge;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 );
|
||||
dijkstra->setSearchAreaHalo( Session::getSliceHeight()*3 );
|
||||
}
|
||||
|
||||
cmess2 << " ripup:" << setw(4) << netCount << right;
|
||||
suspendMeasures();
|
||||
|
@ -239,11 +245,27 @@ namespace Katana {
|
|||
resumeMeasures();
|
||||
|
||||
++iteration;
|
||||
} while ( (netCount > 0) and (iteration < 5) );
|
||||
} while ( (netCount > 0) and (iteration < 10) );
|
||||
|
||||
stopMeasures();
|
||||
printMeasures( "Dijkstra" );
|
||||
|
||||
if (not ovEdges.empty()) {
|
||||
set< const Net*, Net::CompareByName > nets;
|
||||
|
||||
cerr << " o Global routing did not complete, overflowed edges:" << endl;
|
||||
for ( size_t iEdge = 0 ; iEdge<ovEdges.size() ; ++iEdge ) {
|
||||
cerr << " " << dec << setw(4) << (iEdge+1) << "| " << ovEdges[iEdge] << endl;
|
||||
for ( Segment* segment : ovEdges[iEdge]->getSegments() )
|
||||
nets.insert( segment->getNet() );
|
||||
}
|
||||
|
||||
cerr << " o Conflicting nets:" << endl;
|
||||
size_t count = 0;
|
||||
for ( const Net* net : nets )
|
||||
cerr << " " << dec << setw(4) << (++count) << "| " << net->getName() << endl;
|
||||
}
|
||||
|
||||
if (getBlock(0)) {
|
||||
getBlock(0)->resizeChannels();
|
||||
_resizeMatrix();
|
||||
|
|
|
@ -617,7 +617,7 @@ namespace Katana {
|
|||
}
|
||||
Session::revalidate();
|
||||
_computePriorities();
|
||||
|
||||
|
||||
if (not (flags & Flags::PreRoutedStage)) {
|
||||
_katana->preProcess();
|
||||
Session::revalidate();
|
||||
|
|
|
@ -299,7 +299,7 @@ namespace {
|
|||
, rp->getSourcePosition()
|
||||
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
||||
);
|
||||
source->setFlags( Anabatic::CntIgnoreAnchor );
|
||||
source->setFlags( Anabatic::CntIgnoreAnchor|Anabatic::CntFixed );
|
||||
|
||||
Anabatic::AutoContact* target =
|
||||
Anabatic::AutoContactTerminal::create( support->getGCell()
|
||||
|
@ -308,7 +308,7 @@ namespace {
|
|||
, rp->getSourcePosition()
|
||||
, DbU::fromLambda(1.0), DbU::fromLambda(1.0)
|
||||
);
|
||||
target->setFlags( Anabatic::CntIgnoreAnchor );
|
||||
target->setFlags( Anabatic::CntIgnoreAnchor|Anabatic::CntFixed );
|
||||
|
||||
AutoSegment* fixedSegment = AutoSegment::create( source, target, Flags::Vertical );
|
||||
fixedSegment->setFlags( AutoSegment::SegFixed );
|
||||
|
|
|
@ -100,22 +100,21 @@ namespace Katana {
|
|||
uint32_t gaugeDepth = 0;
|
||||
if (Session::getLayerGauge(gaugeDepth)->getType() == Constant::PinOnly) ++gaugeDepth;
|
||||
|
||||
bool HV = (Session::getLayerGauge(gaugeDepth)->getDirection() == Constant::Horizontal);
|
||||
hExtension = Session::getLayerGauge( gaugeDepth + (HV?1:0) )->getPitch() / 2;
|
||||
vExtension = Session::getLayerGauge( gaugeDepth + (HV?0:1) )->getPitch() / 2;
|
||||
DbU::Unit extensionCap = ( std::max( Session::getWireWidth(depth), Session::getViaWidth(depth) )
|
||||
+ Session::getPitch(depth) ) / 2;
|
||||
|
||||
size_t trackNumber;
|
||||
Box abutmentBox = katana->getCell()->getAbutmentBox();
|
||||
// HARD CODED.
|
||||
if (plane->getDirection() == Flags::Horizontal) {
|
||||
plane->_trackMin = abutmentBox.getXMin() - hExtension;
|
||||
plane->_trackMax = abutmentBox.getXMax() + hExtension;
|
||||
plane->_trackMin = abutmentBox.getXMin() - extensionCap;
|
||||
plane->_trackMax = abutmentBox.getXMax() + extensionCap;
|
||||
plane->_axisMin = abutmentBox.getYMin();
|
||||
plane->_axisMax = abutmentBox.getYMax();
|
||||
trackNumber = plane->computeTracksSize();
|
||||
} else {
|
||||
plane->_trackMin = abutmentBox.getYMin() - vExtension;
|
||||
plane->_trackMax = abutmentBox.getYMax() + vExtension;
|
||||
plane->_trackMin = abutmentBox.getYMin() - extensionCap;
|
||||
plane->_trackMax = abutmentBox.getYMax() + extensionCap;
|
||||
plane->_axisMin = abutmentBox.getXMin();
|
||||
plane->_axisMax = abutmentBox.getXMax();
|
||||
trackNumber = plane->computeTracksSize();
|
||||
|
|
|
@ -161,6 +161,7 @@ namespace Katana {
|
|||
uint32_t TrackElement::getTrackCount () const { return 0; }
|
||||
DbU::Unit TrackElement::getPitch () const { return 0; }
|
||||
DbU::Unit TrackElement::getPPitch () const { return 0; }
|
||||
DbU::Unit TrackElement::getExtensionCap () const { return 0; }
|
||||
float TrackElement::getMaxUnderDensity ( Flags ) const { return 0.0; };
|
||||
uint32_t TrackElement::getDoglegLevel () const { return 0; }
|
||||
TrackElement* TrackElement::getParent () const { return NULL; }
|
||||
|
|
|
@ -180,6 +180,7 @@ namespace Katana {
|
|||
const Layer* TrackSegment::getLayer () const { return _base->getLayer(); }
|
||||
DbU::Unit TrackSegment::getPitch () const { return _base->getPitch(); }
|
||||
DbU::Unit TrackSegment::getPPitch () const { return _ppitch; }
|
||||
DbU::Unit TrackSegment::getExtensionCap () const { return _base->getExtensionCap(); }
|
||||
DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); }
|
||||
unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; }
|
||||
float TrackSegment::getPriority () const { return _priority; }
|
||||
|
|
|
@ -150,6 +150,7 @@ namespace Katana {
|
|||
inline Box getBoundingBox () const;
|
||||
virtual TrackElement* getNext () const;
|
||||
virtual TrackElement* getPrevious () const;
|
||||
virtual DbU::Unit getExtensionCap () const;
|
||||
virtual DbU::Unit getAxis () const = 0;
|
||||
inline DbU::Unit getSymmetricAxis ( DbU::Unit ) const;
|
||||
inline DbU::Unit getSourceU () const;
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace Katana {
|
|||
virtual const Layer* getLayer () const;
|
||||
virtual DbU::Unit getPitch () const;
|
||||
virtual DbU::Unit getPPitch () const;
|
||||
virtual DbU::Unit getExtensionCap () const;
|
||||
virtual unsigned long getFreedomDegree () const;
|
||||
virtual float getPriority () const;
|
||||
virtual uint32_t getDoglegLevel () const;
|
||||
|
|
Loading…
Reference in New Issue