2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2010-05-03 04:16:50 -05:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
|
|
|
// ===================================================================
|
|
|
|
//
|
|
|
|
// $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 |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./RoutingEventHistory.cpp" |
|
|
|
|
// | *************************************************************** |
|
|
|
|
// | U p d a t e s |
|
|
|
|
// | |
|
|
|
|
// x-----------------------------------------------------------------x
|
|
|
|
|
|
|
|
|
|
|
|
#include <iomanip>
|
|
|
|
|
|
|
|
#include "hurricane/Error.h"
|
|
|
|
#include "kite/RoutingEvent.h"
|
|
|
|
#include "kite/RoutingEventHistory.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Kite {
|
|
|
|
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
using std::setw;
|
|
|
|
using std::setfill;
|
|
|
|
using std::endl;
|
|
|
|
using Hurricane::Error;
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "RoutingEventHistory".
|
|
|
|
|
|
|
|
|
|
|
|
RoutingEventHistory::RoutingEventHistory ()
|
|
|
|
: _events ()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
RoutingEventHistory::~RoutingEventHistory ()
|
|
|
|
{ clear (); }
|
|
|
|
|
|
|
|
|
|
|
|
RoutingEvent* RoutingEventHistory::getNth ( size_t index ) const
|
|
|
|
{
|
|
|
|
if ( index < size() ) return _events[index];
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RoutingEvent* RoutingEventHistory::getRNth ( size_t index ) const
|
|
|
|
{
|
|
|
|
if ( index < size() ) return _events[size()-index-1];
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void RoutingEventHistory::dump ( ostream& o, size_t depth ) const
|
|
|
|
{
|
|
|
|
o << " o Event History top stack:" << endl;
|
|
|
|
if ( _events.empty() ) return;
|
|
|
|
|
|
|
|
size_t stop = (_events.size() > depth) ? (_events.size()-depth-1) : 0;
|
|
|
|
size_t i = _events.size()-1;
|
|
|
|
do {
|
|
|
|
o << " - [" << setfill('0') << setw(3) << i << "]: " << _events[i] << endl;
|
|
|
|
o << setfill(' ');
|
|
|
|
} while ( i && (i-- >= stop) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void RoutingEventHistory::push ( RoutingEvent* event )
|
* ./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
|
|
|
{ _events.push_back(event); }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
void RoutingEventHistory::clear ()
|
|
|
|
{
|
|
|
|
for ( size_t i=0 ; i < _events.size() ; i++ )
|
|
|
|
_events[i]->destroy();
|
|
|
|
_events.clear ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string RoutingEventHistory::_getString () const
|
|
|
|
{
|
|
|
|
string s = "<" + _getTypeName();
|
|
|
|
|
|
|
|
s += ":" + getString(size());
|
|
|
|
s += ">";
|
|
|
|
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* RoutingEventHistory::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = new Record ( getString(this) );
|
|
|
|
record->add ( getSlot ( "_events", &_events ) );
|
|
|
|
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // End of Kite namespace.
|