* ./kite:
- New: In RoutingEvent, while routing a full chip, transient full blockages may happens due to the initial position of some perpandiculars on theirs optimal positions. Check for it and perform a "ripupPerpandicular" with the perpandiculars re-routed first (on normal operation, this is the reverse). - Change: In NegociateWindow::NegociateOverlapCost(), do not account terminals if the layer is *above* METAL3 as it is unlikely that it's truly directly connected to a terminal (true at least for our designs). - Change: In RoutingEvent::State, add a "fullBlocked" flag to perform the full blockage direction while building the state object. - Change: In RoutingEvent::cacheAxisHint(), when the TrackSegment has parent, uses the parent current axis position and not it's axis hint. - Change: In Manipulator::insertInTrack(), when the overlapped segment is a Local and is completly enclosed (shrinkLeft & shrinkRight), no longer rip it up but force a shrink left/right instead. - Bug: In RoutingEvent, the event sorting function was sorting in the *wrong* order! The less prioritary first! With the correct sort, we won an additionnal 30% in speed (total: 69%). From the "reference" time we have a 3.2 speed-up. And we can successfully process denser designs...
This commit is contained in:
parent
0df293655a
commit
c19429108e
|
@ -461,10 +461,9 @@ namespace Kite {
|
|||
//DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_gi_1_29" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instaddbracry_sd.gi_1_29" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instseqadr_sd.pi_2_26" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_pi_3_29" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_res_se(28)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.etat32_otheri_sd_2.enx" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.yoper_se(13)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.yoper_se(31)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.toper_se(5)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.soper_se(20)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.shift32_rshift_se.muxoutput(68)" );
|
||||
|
@ -473,7 +472,6 @@ namespace Kite {
|
|||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.res_re(20)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.nextpc_rd(21)" );
|
||||
//DebugSession::addToTrace ( getCell(), "addr_i(1)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_rd(1)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.otheri_sd(29)" );
|
||||
//DebugSession::addToTrace ( getCell(), "d_in_i(22)" );
|
||||
//DebugSession::addToTrace ( getCell(), "ng_i" );
|
||||
|
@ -481,28 +479,40 @@ namespace Kite {
|
|||
//DebugSession::addToTrace ( getCell(), "d_out_i(19)" );
|
||||
//DebugSession::addToTrace ( getCell(), "dout_e_i(1)" );
|
||||
//DebugSession::addToTrace ( getCell(), "dout_e_i(2)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux44" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.na4_x1_11_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.nxr2_x1_7_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux178" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.nxr2_x1_2_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.na4_x1_23_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.ao22_x2_38_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.rsdnbr_sd(14)" );
|
||||
//DebugSession::addToTrace ( getCell(), "d_out_i(28)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_1m_ct_mbk_buf_opcod_sd_0" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.break_re" );
|
||||
//DebugSession::addToTrace ( getCell(), "d_atype_i(0)" );
|
||||
//DebugSession::addToTrace ( getCell(), "addr_i(0)" );
|
||||
//DebugSession::addToTrace ( getCell(), "addr_i(7)" );
|
||||
//DebugSession::addToTrace ( getCell(), "addr_i(8)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_sd_5" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_sd_1" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_rd(1)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.i_write_sm" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_i_ri(11)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_i_ri(29)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_rd(0)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.no4_x1_7_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.on12_x1_15_sig" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.nextsr_rx(27)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_wsr_sm" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.i_ri(5)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_aux144" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_aux143" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux78" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux71" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_hold_si" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_i_ri(30)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.data_rm(0)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.toper_se(0)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.res_se(17)" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_0_20" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_2_23" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_2_23" );
|
||||
//DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_1_21" );
|
||||
|
||||
createDetailedGrid ();
|
||||
buildPowerRails ();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | K i t e - D e t a i l e d R o u t e r |
|
||||
|
@ -20,7 +20,7 @@
|
|||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <vector>
|
||||
|
@ -110,7 +110,8 @@ namespace {
|
|||
// }
|
||||
|
||||
cost.setOverlap ();
|
||||
cost.incTerminals ( data->getCost().getTerminals()*100 );
|
||||
if ( segment->isLocal() or (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3) )
|
||||
cost.incTerminals ( data->getCost().getTerminals()*100 );
|
||||
cost.incDelta ( intersect.getSize() );
|
||||
}
|
||||
|
||||
|
@ -387,21 +388,24 @@ namespace Kite {
|
|||
while ( not _eventQueue.empty() and not isInterrupted() ) {
|
||||
RoutingEvent* event = _eventQueue.pop ();
|
||||
|
||||
event->process ( _eventQueue, _eventHistory, _eventLoop );
|
||||
if (tty::enabled()) {
|
||||
cmess2 << " <event:" << tty::bold << setw(7) << setfill('0')
|
||||
<< RoutingEvent::getProcesseds() << setfill(' ') << tty::reset << ">" << tty::cr;
|
||||
cmess2.flush ();
|
||||
} else {
|
||||
cmess2 << " <event:" << setw(7) << setfill('0')
|
||||
<< RoutingEvent::getProcesseds() << setfill(' ') << "> @"
|
||||
<< DbU::getValueString(event->getSegment()->getAxis()) << " id:"
|
||||
<< event->getSegment()->getId() << " "
|
||||
<< event->getSegment()->getNet()->getName()
|
||||
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
|
||||
<< event->getEventLevel() << ":" << event->getPriority() << "> "
|
||||
<< event->getSegment()
|
||||
//<< "> @" << DbU::getValueString(event->getSegment()->getAxis())
|
||||
//<< " id:" << event->getSegment()->getId()
|
||||
//<< " " << event->getSegment()->getNet()->getName()
|
||||
<< endl;
|
||||
cmess2.flush();
|
||||
}
|
||||
|
||||
event->process ( _eventQueue, _eventHistory, _eventLoop );
|
||||
|
||||
if ( RoutingEvent::getProcesseds() >= limit ) setInterrupt ( true );
|
||||
count++;
|
||||
}
|
||||
|
|
|
@ -869,6 +869,7 @@ namespace {
|
|||
, RoutingEventQueue&
|
||||
, RoutingEventHistory&
|
||||
);
|
||||
inline bool isFullBlocked () const;
|
||||
inline RoutingEvent* getEvent ();
|
||||
inline RoutingEventQueue& getQueue ();
|
||||
inline RoutingEventHistory& getHistory ();
|
||||
|
@ -895,6 +896,7 @@ namespace {
|
|||
bool conflictSolve1_v1b ();
|
||||
bool conflictSolve1_v2 ();
|
||||
bool conflictSolve2 ();
|
||||
bool desaturate ();
|
||||
bool slackenTopology ( unsigned int flags=0 );
|
||||
bool solveFullBlockages ();
|
||||
|
||||
|
@ -908,6 +910,7 @@ namespace {
|
|||
Interval _optimal;
|
||||
vector<TrackCost> _costs;
|
||||
vector<SegmentAction> _actions;
|
||||
bool _fullBlocked;
|
||||
};
|
||||
|
||||
|
||||
|
@ -990,8 +993,10 @@ namespace {
|
|||
, _optimal ()
|
||||
, _costs ()
|
||||
, _actions ()
|
||||
, _fullBlocked (true)
|
||||
{
|
||||
TrackElement* segment = _event->getSegment();
|
||||
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment->getLayer());
|
||||
_event->setTracksFree ( 0 );
|
||||
|
||||
_data = segment->getDataNegociate();
|
||||
|
@ -1034,7 +1039,12 @@ namespace {
|
|||
ltrace(148) << "* Constraints: " << _constraint << endl;
|
||||
ltracein(148);
|
||||
|
||||
bool inLocalDepth = (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3);
|
||||
// if ( segment->isLocal() and (_data->getState() >= DataNegociate::MaximumSlack) )
|
||||
// _constraint.inflate ( 0, DbU::lambda(1.0) );
|
||||
|
||||
bool inLocalDepth = (depth < 3);
|
||||
bool isOneLocalTrack = (segment->isLocal())
|
||||
and (segment->base()->getAutoSource()->getGCell()->getGlobalsCount(depth) >= 9.0);
|
||||
|
||||
RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer());
|
||||
forEach ( Track*, itrack, Tracks_Range::get(plane,_constraint)) {
|
||||
|
@ -1045,7 +1055,15 @@ namespace {
|
|||
if ( inLocalDepth and (_costs.back().getDataState() == DataNegociate::MaximumSlack) )
|
||||
_costs.back().setInfinite ();
|
||||
|
||||
if ( isOneLocalTrack
|
||||
and _costs.back().isOverlapGlobal()
|
||||
and (_costs.back().getDataState() >= DataNegociate::ConflictSolve1) )
|
||||
_costs.back().setInfinite ();
|
||||
|
||||
_costs.back().consolidate ();
|
||||
if ( _fullBlocked and (not _costs.back().isBlockage() and not _costs.back().isFixed()) )
|
||||
_fullBlocked = false;
|
||||
|
||||
ltrace(149) << "| " << (*itrack) << " - " << _costs.back() << endl;
|
||||
}
|
||||
ltraceout(148);
|
||||
|
@ -1080,6 +1098,7 @@ namespace {
|
|||
}
|
||||
|
||||
|
||||
inline bool State::isFullBlocked () const { return _fullBlocked and _costs.size(); }
|
||||
inline RoutingEvent* State::getEvent () { return _event; }
|
||||
inline RoutingEventQueue& State::getQueue () { return _queue; }
|
||||
inline RoutingEventHistory& State::getHistory () { return _history; }
|
||||
|
@ -1612,59 +1631,97 @@ namespace {
|
|||
bool State::solveFullBlockages ()
|
||||
{
|
||||
bool success = false;
|
||||
bool blocked = (getCosts().size() > 0);
|
||||
TrackElement* segment = getEvent()->getSegment();
|
||||
|
||||
ltrace(200) << "State::solveFullBlockages: " << " " << segment << endl;
|
||||
ltracein(200);
|
||||
|
||||
for ( size_t itrack=0 ; itrack<getCosts().size() ; ++itrack ) {
|
||||
if ( (not getCost(itrack).isBlockage() and not getCost(itrack).isFixed()) ) {
|
||||
blocked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( blocked ) {
|
||||
if ( segment->isLocal() ) {
|
||||
success = Manipulator(segment,*this).pivotUp();
|
||||
if ( not success ) {
|
||||
ltrace(200) << "Tightly constrained local segment overlapping a blockage, move up." << endl;
|
||||
ltrace(200) << segment << endl;
|
||||
success = Manipulator(segment,*this).moveUp
|
||||
(Manipulator::AllowLocalMoveUp|Manipulator::AllowTerminalMoveUp);
|
||||
}
|
||||
} else {
|
||||
Interval overlap = segment->getCanonicalInterval();
|
||||
size_t begin;
|
||||
size_t end;
|
||||
|
||||
getCost(0).getTrack()->getOverlapBounds ( overlap, begin, end );
|
||||
for ( ; begin<end ; ++begin ) {
|
||||
TrackElement* other = getCost(0).getTrack()->getSegment(begin);
|
||||
Interval otherOverlap = other->getCanonicalInterval();
|
||||
|
||||
if ( other->getNet() == segment->getNet() ) continue;
|
||||
if ( not otherOverlap.intersect(overlap) ) continue;
|
||||
|
||||
ltrace(200) << "| " << begin << " Blockage conflict: " << " " << other << endl;
|
||||
if ( (success = Manipulator(segment,*this).relax
|
||||
(otherOverlap,Manipulator::NoDoglegReuse|Manipulator::NoExpand)) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( segment->isLocal() ) {
|
||||
success = Manipulator(segment,*this).pivotUp();
|
||||
if ( not success ) {
|
||||
cerr << "[ERROR] Tighly constrained segment overlapping a blockage." << endl;
|
||||
ltrace(200) << "Segment is hard blocked, bypass to Unimplemented." << endl;
|
||||
ltrace(200) << "Tightly constrained local segment overlapping a blockage, move up." << endl;
|
||||
ltrace(200) << segment << endl;
|
||||
success = Manipulator(segment,*this).moveUp
|
||||
(Manipulator::AllowLocalMoveUp|Manipulator::AllowTerminalMoveUp);
|
||||
}
|
||||
} else {
|
||||
Interval overlap = segment->getCanonicalInterval();
|
||||
size_t begin;
|
||||
size_t end;
|
||||
|
||||
getCost(0).getTrack()->getOverlapBounds ( overlap, begin, end );
|
||||
for ( ; begin<end ; ++begin ) {
|
||||
TrackElement* other = getCost(0).getTrack()->getSegment(begin);
|
||||
Interval otherOverlap = other->getCanonicalInterval();
|
||||
|
||||
if ( other->getNet() == segment->getNet() ) continue;
|
||||
if ( not otherOverlap.intersect(overlap) ) continue;
|
||||
|
||||
ltrace(200) << "| " << begin << " Blockage conflict: " << " " << other << endl;
|
||||
if ( (success = Manipulator(segment,*this).relax
|
||||
(otherOverlap,Manipulator::NoDoglegReuse|Manipulator::NoExpand)) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( not success ) {
|
||||
cerr << "[ERROR] Tighly constrained segment overlapping a blockage." << endl;
|
||||
ltrace(200) << "Segment is hard blocked, bypass to Unimplemented." << endl;
|
||||
}
|
||||
|
||||
ltraceout(200);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
bool State::desaturate ()
|
||||
{
|
||||
TrackElement* segment = _event->getSegment();
|
||||
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment->getLayer());
|
||||
|
||||
ltrace(200) << "State::desaturate()" << segment << endl;
|
||||
ltracein(200);
|
||||
|
||||
if ( segment->getLength() > DbU::lambda(75.0) ) {
|
||||
ltraceout(200);
|
||||
return false;
|
||||
}
|
||||
|
||||
GCell* gcell = segment->base()->getAutoSource()->getGCell();
|
||||
const vector<AutoSegment*>* globals = (segment->isHorizontal())
|
||||
? gcell->getHSegments() : gcell->getVSegments();
|
||||
|
||||
ltrace(200) << gcell << endl;
|
||||
|
||||
if ( (*globals).empty() ) {
|
||||
ltraceout(200);
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( size_t i=0 ; i<(*globals).size() ; ++i ) {
|
||||
size_t gdepth = Session::getRoutingGauge()->getLayerDepth((*globals)[i]->getLayer());
|
||||
if ( gdepth != depth ) continue;
|
||||
|
||||
ltrace(200) << "| " << (*globals)[i] << endl;
|
||||
|
||||
TrackElement* gsegment = Session::lookup ( (*globals)[i] );
|
||||
ltrace(200) << "|*" << (*globals)[i] << endl;
|
||||
|
||||
if ( (*globals)[i] == segment->base() ) continue;
|
||||
|
||||
if ( gsegment ) {
|
||||
if ( Manipulator(gsegment,*this).moveUp() ) {
|
||||
ltrace(200) << "Successful desaturation of " << gcell << endl;
|
||||
ltraceout(200);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ltraceout(200);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool State::slackenTopology ( unsigned int flags )
|
||||
{
|
||||
TrackElement* segment = getEvent()->getSegment();
|
||||
|
@ -1747,6 +1804,7 @@ namespace {
|
|||
break;
|
||||
}
|
||||
case DataNegociate::MoveUp:
|
||||
//if ( (success = desaturate()) ) break;
|
||||
nextState = DataNegociate::MaximumSlack;
|
||||
success = Manipulator(segment,*this).moveUp();
|
||||
if ( success ) break;
|
||||
|
@ -1770,7 +1828,8 @@ namespace {
|
|||
|
||||
if ( not success
|
||||
and (nextState == DataNegociate::Unimplemented)
|
||||
and segment->isSlackened() ) {
|
||||
and segment->isSlackened()
|
||||
and isFullBlocked() ) {
|
||||
solveFullBlockages ();
|
||||
}
|
||||
} else {
|
||||
|
@ -1779,6 +1838,11 @@ namespace {
|
|||
ltrace(200) << "Global segment FSM." << endl;
|
||||
case DataNegociate::RipupPerpandiculars:
|
||||
ltrace(200) << "Global, State: RipupPerpandiculars." << endl;
|
||||
// if ( isFullBlocked() ) {
|
||||
// actionFlags &= ~SegmentAction::EventLevel5;
|
||||
// success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::PerpandicularsFirst);
|
||||
// if ( success ) break;
|
||||
// }
|
||||
nextState = DataNegociate::Desalignate;
|
||||
break;
|
||||
case DataNegociate::Minimize:
|
||||
|
@ -1797,6 +1861,7 @@ namespace {
|
|||
}
|
||||
case DataNegociate::MoveUp:
|
||||
ltrace(200) << "Global, State: MoveUp." << endl;
|
||||
//if ( (success = desaturate()) ) break;
|
||||
if ( (success = Manipulator(segment,*this).moveUp(Manipulator::AllowShortPivotUp)) ) {
|
||||
break;
|
||||
}
|
||||
|
@ -1985,7 +2050,12 @@ namespace {
|
|||
|
||||
for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) {
|
||||
track = perpandiculars[i]->getTrack();
|
||||
if ( not track ) continue;
|
||||
if ( not track ) {
|
||||
if ( flags & Manipulator::PerpandicularsFirst ) {
|
||||
_S.addAction ( perpandiculars[i], perpandicularActionFlags );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
bool dislodgeCaged = false;
|
||||
if ( Manipulator(perpandiculars[i],_S).isCaged(_event->getSegment()->getAxis()) ) {
|
||||
|
@ -2497,6 +2567,14 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
if ( _segment->isLocal() and segment2->isLocal() ) {
|
||||
if ( shrinkLeft and shrinkRight ) {
|
||||
Interval interval1 = segment2->getCanonicalInterval();
|
||||
if ( toFree.getCenter() < interval1.getCenter() ) shrinkRight = false;
|
||||
else shrinkLeft = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( not (shrinkLeft xor shrinkRight) ) {
|
||||
ltrace(200) << "- Hard overlap/enclosure/shrink " << segment2 << endl;
|
||||
if ( _segment->isStrap() and segment2->isGlobal() ) continue;
|
||||
|
@ -2846,7 +2924,9 @@ namespace {
|
|||
|
||||
if ( _segment->isFixed () ) return false;
|
||||
if ( _segment->isStrap () ) return false;
|
||||
if ( not _segment->canMoveUp(0.5) ) return false;
|
||||
|
||||
float reserve = (_segment->isLocal()) ? 0.5 : 1.0;
|
||||
if ( not _segment->canMoveUp(reserve) ) return false;
|
||||
|
||||
_segment->moveUp ();
|
||||
return true;
|
||||
|
@ -2870,7 +2950,7 @@ namespace {
|
|||
{
|
||||
ltrace(200) << "Manipulator::moveUp() " << _segment << endl;
|
||||
|
||||
unsigned int kflags = Katabatic::AutoSegment::Propagate;
|
||||
unsigned int kflags = Katabatic::AutoSegment::Propagate|Katabatic::AutoSegment::PerpandicularFrag;
|
||||
kflags |= (flags & AllowLocalMoveUp ) ? Katabatic::AutoSegment::AllowLocal : 0;
|
||||
kflags |= (flags & AllowTerminalMoveUp) ? Katabatic::AutoSegment::AllowTerminal : 0;
|
||||
|
||||
|
@ -2881,12 +2961,12 @@ namespace {
|
|||
} else {
|
||||
if ( _segment->getLength() < DbU::lambda(100.0) ) {
|
||||
if ( not (flags & AllowShortPivotUp) ) return false;
|
||||
if ( not _segment->canPivotUp(2.0) ) return false;
|
||||
if ( not _segment->canPivotUp(0.5) ) return false;
|
||||
}
|
||||
if ( not _segment->canMoveUp(1.0,kflags) ) return false; // MARK 1
|
||||
if ( not _segment->canMoveUp(0.5,kflags) ) return false; // MARK 1
|
||||
}
|
||||
} else {
|
||||
if ( not _segment->canMoveUp(1.0,kflags) ) return false; // MARK 1
|
||||
if ( not _segment->canMoveUp(0.5,kflags) ) return false; // MARK 1
|
||||
}
|
||||
|
||||
#if DISABLED
|
||||
|
@ -3296,21 +3376,21 @@ namespace Kite {
|
|||
{
|
||||
//if ( lhs._ring xor rhs._ring ) return lhs._ring;
|
||||
|
||||
if ( lhs._eventLevel < rhs._eventLevel ) return true;
|
||||
if ( lhs._eventLevel > rhs._eventLevel ) return false;
|
||||
if ( lhs._eventLevel < rhs._eventLevel ) return true;
|
||||
|
||||
if ( lhs._canRipple xor rhs._canRipple ) return rhs._canRipple;
|
||||
//if ( lhs._slackenStrap xor rhs._slackenStrap ) return lhs._slackenStrap;
|
||||
|
||||
// Uses static ordering.
|
||||
//if ( lhs._tracksNb < rhs._tracksNb ) return false;
|
||||
//if ( lhs._tracksNb > rhs._tracksNb ) return true;
|
||||
//if ( lhs._tracksNb < rhs._tracksNb ) return false;
|
||||
|
||||
if ( lhs._priority < rhs._priority ) return false;
|
||||
if ( lhs._priority > rhs._priority ) return true;
|
||||
if ( lhs._priority > rhs._priority ) return false;
|
||||
if ( lhs._priority < rhs._priority ) return true;
|
||||
|
||||
if ( lhs._length < rhs._length ) return true;
|
||||
if ( lhs._length > rhs._length ) return false;
|
||||
if ( lhs._length < rhs._length ) return true;
|
||||
|
||||
if ( lhs._isHorizontal xor rhs._isHorizontal ) return rhs._isHorizontal;
|
||||
|
||||
|
@ -3519,7 +3599,11 @@ namespace Kite {
|
|||
_axisHint = parent->getAxis();
|
||||
return;
|
||||
}
|
||||
_axisHint = (parentEvent) ? parentEvent->getAxisHint() : parent->getAxis ();
|
||||
//_axisHint = (parentEvent) ? parentEvent->getAxisHint() : parent->getAxis ();
|
||||
_axisHint = parent->getAxis ();
|
||||
|
||||
ltrace(200) << "cacheAxisHint() - hint:" << DbU::getValueString(_axisHint)
|
||||
<< " axis:" << DbU::getValueString(parent->getAxis()) << " parent:" << parent << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3829,7 +3913,7 @@ namespace Kite {
|
|||
ltrace(200) << "RoutingEvent::revalidate() - " << (void*)this << ":" << this << endl;
|
||||
ltracein(200);
|
||||
|
||||
//cacheAxisHint ();
|
||||
cacheAxisHint ();
|
||||
ltrace(200) << "axisHint:" << DbU::getValueString(getAxisHint()) << endl;
|
||||
|
||||
_canHandleConstraints = true;
|
||||
|
|
|
@ -118,6 +118,15 @@ namespace Kite {
|
|||
for ( size_t index = 0 ; index < trackNumber ; index++ ) {
|
||||
if ( plane->getLayerGauge()->getDirection() & Constant::Horizontal ) {
|
||||
plane->_tracks.push_back ( HorizontalTrack::create ( plane, index ) );
|
||||
// Ugly: Direct uses of CellGauge (middle tracks 4 & 5 for local use).
|
||||
if ( depth == 1 ) {
|
||||
switch ( index % 10 ) {
|
||||
case 4:
|
||||
case 5:
|
||||
plane->_tracks.back()->setLocalAssigned ( true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plane->_tracks.push_back ( VerticalTrack::create ( plane, index ) );
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace Kite {
|
|||
, _max (routingPlane->getTrackMax())
|
||||
, _segments ()
|
||||
, _markers ()
|
||||
, _localAssigned(false)
|
||||
, _segmentsValid(false)
|
||||
, _markersValid (false)
|
||||
{ }
|
||||
|
@ -290,8 +291,8 @@ namespace Kite {
|
|||
|
||||
ltrace(190) << "getOverlapCost() @" << DbU::getValueString(_axis)
|
||||
<< " [" << DbU::getValueString(interval.getVMin())
|
||||
<< ":" << DbU::getValueString(interval.getVMax()) << "]"
|
||||
<< "<-> [" << begin << ":" << end << "]"
|
||||
<< ":" << DbU::getValueString(interval.getVMax())
|
||||
<< "] <-> [" << begin << ":" << end << "]"
|
||||
<< endl;
|
||||
|
||||
ltracein(148);
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace Kite {
|
|||
|
||||
bool TrackCost::isFree () const
|
||||
{
|
||||
return /*(_terminals == 0) &&*/ (!_overlap) && (!_infinite);
|
||||
return /*(not _terminals) and*/ (not _overlap) and (not _infinite);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -111,14 +111,16 @@ namespace Kite {
|
|||
guside = gcell->getUSide ( Constant::Horizontal /*, true*/ );
|
||||
Interval usedLength = guside.getIntersection ( segside );
|
||||
|
||||
gcell->addBlockage ( depth, usedLength.getSize() );
|
||||
gcell->addBlockage ( depth, usedLength.getSize() );
|
||||
//gcell->addBlockedAxis ( depth, track->getAxis() );
|
||||
gcell = right;
|
||||
}
|
||||
if ( end ) {
|
||||
guside = gcell->getUSide ( Constant::Horizontal /*, true*/ );
|
||||
Interval usedLength = guside.getIntersection ( segside );
|
||||
|
||||
end->addBlockage ( depth, usedLength.getSize() );
|
||||
end->addBlockage ( depth, usedLength.getSize() );
|
||||
//end->addBlockedAxis ( depth, track->getAxis() );
|
||||
}
|
||||
} else
|
||||
cerr << Warning("TrackFixedSegment(): TrackFixedElement outside GCell grid.") << endl;
|
||||
|
@ -141,14 +143,16 @@ namespace Kite {
|
|||
guside = gcell->getUSide ( Constant::Vertical /*, true*/ );
|
||||
Interval usedLength = guside.getIntersection ( segside );
|
||||
|
||||
gcell->addBlockage ( depth, usedLength.getSize() );
|
||||
gcell->addBlockage ( depth, usedLength.getSize() );
|
||||
//gcell->addBlockedAxis ( depth, track->getAxis() );
|
||||
gcell = up;
|
||||
}
|
||||
if ( end ) {
|
||||
guside = gcell->getUSide ( Constant::Vertical /*, true*/ );
|
||||
Interval usedLength = guside.getIntersection ( segside );
|
||||
|
||||
end->addBlockage ( depth, usedLength.getSize() );
|
||||
end->addBlockage ( depth, usedLength.getSize() );
|
||||
//end->addBlockedAxis ( depth, track->getAxis() );
|
||||
}
|
||||
} else
|
||||
cerr << Warning("TrackFixedSegment(): TrackFixedElement outside GCell grid.") << endl;
|
||||
|
|
|
@ -118,7 +118,7 @@ namespace Kite {
|
|||
perpandicular = Session::lookup ( perpandiculars[i]->getCanonical(interval)->base() );
|
||||
}
|
||||
|
||||
if ( !perpandicular ) {
|
||||
if ( not perpandicular ) {
|
||||
cerr << Bug("Not a TrackSegment: %s:%s\n (perpandicular: %s:%s)"
|
||||
,getString((void*)perpandiculars[i]->getCanonical(interval)->base()).c_str()
|
||||
,getString(perpandiculars[i]->getCanonical(interval)).c_str()
|
||||
|
@ -141,11 +141,11 @@ namespace Kite {
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( ( interval.getVMin() != trackSegment->getAxis() )
|
||||
|| AutoSegment::isTopologicalBound(perpandiculars[i]
|
||||
,false
|
||||
,perpandicular->isHorizontal()
|
||||
) ) {
|
||||
if ( ( interval.getVMin() != trackSegment->getAxis() )
|
||||
or AutoSegment::isTopologicalBound(perpandiculars[i]
|
||||
,false
|
||||
,perpandicular->isHorizontal()
|
||||
) ) {
|
||||
map<DbU::Unit,int>::iterator iattractor = attractorSpins.find ( interval.getVMin() );
|
||||
if ( iattractor == attractorSpins.end() ) {
|
||||
attractorSpins.insert ( make_pair(interval.getVMin(),-1) );
|
||||
|
@ -155,11 +155,11 @@ namespace Kite {
|
|||
ltrace(148) << "Left attractor @" << DbU::getValueString(interval.getVMin()) << endl;
|
||||
}
|
||||
|
||||
if ( ( interval.getVMax() != trackSegment->getAxis() )
|
||||
|| AutoSegment::isTopologicalBound(perpandiculars[i]
|
||||
,true
|
||||
,perpandicular->isHorizontal()
|
||||
) ) {
|
||||
if ( ( interval.getVMax() != trackSegment->getAxis() )
|
||||
or AutoSegment::isTopologicalBound(perpandiculars[i]
|
||||
,true
|
||||
,perpandicular->isHorizontal()
|
||||
) ) {
|
||||
map<DbU::Unit,int>::iterator iattractor = attractorSpins.find ( interval.getVMax() );
|
||||
if ( iattractor == attractorSpins.end() ) {
|
||||
attractorSpins.insert ( make_pair(interval.getVMax(),1) );
|
||||
|
|
|
@ -86,6 +86,7 @@ namespace Kite {
|
|||
KiteEngine* getKiteEngine () const;
|
||||
virtual bool isHorizontal () const = 0;
|
||||
virtual bool isVertical () const = 0;
|
||||
inline bool isLocalAssigned () const;
|
||||
virtual unsigned int getDirection () const = 0;
|
||||
inline size_t getIndex () const;
|
||||
unsigned int getDepth () const;
|
||||
|
@ -118,6 +119,7 @@ namespace Kite {
|
|||
Interval expandUsedInterval ( size_t& begin, size_t& end ) const;
|
||||
Interval expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* ) const;
|
||||
unsigned int checkOverlap ( unsigned int& overlaps ) const;
|
||||
inline void setLocalAssigned ( bool );
|
||||
void forceSort ();
|
||||
void insert ( TrackElement* );
|
||||
void insert ( TrackMarker* );
|
||||
|
@ -138,6 +140,7 @@ namespace Kite {
|
|||
DbU::Unit _max;
|
||||
vector<TrackElement*> _segments;
|
||||
vector<TrackMarker*> _markers;
|
||||
bool _localAssigned;
|
||||
bool _segmentsValid;
|
||||
bool _markersValid;
|
||||
|
||||
|
@ -201,12 +204,14 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
inline RoutingPlane* Track::getRoutingPlane () const { return _routingPlane; }
|
||||
inline size_t Track::getIndex () const { return _index; }
|
||||
inline DbU::Unit Track::getAxis () const { return _axis; }
|
||||
inline DbU::Unit Track::getMin () const { return _min; }
|
||||
inline DbU::Unit Track::getMax () const { return _max; }
|
||||
inline size_t Track::getSize () const { return _segments.size(); }
|
||||
inline bool Track::isLocalAssigned () const { return _localAssigned; }
|
||||
inline RoutingPlane* Track::getRoutingPlane () const { return _routingPlane; }
|
||||
inline size_t Track::getIndex () const { return _index; }
|
||||
inline DbU::Unit Track::getAxis () const { return _axis; }
|
||||
inline DbU::Unit Track::getMin () const { return _min; }
|
||||
inline DbU::Unit Track::getMax () const { return _max; }
|
||||
inline size_t Track::getSize () const { return _segments.size(); }
|
||||
inline void Track::setLocalAssigned ( bool state ) { _localAssigned=state; }
|
||||
|
||||
inline unsigned int Track::setMinimalFlags ( unsigned int& state, unsigned int flags ) const
|
||||
{
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace Kite {
|
|||
virtual bool canSlacken () const;
|
||||
virtual bool canPivotUp ( float reserve ) const;
|
||||
virtual bool canPivotDown ( float reserve ) const;
|
||||
virtual bool canMoveUp ( float reserve, unsigned int flags=AutoSegment::Propagate ) const;
|
||||
virtual bool canMoveUp ( float reserve, unsigned int flags=AutoSegment::Propagate|AutoSegment::PerpandicularFrag ) const;
|
||||
virtual bool canRipple () const;
|
||||
virtual bool hasSourceDogLeg () const;
|
||||
virtual bool hasTargetDogLeg () const;
|
||||
|
|
Loading…
Reference in New Issue