2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2013-12-03 18:59:29 -06:00
|
|
|
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
* ./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...
2011-01-09 12:08:57 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:55 -06:00
|
|
|
// | 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 |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./NegociateWindow.cpp" |
|
* ./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...
2011-01-09 12:08:57 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
#include <vector>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <iomanip>
|
|
|
|
#include "hurricane/Warning.h"
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/RoutingPad.h"
|
|
|
|
#include "hurricane/Net.h"
|
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "crlcore/Utilities.h"
|
|
|
|
#include "crlcore/AllianceFramework.h"
|
|
|
|
#include "crlcore/Measures.h"
|
|
|
|
#include "crlcore/Histogram.h"
|
|
|
|
#include "katabatic/AutoContact.h"
|
|
|
|
#include "katabatic/GCellGrid.h"
|
|
|
|
#include "kite/DataNegociate.h"
|
|
|
|
#include "kite/TrackElement.h"
|
|
|
|
#include "kite/TrackMarker.h"
|
|
|
|
#include "kite/TrackCost.h"
|
|
|
|
#include "kite/Track.h"
|
|
|
|
#include "kite/TrackSegment.h"
|
|
|
|
#include "kite/RoutingPlane.h"
|
|
|
|
#include "kite/RoutingEventQueue.h"
|
|
|
|
#include "kite/RoutingEventHistory.h"
|
|
|
|
#include "kite/RoutingEventLoop.h"
|
|
|
|
#include "kite/NegociateWindow.h"
|
|
|
|
#include "kite/KiteEngine.h"
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Hurricane;
|
|
|
|
using namespace CRL;
|
|
|
|
using namespace Kite;
|
|
|
|
|
|
|
|
|
|
|
|
void NegociateOverlapCost ( const TrackElement* segment, TrackCost& cost )
|
|
|
|
{
|
|
|
|
Interval intersect = segment->getCanonicalInterval();
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not intersect.intersect(cost.getInterval())) return;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (segment->isBlockage() or segment->isFixed()) {
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(200) << "Infinite cost from: " << segment << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.setInfinite ();
|
|
|
|
cost.setOverlap ();
|
|
|
|
cost.setHardOverlap();
|
|
|
|
cost.setBlockage ();
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (cost.getInterval().getVMax() > intersect.getVMax()) cost.setLeftOverlap();
|
|
|
|
if (cost.getInterval().getVMin() < intersect.getVMin()) cost.setRightOverlap();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not intersect.contains(cost.getInterval()))
|
|
|
|
intersect.intersection( cost.getInterval() );
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
else {
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.setLonguestOverlap( intersect.getSize() );
|
|
|
|
cost.setGlobalEnclosed();
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
DataNegociate* data = segment->getDataNegociate();
|
|
|
|
if (not data) return;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.mergeRipupCount( data->getRipupCount() );
|
2010-12-12 15:42:57 -06:00
|
|
|
if ( segment->isLocal() ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.mergeDataState( data->getState() );
|
|
|
|
if (data->getState() >= DataNegociate::LocalVsGlobal) {
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(200) << "MaximumSlack/LocalVsGlobal for " << segment << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (segment->isGlobal()) {
|
|
|
|
cost.setOverlapGlobal();
|
|
|
|
if ( (cost.getFlags() & TrackCost::LocalAndTopDepth)
|
|
|
|
and (data->getState() >= DataNegociate::MoveUp) ) {
|
|
|
|
cost.setInfinite ();
|
|
|
|
cost.setOverlap ();
|
|
|
|
cost.setHardOverlap();
|
|
|
|
return;
|
|
|
|
}
|
* ./Kite:
- New: In BuildPowerRails, special processing for the power ring segments.
The "diagonal" of vias at each corner is causing a misbehavior of the
routing algorithm (due to fully saturated GCells in one direction).
As a temporary fix, extend the segments so they form a "square corner".
(problem arise on "d_in_i(22)").
- New: In RoutingEvent::_processNegociate, disable the "isForcedToHint()"
feature. No noticeable loss of quality or speed.
- New: In TrackElement/TrackSegment, wraps the AutoSegment parent's mechanism.
Allows to gets the DataNegociate of either the segment or it's parent.
- New: State::solveFullBlockages(), dedicated method to solves the case when
all the allowed tracks of a segment are blocked, tries to moves up
local segments and to break-up global ones.
- New: RoutingEventLoop, a more sophisticated way to detect looping.
Maintain a dynamic histogram of the last N (default 10) segments routeds,
with the count of how many times they have occurred. If that count
exeed 40, we *may* be facing a loop.
- Change: In State::conflictSolve1, implement new policy. The global segments
no more can be broken by local ones. The idea behind is that breaking
a global on the request of a local will only produce more cluttering
in the GCell. Globals must be keep straigth pass through, especially
inside near-saturated GCells. Globals breaking however can occurs at
another global's request.
- Change: In TrackCost, implement the new policy about locals segments that
cannot break globals segments. The sorting class now accept flags to
modulate the sorting function. Two options avalaibles: IgnoreAxisWeigth
(to uses for strap segments) and DiscardGlobals (to uses with locals).
- Change: In TrackCost, the "distance to fixed" have now an upper bound of
50 lambdas (no need to be greater because it means it's outside the
begin & en GCells). Take account not only of fixed segment, but also
of placed segments which makes bound.
- Bug: In Track::_check(), while calling each individual TrackSegment check,
uses it as the *first* argument of the "or", otherwise it may not be
called.
- Bug: In ProtectRoutingPad, loop over segment Collections while modificating
it was producing non-deterministic results. The fact that a collection
must be not modificated while beeing iterated is becoming a more and more
painful problem.
2010-12-30 12:42:17 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.setOverlap();
|
|
|
|
if ( segment->isLocal()
|
|
|
|
or (cost.isForGlobal() and (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3)) )
|
|
|
|
cost.incTerminals( data->getTerminals()*100 );
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
|
|
|
|
ltrace(200) << "| Increment Delta: " << DbU::getValueString(intersect.getSize()) << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
cost.incDelta( intersect.getSize() );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loadRoutingPads ( NegociateWindow* nw )
|
|
|
|
{
|
|
|
|
AllianceFramework* af = AllianceFramework::get ();
|
|
|
|
RoutingGauge* rg = nw->getKiteEngine()->getRoutingGauge();
|
|
|
|
|
|
|
|
forEach ( Net*, inet, nw->getCell()->getNets() ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
if (inet->getType() == Net::Type::POWER ) continue;
|
|
|
|
if (inet->getType() == Net::Type::GROUND) continue;
|
|
|
|
if (inet->getType() == Net::Type::CLOCK ) continue;
|
|
|
|
if (af->isBLOCKAGE(inet->getName())) continue;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
forEach ( RoutingPad*, irp, inet->getRoutingPads() ) {
|
|
|
|
size_t depth = rg->getLayerDepth(irp->getLayer());
|
2013-12-03 18:59:29 -06:00
|
|
|
if (depth > 0) continue;
|
|
|
|
if (depth == 0)
|
|
|
|
TrackMarker::create( *irp, 1 );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
} // Anonymous namespace.
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace Kite {
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
using std::endl;
|
|
|
|
using std::setw;
|
|
|
|
using std::left;
|
|
|
|
using std::right;
|
|
|
|
using std::setprecision;
|
2010-12-12 15:42:57 -06:00
|
|
|
using Hurricane::Warning;
|
2010-03-09 09:24:55 -06:00
|
|
|
using Hurricane::Bug;
|
|
|
|
using Hurricane::tab;
|
|
|
|
using Hurricane::inltrace;
|
|
|
|
using Hurricane::ltracein;
|
|
|
|
using Hurricane::ltraceout;
|
|
|
|
using Hurricane::ForEachIterator;
|
2010-12-15 09:12:00 -06:00
|
|
|
using CRL::Histogram;
|
2010-08-22 07:38:27 -05:00
|
|
|
using CRL::addMeasure;
|
2010-12-12 15:42:57 -06:00
|
|
|
using Katabatic::AutoContact;
|
2013-12-03 18:59:29 -06:00
|
|
|
using Katabatic::AutoSegmentLut;
|
|
|
|
using Katabatic::perpandicularTo;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "NegociateWindow".
|
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
NegociateWindow::NegociateWindow ( KiteEngine* kite )
|
|
|
|
: _slowMotion (0)
|
|
|
|
, _interrupt (false)
|
|
|
|
, _kite (kite)
|
|
|
|
, _gcells ()
|
|
|
|
, _segments ()
|
|
|
|
, _eventQueue ()
|
|
|
|
, _eventHistory()
|
* ./Kite:
- New: In BuildPowerRails, special processing for the power ring segments.
The "diagonal" of vias at each corner is causing a misbehavior of the
routing algorithm (due to fully saturated GCells in one direction).
As a temporary fix, extend the segments so they form a "square corner".
(problem arise on "d_in_i(22)").
- New: In RoutingEvent::_processNegociate, disable the "isForcedToHint()"
feature. No noticeable loss of quality or speed.
- New: In TrackElement/TrackSegment, wraps the AutoSegment parent's mechanism.
Allows to gets the DataNegociate of either the segment or it's parent.
- New: State::solveFullBlockages(), dedicated method to solves the case when
all the allowed tracks of a segment are blocked, tries to moves up
local segments and to break-up global ones.
- New: RoutingEventLoop, a more sophisticated way to detect looping.
Maintain a dynamic histogram of the last N (default 10) segments routeds,
with the count of how many times they have occurred. If that count
exeed 40, we *may* be facing a loop.
- Change: In State::conflictSolve1, implement new policy. The global segments
no more can be broken by local ones. The idea behind is that breaking
a global on the request of a local will only produce more cluttering
in the GCell. Globals must be keep straigth pass through, especially
inside near-saturated GCells. Globals breaking however can occurs at
another global's request.
- Change: In TrackCost, implement the new policy about locals segments that
cannot break globals segments. The sorting class now accept flags to
modulate the sorting function. Two options avalaibles: IgnoreAxisWeigth
(to uses for strap segments) and DiscardGlobals (to uses with locals).
- Change: In TrackCost, the "distance to fixed" have now an upper bound of
50 lambdas (no need to be greater because it means it's outside the
begin & en GCells). Take account not only of fixed segment, but also
of placed segments which makes bound.
- Bug: In Track::_check(), while calling each individual TrackSegment check,
uses it as the *first* argument of the "or", otherwise it may not be
called.
- Bug: In ProtectRoutingPad, loop over segment Collections while modificating
it was producing non-deterministic results. The fact that a collection
must be not modificated while beeing iterated is becoming a more and more
painful problem.
2010-12-30 12:42:17 -06:00
|
|
|
, _eventLoop (10,50)
|
2010-12-12 15:42:57 -06:00
|
|
|
{ }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
NegociateWindow* NegociateWindow::create ( KiteEngine* kite )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2010-12-12 15:42:57 -06:00
|
|
|
NegociateWindow* negociateWindow = new NegociateWindow ( kite );
|
2010-03-09 09:24:55 -06:00
|
|
|
return negociateWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NegociateWindow::~NegociateWindow ()
|
2010-12-12 15:42:57 -06:00
|
|
|
{ }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
void NegociateWindow::destroy ()
|
|
|
|
{ delete this; }
|
|
|
|
|
|
|
|
|
|
|
|
Cell* NegociateWindow::getCell () const
|
|
|
|
{ return _kite->getCell(); }
|
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
void NegociateWindow::setGCells ( const Katabatic::GCellVector& gcells )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2010-12-12 15:42:57 -06:00
|
|
|
_gcells = gcells;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
loadRoutingPads( this );
|
|
|
|
Session::revalidate();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement* segment;
|
|
|
|
AutoSegmentLut lut = Session::getKiteEngine()->_getAutoSegmentLut();
|
|
|
|
AutoSegmentLut::iterator it = lut.begin ();
|
2010-03-09 09:24:55 -06:00
|
|
|
for ( ; it != lut.end() ; it++ ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
segment = Session::lookup( it->second );
|
|
|
|
if (segment) segment->getDataNegociate()->update();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
_statistics.setGCellsCount( _gcells.size() );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
void NegociateWindow::addRoutingEvent ( TrackElement* segment, unsigned int level )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
|
|
|
DataNegociate* data = segment->getDataNegociate();
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not data or not data->hasRoutingEvent())
|
|
|
|
_eventQueue.add( segment, level );
|
2010-03-09 09:24:55 -06:00
|
|
|
else
|
2013-12-03 18:59:29 -06:00
|
|
|
cerr << Bug( "NegociateWidow::addRoutingEvent(): Try to adds twice the same TrackElement event."
|
|
|
|
"\n %p:%s."
|
|
|
|
, (void*)segment->base()->base()
|
|
|
|
, getString(segment).c_str()
|
2010-03-09 09:24:55 -06:00
|
|
|
) << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement* NegociateWindow::createTrackSegment ( AutoSegment* autoSegment, unsigned int flags )
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
ltrace(200) << "NegociateWindow::createTrackSegment() - " << autoSegment << endl;
|
2010-12-12 15:42:57 -06:00
|
|
|
ltracein(159);
|
|
|
|
|
|
|
|
// Special case: fixed AutoSegments must not interfere with blockages.
|
|
|
|
// Ugly: uses of getExtensionCap().
|
2013-12-03 18:59:29 -06:00
|
|
|
if (autoSegment->isFixed()) {
|
2010-12-12 15:42:57 -06:00
|
|
|
RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer());
|
2013-12-03 18:59:29 -06:00
|
|
|
Track* track = plane->getTrackByPosition( autoSegment->getAxis() );
|
2010-12-12 15:42:57 -06:00
|
|
|
size_t begin;
|
|
|
|
size_t end;
|
|
|
|
Interval fixedSpan;
|
|
|
|
Interval blockageSpan;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
autoSegment->getCanonical( fixedSpan );
|
|
|
|
fixedSpan.inflate( Session::getExtensionCap()-1 );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
track->getOverlapBounds( fixedSpan, begin, end );
|
2010-12-12 15:42:57 -06:00
|
|
|
for ( ; (begin < end) ; begin++ ) {
|
|
|
|
|
|
|
|
TrackElement* other = track->getSegment(begin);
|
|
|
|
ltrace(200) << "| overlap: " << other << endl;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not other->isBlockage()) continue;
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
other->getCanonical( blockageSpan );
|
|
|
|
blockageSpan.inflate( Session::getExtensionCap() );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
ltrace(200) << " fixed:" << fixedSpan << " vs. blockage:" << blockageSpan << endl;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not fixedSpan.intersect(blockageSpan)) continue;
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
// Overlap between fixed & blockage.
|
|
|
|
ltrace(200) << "* Blockage overlap: " << autoSegment << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
Session::destroyRequest( autoSegment );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
cerr << Warning( "Overlap between fixed %s and blockage at %s."
|
|
|
|
, getString(autoSegment).c_str()
|
|
|
|
, getString(blockageSpan).c_str() ) << endl;
|
|
|
|
ltraceout(159);
|
2010-12-12 15:42:57 -06:00
|
|
|
return NULL;
|
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Interval span;
|
2013-12-03 18:59:29 -06:00
|
|
|
autoSegment = autoSegment->getCanonical( span );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
bool created;
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement* trackSegment = TrackSegment::create( autoSegment, NULL, created );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not (flags & KtLoadingStage))
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(159) << "* lookup: " << autoSegment << endl;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (created) {
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(159) << "* " << trackSegment << endl;
|
|
|
|
|
|
|
|
RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer());
|
|
|
|
Track* track = plane->getTrackByPosition ( autoSegment->getAxis() );
|
2013-12-03 18:59:29 -06:00
|
|
|
Interval uside = autoSegment->getAutoSource()->getGCell()->getSide( perpandicularTo(autoSegment->getDirection()) );
|
|
|
|
|
|
|
|
if (track->getAxis() > uside.getVMax()) track = track->getPreviousTrack();
|
|
|
|
if (track->getAxis() < uside.getVMin()) track = track->getNextTrack();
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
ltrace(159) << "* GCell U-side " << uside << endl;
|
|
|
|
ltrace(159) << "* " << plane << endl;
|
|
|
|
ltrace(159) << "* " << track << endl;
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
trackSegment->setAxis( track->getAxis(), Katabatic::SegAxisSet );
|
|
|
|
trackSegment->invalidate();
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (trackSegment->isFixed()) {
|
|
|
|
Session::addInsertEvent( trackSegment, track );
|
2010-12-12 15:42:57 -06:00
|
|
|
} else {
|
2013-12-03 18:59:29 -06:00
|
|
|
_segments.push_back( trackSegment );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not created and not (flags & KtLoadingStage)) {
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(200) << "TrackSegment already exists (and not in loading stage)." << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
ltraceout(159);
|
|
|
|
|
|
|
|
return trackSegment;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
double NegociateWindow::computeWirelength ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2010-12-12 15:42:57 -06:00
|
|
|
set<TrackElement*> accounteds;
|
|
|
|
double totalWL = 0.0;
|
|
|
|
|
|
|
|
for ( size_t igcell=0 ; igcell<_gcells.size() ; ++igcell ) {
|
|
|
|
double gcellWL = 0.0;
|
|
|
|
Segment* segment;
|
|
|
|
TrackElement* trackSegment;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
const vector<AutoContact*>& contacts = _gcells[igcell]->getContacts();
|
|
|
|
for ( size_t i=0 ; i<contacts.size() ; i++ ) {
|
|
|
|
forEach ( Hook*, ihook, contacts[i]->getBodyHook()->getSlaveHooks() ) {
|
2010-12-12 15:42:57 -06:00
|
|
|
Hook* sourceHook = dynamic_cast<Segment::SourceHook*>(*ihook);
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not sourceHook) continue;
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
segment = dynamic_cast<Segment*>(sourceHook->getComponent());
|
2013-12-03 18:59:29 -06:00
|
|
|
trackSegment = Session::lookup( segment );
|
|
|
|
if (trackSegment) {
|
|
|
|
if (accounteds.find(trackSegment) != accounteds.end()) continue;
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
accounteds.insert( trackSegment );
|
|
|
|
gcellWL += DbU::getLambda( trackSegment->getLength() );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
// Partial sum to limit rounding errors.
|
|
|
|
totalWL += gcellWL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return totalWL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NegociateWindow::_createRouting ( Katabatic::GCell* gcell )
|
|
|
|
{
|
|
|
|
ltrace(200) << "NegociateWindow::_createRouting() - " << gcell << endl;
|
|
|
|
ltracein(200);
|
|
|
|
|
|
|
|
Segment* segment;
|
|
|
|
AutoSegment* autoSegment;
|
|
|
|
|
|
|
|
ltrace(149) << "AutoSegments from AutoContacts" << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
const vector<AutoContact*>& contacts = gcell->getContacts();
|
|
|
|
for ( size_t i=0 ; i<contacts.size() ; i++ ) {
|
|
|
|
forEach ( Component*, component, contacts[i]->getSlaveComponents() ) {
|
2010-12-12 15:42:57 -06:00
|
|
|
segment = dynamic_cast<Segment*>(*component);
|
2013-12-03 18:59:29 -06:00
|
|
|
autoSegment = Session::base()->lookup( segment );
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(149) << autoSegment << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
if (autoSegment and autoSegment->isCanonical()) {
|
|
|
|
createTrackSegment( autoSegment, KtLoadingStage );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
ltrace(149) << "_segments.size():" << _segments.size() << endl;
|
|
|
|
ltraceout(200);
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
size_t NegociateWindow::_negociate ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
ltrace(500) << "Deter| NegociateWindow::_negociate()" << endl;
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(150) << "NegociateWindow::_negociate() - " << _segments.size() << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
ltracein(149);
|
|
|
|
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
cmess1 << " o Negociation Stage." << endl;
|
|
|
|
|
2010-04-23 08:14:17 -05:00
|
|
|
unsigned long limit = _kite->getEventsLimit();
|
|
|
|
|
2010-03-09 09:24:55 -06:00
|
|
|
_eventHistory.clear();
|
2013-12-03 18:59:29 -06:00
|
|
|
_eventQueue.load( _segments );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
size_t count = 0;
|
2013-12-03 18:59:29 -06:00
|
|
|
RoutingEvent::setStage( RoutingEvent::Negociate );
|
2010-03-09 09:24:55 -06:00
|
|
|
while ( not _eventQueue.empty() and not isInterrupted() ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
RoutingEvent* event = _eventQueue.pop();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
if (tty::enabled()) {
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
cmess2 << " <event:" << tty::bold << setw(7) << setfill('0')
|
2010-03-09 09:24:55 -06:00
|
|
|
<< RoutingEvent::getProcesseds() << setfill(' ') << tty::reset << ">" << tty::cr;
|
* ./Kite:
- New: In BuildPowerRails, special processing for the power ring segments.
The "diagonal" of vias at each corner is causing a misbehavior of the
routing algorithm (due to fully saturated GCells in one direction).
As a temporary fix, extend the segments so they form a "square corner".
(problem arise on "d_in_i(22)").
- New: In RoutingEvent::_processNegociate, disable the "isForcedToHint()"
feature. No noticeable loss of quality or speed.
- New: In TrackElement/TrackSegment, wraps the AutoSegment parent's mechanism.
Allows to gets the DataNegociate of either the segment or it's parent.
- New: State::solveFullBlockages(), dedicated method to solves the case when
all the allowed tracks of a segment are blocked, tries to moves up
local segments and to break-up global ones.
- New: RoutingEventLoop, a more sophisticated way to detect looping.
Maintain a dynamic histogram of the last N (default 10) segments routeds,
with the count of how many times they have occurred. If that count
exeed 40, we *may* be facing a loop.
- Change: In State::conflictSolve1, implement new policy. The global segments
no more can be broken by local ones. The idea behind is that breaking
a global on the request of a local will only produce more cluttering
in the GCell. Globals must be keep straigth pass through, especially
inside near-saturated GCells. Globals breaking however can occurs at
another global's request.
- Change: In TrackCost, implement the new policy about locals segments that
cannot break globals segments. The sorting class now accept flags to
modulate the sorting function. Two options avalaibles: IgnoreAxisWeigth
(to uses for strap segments) and DiscardGlobals (to uses with locals).
- Change: In TrackCost, the "distance to fixed" have now an upper bound of
50 lambdas (no need to be greater because it means it's outside the
begin & en GCells). Take account not only of fixed segment, but also
of placed segments which makes bound.
- Bug: In Track::_check(), while calling each individual TrackSegment check,
uses it as the *first* argument of the "or", otherwise it may not be
called.
- Bug: In ProtectRoutingPad, loop over segment Collections while modificating
it was producing non-deterministic results. The fact that a collection
must be not modificated while beeing iterated is becoming a more and more
painful problem.
2010-12-30 12:42:17 -06:00
|
|
|
cmess2.flush ();
|
2010-03-09 09:24:55 -06:00
|
|
|
} else {
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
cmess2 << " <event:" << setw(7) << setfill('0')
|
* ./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...
2011-01-09 12:08:57 -06:00
|
|
|
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
|
|
|
|
<< event->getEventLevel() << ":" << event->getPriority() << "> "
|
|
|
|
<< event->getSegment()
|
2010-03-09 09:24:55 -06:00
|
|
|
<< endl;
|
|
|
|
cmess2.flush();
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
event->process( _eventQueue, _eventHistory, _eventLoop );
|
* ./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...
2011-01-09 12:08:57 -06:00
|
|
|
|
2010-03-09 09:24:55 -06:00
|
|
|
count++;
|
2013-12-03 18:59:29 -06:00
|
|
|
if (RoutingEvent::getProcesseds() >= limit) setInterrupt( true );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
ltrace(500) << "Deter| Repair Stage" << endl;
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
cmess1 << " o Repair Stage." << endl;
|
|
|
|
|
|
|
|
ltrace(200) << "Loadind Repair queue." << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
RoutingEvent::setStage( RoutingEvent::Repair );
|
2010-05-03 04:16:50 -05:00
|
|
|
for ( size_t i=0 ; (i<_eventHistory.size()) and not isInterrupted() ; i++ ) {
|
2010-03-09 09:24:55 -06:00
|
|
|
RoutingEvent* event = _eventHistory.getNth(i);
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not event->isCloned() and event->isUnimplemented()) {
|
|
|
|
event->reschedule( _eventQueue, 0 );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
_eventQueue.commit();
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
|
|
|
|
count = 0;
|
2013-12-03 18:59:29 -06:00
|
|
|
//_eventQueue.prepareRepair();
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
while ( not _eventQueue.empty() and not isInterrupted() ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
RoutingEvent* event = _eventQueue.pop();
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
|
|
|
|
if (tty::enabled()) {
|
|
|
|
cmess2 << " <repair.event:" << tty::bold << setw(7) << setfill('0')
|
|
|
|
<< RoutingEvent::getProcesseds() << setfill(' ') << tty::reset << ">" << tty::cr;
|
2013-12-03 18:59:29 -06:00
|
|
|
cmess2.flush();
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
} else {
|
|
|
|
cmess2 << " <repair.event:" << setw(7) << setfill('0')
|
|
|
|
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
|
|
|
|
<< event->getEventLevel() << ":" << event->getPriority() << "> "
|
|
|
|
<< event->getSegment()
|
|
|
|
<< endl;
|
|
|
|
cmess2.flush();
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
event->process( _eventQueue, _eventHistory, _eventLoop );
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
|
|
|
|
count++;
|
2013-12-03 18:59:29 -06:00
|
|
|
if (RoutingEvent::getProcesseds() >= limit ) setInterrupt( true );
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
size_t eventsCount = _eventHistory.size();
|
|
|
|
|
|
|
|
_eventHistory.clear();
|
|
|
|
_eventQueue.clear();
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (RoutingEvent::getAllocateds() > 0) {
|
|
|
|
cerr << Bug( "%d events remains after clear.", RoutingEvent::getAllocateds() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
_statistics.setEventsCount( eventsCount );
|
2010-03-09 09:24:55 -06:00
|
|
|
ltraceout(149);
|
|
|
|
|
|
|
|
return eventsCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NegociateWindow::run ( int slowMotion )
|
|
|
|
{
|
|
|
|
ltrace(150) << "NegociateWindow::run()" << endl;
|
|
|
|
ltracein(149);
|
|
|
|
|
* ./kite:
- New: In NegociateWindow/RoutingEvent, adds a more comprehensive stage
"Repair". Perform in three stage: first try to place with a relaxed
constraint (one GCell on each side). Second try to minimize the faulty
segment. Third perform another "repack perpandicular" but this time
the faulty segment is re-inserted *before* any of it's perpandiculars.
- New: In RoutingEvent::cacheAxisHint(), when a segment has a parent, that
is comes for a "moveUp()", uses the parent axis hint as it's own.
- New: In State::slackenTopology(), in the global FSM, adds a special
operation when reaching MaximumSlack: forceOverLocals(), try to insert
the global on track containing only local segments. Should tend to
concentrate locals on a small set of shared tracks. Most useful on the
highest layers.
- New: In State::slackenTopology(), in the "MoveUp" state, try to find the
more appropriate segment to move up (Manipulator::desaturate()).
Effectively move up the longest segment fully enclosing the one we are
processing.
- New: In State::slackenTopology(), add a check for fully blocked segments
in the local segment FSM. Calls State::solveFullBlocked().
- New: In KiteEngine::createGlobalGraph(), decrease the vertical capacity
of one track inside the core. Helps smooth the vertical density.
- Change: In Manipulator::insertInTrack(), when a track is freed for a
to be inserted changes the priorities so that the segment is immediatly
inserted. Parallels ripeds and theirs perpandiculars are replaced
only *after*. This is the opposite of the previous behavior.
- Change: In NegociateWindow::NegociateOverlapCost(), account the costs
of terminals only for deep depth layers (M1, M2 & M3).
- Change: In RoutingEvent::insertInTrack(), expand the excluded interval
by a half-pitch (2.5l) instead of one lambda.
- Change: In State::State(), do not uses DiscardGlobal if the ripup count
exceed 5. Case of the "Strap" segments that can be ripped a lot
before changing state.
- Change: In State::_processNegociate(), no longer lock into position
(fixed) the local terminal segments as a last resort.
- Change: In RoutingEvent::_processNegociate(), no longer ripup perpandiculars
when a segment is inserted in a free space. Reduce the number of
events whithout degrading the routing quality.
- Change: In State::conflictSolve1_v1b(), if getLongestConflict() is nul,
ignore the track, the conflict must occurs on another track.
- Change: In TrackCost, add a flag support. First uses, a flags to prevent
a local of the topmost layer to ripup a global which is in moveUp
state.
- Bug: In State::solveFullBlockage(), after have been freed, reset the
segment state to "moveUp".
- Bug: In manipulator::minimize(), the axisHint was miscalculated if the
punctual span was empty.
2011-01-25 11:16:50 -06:00
|
|
|
cmess1 << " o Running Negociate Algorithm" << endl;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
TrackElement::setOverlapCostCB( NegociateOverlapCost );
|
|
|
|
RoutingEvent::resetProcesseds();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
for ( size_t igcell=0 ; igcell<_gcells.size() ; ++igcell ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
_createRouting( _gcells[igcell] );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
Session::revalidate();
|
|
|
|
_kite->preProcess();
|
|
|
|
Session::revalidate();
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
getKiteEngine()->setMinimumWL( computeWirelength() );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
#if defined(CHECK_DATABASE)
|
|
|
|
unsigned int overlaps = 0;
|
2013-12-03 18:59:29 -06:00
|
|
|
Session::getKiteEngine()->_check( overlaps, "after _createRouting(GCell*)" );
|
2010-12-12 15:42:57 -06:00
|
|
|
#endif
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
_slowMotion = slowMotion;
|
2013-12-03 18:59:29 -06:00
|
|
|
_negociate();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
Session::get()->isEmpty();
|
|
|
|
|
|
|
|
# if defined(CHECK_DATABASE)
|
2013-12-03 18:59:29 -06:00
|
|
|
_kite->_check( overlaps, "after negociation" );
|
2010-03-09 09:24:55 -06:00
|
|
|
# endif
|
|
|
|
|
|
|
|
ltraceout(149);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NegociateWindow::printStatistics () const
|
|
|
|
{
|
2010-06-22 08:59:22 -05:00
|
|
|
cmess1 << " o Computing statistics." << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - Processeds Events Total",RoutingEvent::getProcesseds()) << endl;
|
|
|
|
cmess1 << Dots::asSizet(" - Unique Events Total"
|
|
|
|
,(RoutingEvent::getProcesseds() - RoutingEvent::getCloneds())) << endl;
|
2010-12-12 15:42:57 -06:00
|
|
|
cmess1 << Dots::asSizet(" - # of GCells",_statistics.getGCellsCount()) << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
_kite->printCompletion();
|
2010-08-22 07:38:27 -05:00
|
|
|
|
|
|
|
addMeasure<size_t>( getCell(), "Events" , RoutingEvent::getProcesseds(), 12 );
|
|
|
|
addMeasure<size_t>( getCell(), "UEvents", RoutingEvent::getProcesseds()-RoutingEvent::getCloneds(), 12 );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2010-12-15 09:12:00 -06:00
|
|
|
Histogram* densityHistogram = new Histogram ( 1.0, 0.1, 2 );
|
|
|
|
addMeasure<Histogram>( getCell(), "GCells Density Histogram", densityHistogram );
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
densityHistogram->setFileExtension( ".density.histogram" );
|
|
|
|
densityHistogram->setMainTitle ( "GCell Densities" );
|
|
|
|
densityHistogram->setTitle ( "Avg. Density", 0 );
|
|
|
|
densityHistogram->setTitle ( "Peak Density", 1 );
|
|
|
|
densityHistogram->setColor ( "green", 0 );
|
|
|
|
densityHistogram->setColor ( "red" , 1 );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
|
|
|
const Katabatic::GCellVector* gcells = getKiteEngine()->getGCellGrid()->getGCellVector();
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxHVDensity );
|
2010-12-12 15:42:57 -06:00
|
|
|
for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 0 );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxDensity );
|
2010-12-12 15:42:57 -06:00
|
|
|
for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 1 );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
densityHistogram->normalize( 0 );
|
|
|
|
densityHistogram->normalize( 1 );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string NegociateWindow::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream os;
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
os << "<" << _getTypeName() << ">";
|
2013-12-03 18:59:29 -06:00
|
|
|
return os.str();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* NegociateWindow::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = new Record ( _getString() );
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
record->add( getSlot( "_gcells", _gcells ) );
|
|
|
|
return record;
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
} // Kite namespace.
|