From 974b29b8a75903311469c9e894a1bd90977c5872 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 12 Apr 2010 11:24:57 +0000 Subject: [PATCH] * ./kite: - Change: In TrackSegment, _postDogLeg() & _postModify(), add segments to "Ring" if they are directly connected to a RoutingPad. To maintain the "border effect" after a topological slackening. - Change: In GraphicKiteEngine, in the global routing relateds menus, suppress the mention of "solution" as it might be unclear for an average user. (just "Save Global Routing" or "Load Global Routing"). - Change: In RoutingEvent, conflictSolve1() tries to move up "other" blocking segment before trying to break "self". - Bug: In TrackSegment::reschedule(), remove from Track segments that are now in a greater order than the current one. This bug was shown in the TrackSegment::_postModify() method after a desalignate. It was causing overlaps and/or routing completion false reports. --- kite/src/GraphicKiteEngine.cpp | 8 ++++---- kite/src/NegociateWindow.cpp | 3 ++- kite/src/RoutingEvent.cpp | 19 +++++++++++++++++-- kite/src/TrackSegment.cpp | 31 ++++++++++++++++++++++++++++++- 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/kite/src/GraphicKiteEngine.cpp b/kite/src/GraphicKiteEngine.cpp index 9dc361b2..adc8ace7 100644 --- a/kite/src/GraphicKiteEngine.cpp +++ b/kite/src/GraphicKiteEngine.cpp @@ -286,14 +286,14 @@ namespace Kite { if ( dRouteAction ) cerr << Warning("GraphicKiteEngine::addToMenu() - Kite detailed router already hooked in.") << endl; else { - QAction* gLoadSolutionAction = new QAction ( tr("Kite - &Load Global Solution"), _viewer ); - gLoadSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.loadSolution" ); + QAction* gLoadSolutionAction = new QAction ( tr("Kite - &Load Global Routing"), _viewer ); + gLoadSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.loadGlobalRouting" ); gLoadSolutionAction->setStatusTip ( tr("Load a solution for the global routing (.kgr)") ); gLoadSolutionAction->setVisible ( true ); stepMenu->addAction ( gLoadSolutionAction ); - QAction* gSaveSolutionAction = new QAction ( tr("Kite - &Save Global Solution"), _viewer ); - gSaveSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.saveSolution" ); + QAction* gSaveSolutionAction = new QAction ( tr("Kite - &Save Global Routing"), _viewer ); + gSaveSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.saveGlobalRouting" ); gSaveSolutionAction->setStatusTip ( tr("Save a global router solution (.kgr)") ); gSaveSolutionAction->setVisible ( true ); stepMenu->addAction ( gSaveSolutionAction ); diff --git a/kite/src/NegociateWindow.cpp b/kite/src/NegociateWindow.cpp index 78aa02f7..d7d6ee20 100644 --- a/kite/src/NegociateWindow.cpp +++ b/kite/src/NegociateWindow.cpp @@ -368,7 +368,8 @@ namespace Kite { cmess1.flush (); } else { cmess2 << " " + << RoutingEvent::getProcesseds() << setfill(' ') << "> id:" + << event->getSegment()->getId() << " " << event->getSegment()->getNet()->getName() << endl; cmess2.flush(); diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index 93967ac0..168f9577 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -1188,6 +1188,16 @@ namespace { Interval overlap0 = candidates[icandidate].getConflict(0); if ( candidates[icandidate].getLength() == 1 ) { + Track* track = candidates[icandidate].getTrack(); + TrackElement* other = track->getSegment(candidates[icandidate].getBegin()); + + if ( other->isGlobal() + and (other->getDataNegociate()->getGCellOrder() == Session::getOrder()) + and other->canMoveUp() ) { + ltrace(200) << "conflictSolve1() - One conflict, other move up" << endl; + if ( (success = other->moveUp()) ) break; + } + ltrace(200) << "conflictSolve1() - One conflict, relaxing self" << endl; if ( Manipulator(segment,*this).relax(overlap0,relaxFlags) ) { @@ -1233,7 +1243,7 @@ namespace { //if ( track && (track->getAxis() < constraints.getVMin()) ) track = track->getNext(); //for ( ; !success && track && (track->getAxis() <= constraints.getVMax()) ; track = track->getNext() ) - if ( !success && constraintByPerpandiculars ) { + if ( not success and constraintByPerpandiculars ) { ltrace(200) << "Overconstrained perpandiculars, rip them up. On track:" << endl; ltrace(200) << " " << track << endl; Manipulator(segment,*this).ripupPerpandiculars (); @@ -1355,6 +1365,8 @@ namespace { bool State::slackenTopology ( TrackElement* segment, unsigned int flags ) { + DebugSession::open ( segment->getNet() ); + bool success = false; bool blocked = false; bool repush = true; @@ -1365,7 +1377,7 @@ namespace { << " " << segment << endl; ltracein(200); - if ( (not segment) or (not data) ) { ltraceout(200); return false; } + if ( (not segment) or (not data) ) { ltraceout(200); DebugSession::close(); return false; } if ( segment == _event->getSegment() ) _event->resetInsertState(); if ( not (data->isBorder() or data->isRing()) ) { @@ -1374,6 +1386,7 @@ namespace { if ( not Manipulator(segment,*this).canRipup() ) { cerr << "[UNSOLVED] " << segment << " slacken topology not allowed for border/ring." << endl; ltraceout(200); + DebugSession::close (); return false; } } @@ -1387,6 +1400,7 @@ namespace { } else { ltrace(200) << "Refusing to slacken border segment." << endl; ltraceout(200); + DebugSession::close (); return false; } } @@ -1612,6 +1626,7 @@ namespace { } ltraceout(200); + DebugSession::close (); return success; } diff --git a/kite/src/TrackSegment.cpp b/kite/src/TrackSegment.cpp index f89c30e7..19d76dc8 100644 --- a/kite/src/TrackSegment.cpp +++ b/kite/src/TrackSegment.cpp @@ -31,6 +31,7 @@ #include "hurricane/Warning.h" #include "hurricane/Net.h" #include "hurricane/Name.h" +#include "hurricane/RoutingPad.h" #include "katabatic/AutoContact.h" #include "crlcore/RoutingGauge.h" #include "kite/GCell.h" @@ -57,6 +58,7 @@ namespace Kite { using Hurricane::Error; using Hurricane::Net; using Hurricane::Name; + using Hurricane::RoutingPad; // ------------------------------------------------------------------- @@ -532,6 +534,11 @@ namespace Kite { } else { if ( _data and _data->hasRoutingEvent() ) _data->getRoutingEvent()->setDisabled(); + + if ( getOrder() > Session::getOrder() ) { + if ( _track != NULL ) + Session::addRemoveEvent ( this ); + } } ltraceout(200); } @@ -1000,6 +1007,16 @@ namespace Kite { ltrace(200) << "Adding to ring: " << segments[i] << endl; Session::getNegociateWindow()->addToRing ( segments[i] ); } + } else { + if ( segments[i]->getOrder() > Session::getOrder()) { + AutoContact* source = segments[i]->base()->getAutoSource(); + AutoContact* target = segments[i]->base()->getAutoTarget(); + if ( (source and dynamic_cast(source->getAnchor())) + or (target and dynamic_cast(target->getAnchor()))) { + ltrace(200) << "Adding to ring: " << segments[i] << endl; + Session::getNegociateWindow()->addToRing ( segments[i] ); + } + } } //if ( i == 1 ) { // RoutingEvent* event = segments[i]->getDataNegociate()->getRoutingEvent(); @@ -1041,7 +1058,9 @@ namespace Kite { #if ENABLE_STIFFNESS updateGCellsStiffness ( TrackElement::RemoveFromGCells ); #endif + _base->desalignate (); + #if ENABLE_STIFFNESS updateGCellsStiffness ( TrackElement::AddToGCells ); #endif @@ -1081,7 +1100,7 @@ namespace Kite { unsigned int perpandicularDir = Constant::perpandicular ( parallelDir ); const vector& invalidateds = Session::getInvalidateds(); - vector segments; + vector segments; if ( not invalidateds.empty() ) { for ( size_t i=0 ; ireschedule ( 0 ); } + } else if ( segment->getDataNegociate()->getGCellOrder() > Session::getOrder()) { + if ( segment->getDirection() == parallelDir ) { + AutoContact* source = segment->base()->getAutoSource(); + AutoContact* target = segment->base()->getAutoTarget(); + if ( (source and dynamic_cast(source->getAnchor())) + or (target and dynamic_cast(target->getAnchor()))) { + ltrace(200) << "Adding to ring: " << segment << endl; + Session::getNegociateWindow()->addToRing ( segment ); + } + } } }