2013-12-03 18:59:29 -06:00
|
|
|
// -*- mode: C++; explicit-buffer-name: "Session.cpp<kite>" -*-
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2016-03-06 05:37:30 -06:00
|
|
|
// Copyright (c) UPMC 2008-2016, All Rights Reserved
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
2013-12-03 18:59:29 -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 : "./Session.cpp" |
|
2013-12-03 18:59:29 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Point.h"
|
|
|
|
#include "hurricane/Error.h"
|
|
|
|
#include "katabatic/GCellGrid.h"
|
|
|
|
#include "kite/Session.h"
|
|
|
|
#include "kite/Track.h"
|
|
|
|
#include "kite/TrackElement.h"
|
|
|
|
#include "kite/KiteEngine.h"
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
using namespace Kite;
|
|
|
|
|
|
|
|
|
|
|
|
const char* reopenSession =
|
|
|
|
"Kite::Session::open() :\n\n"
|
|
|
|
" Session already open for %s (internal error).";
|
|
|
|
|
|
|
|
|
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 Hurricane::tab;
|
|
|
|
using Hurricane::inltrace;
|
|
|
|
using Hurricane::ltracein;
|
|
|
|
using Hurricane::ltraceout;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Bug;
|
2013-12-03 18:59:29 -06:00
|
|
|
using Hurricane::Point;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Session".
|
|
|
|
|
|
|
|
Session::Session ( KiteEngine* kite )
|
|
|
|
: Katabatic::Session(kite)
|
|
|
|
, _insertEvents()
|
|
|
|
, _removeEvents()
|
|
|
|
, _sortEvents ()
|
2013-12-03 18:59:29 -06:00
|
|
|
{ }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
void Session::_postCreate ()
|
2013-12-03 18:59:29 -06:00
|
|
|
{ Katabatic::Session::_postCreate(); }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
Session::~Session ()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
void Session::_preDestroy ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
_isEmpty();
|
|
|
|
Katabatic::Session::_preDestroy();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Session* Session::open ( KiteEngine* kite )
|
|
|
|
{
|
|
|
|
ltrace(110) << "Kite::Session::open()" << endl;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
Session* session = Session::get();
|
|
|
|
if (session) {
|
|
|
|
if (session->_getKiteEngine() != kite)
|
|
|
|
throw Error( reopenSession, getString(session->getKiteEngine()).c_str() );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
return session;
|
|
|
|
}
|
|
|
|
|
|
|
|
session = new Session ( kite );
|
2013-12-03 18:59:29 -06:00
|
|
|
session->_postCreate();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
return session;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Session* Session::get ( const char* message )
|
|
|
|
{ return dynamic_cast<Session*>( Katabatic::Session::get(message) ); }
|
|
|
|
|
|
|
|
|
|
|
|
Configuration* Session::getConfiguration ()
|
|
|
|
{ return Session::getKiteEngine()->getConfiguration(); }
|
|
|
|
|
|
|
|
|
|
|
|
TrackElement* Session::lookup ( Segment* segment )
|
|
|
|
{ return Session::get("Session::lookup(Segment*)")->_getKiteEngine()->_lookup(segment); }
|
|
|
|
|
|
|
|
|
|
|
|
TrackElement* Session::lookup ( AutoSegment* segment )
|
|
|
|
{ return Session::get("lookup(AutoSegment*)")->_getKiteEngine()->_lookup ( segment ); }
|
|
|
|
|
|
|
|
|
|
|
|
void Session::setInterrupt ( bool state )
|
|
|
|
{ Session::get("setInterrupt()")->_getKiteEngine()->setInterrupt(state); }
|
|
|
|
|
|
|
|
|
|
|
|
KiteEngine* Session::_getKiteEngine ()
|
|
|
|
{ return static_cast<KiteEngine*>(_katabatic); }
|
|
|
|
|
|
|
|
|
|
|
|
Net* Session::_getBlockageNet ()
|
|
|
|
{ return _getKiteEngine()->getBlockageNet(); };
|
|
|
|
|
|
|
|
|
|
|
|
NegociateWindow* Session::_getNegociateWindow ()
|
|
|
|
{ return _getKiteEngine()->getNegociateWindow(); };
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int Session::_getRipupCost ()
|
|
|
|
{ return _getKiteEngine()->getRipupCost(); };
|
|
|
|
|
|
|
|
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::GCell* Session::_getGCellUnder ( DbU::Unit x, DbU::Unit y )
|
2010-03-09 09:24:55 -06:00
|
|
|
{ return _getKiteEngine()->getGCellGrid()->getGCell(Point(x,y)); };
|
|
|
|
|
|
|
|
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
void Session::_doRemovalEvents ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
|
|
|
set<Track*> packTracks;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( size_t i=0 ; i<_removeEvents.size() ; ++i ) {
|
|
|
|
if (not _removeEvents[i]._segment->getTrack()) continue;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
packTracks.insert( _removeEvents[i]._segment->getTrack() );
|
|
|
|
_removeEvents[i]._segment->detach();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
_removeEvents.clear();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( set<Track*>::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
|
|
|
|
(*it)->doRemoval();
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
size_t Session::_revalidate ()
|
|
|
|
{
|
|
|
|
ltrace(150) << "Kite::Session::_revalidate()" << endl;
|
|
|
|
ltracein(150);
|
|
|
|
|
|
|
|
_doRemovalEvents();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( size_t i=0 ; i<_insertEvents.size() ; ++i ) {
|
|
|
|
if (_insertEvents[i]._segment) {
|
|
|
|
_insertEvents[i]._track->insert( _insertEvents[i]._segment );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
if (_insertEvents[i]._marker) _insertEvents[i]._track->insert( _insertEvents[i]._marker );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
_insertEvents.clear();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
// Check if to be destroyeds are not associateds with TrackSegments.
|
|
|
|
const set<AutoSegment*>& destroyeds = getDestroyeds();
|
|
|
|
set<AutoSegment*>::const_iterator idestroyed = destroyeds.begin();
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( ; idestroyed != destroyeds.end() ; ++idestroyed ) {
|
|
|
|
if (lookup(*idestroyed)) {
|
|
|
|
ltraceout(90);
|
|
|
|
throw Error( "Destroyed AutoSegment is associated with a TrackSegment\n"
|
|
|
|
" (%s)"
|
|
|
|
, getString(*idestroyed).c_str());
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
size_t count = Katabatic::Session::_revalidate();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
Interval span;
|
2013-12-03 18:59:29 -06:00
|
|
|
const vector<AutoSegment*>& revalidateds = getRevalidateds();
|
|
|
|
//const set<Net*>& netsModificateds = getNetsModificateds();
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<revalidateds.size() ; ++i ) {
|
|
|
|
if (not revalidateds[i]->isCanonical()) continue;
|
|
|
|
|
|
|
|
//Net* currentNet = NULL;
|
|
|
|
TrackElement* trackSegment = lookup( revalidateds[i] );
|
|
|
|
|
|
|
|
if (trackSegment and trackSegment->isInvalidated()) {
|
|
|
|
trackSegment->revalidate();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
_doglegReset();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
# if defined(CHECK_DATABASE)
|
|
|
|
unsigned int overlaps = 0;
|
|
|
|
# endif
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
for ( Track* track : _sortEvents ) {
|
|
|
|
track->doReorder();
|
2010-03-09 09:24:55 -06:00
|
|
|
# if defined(CHECK_DATABASE)
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
track->check( overlaps, "Session::_revalidate() - track sorting." );
|
2010-03-09 09:24:55 -06:00
|
|
|
# endif
|
|
|
|
}
|
|
|
|
|
|
|
|
# if defined(CHECK_DATABASE)
|
2013-12-03 18:59:29 -06:00
|
|
|
for ( set<Track*>::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
|
|
|
|
(*it)->check( overlaps, "Session::_revalidate() - on packed track." );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
for ( size_t i=0 ; i<revalidateds.size() ; ++i ) {
|
Implementation of pre-routing support (for clock-tree compliance).
* New: In Katabatic, in <AutoContact>, this class is no longer derived
from ExtentionGo. With the simplificated AutoContacts, there is no
reason to do so, and it will save some QuadTree insertions/deletions.
New factory function AutoContact::createFrom(Contact*) which try to
build an AutoContact on top of a Hurricane::Contact. Of course that
base contact *must fit* into one of the predefined Contact
configurations (Terminal, Turn, HTee or VTee).
NOTE: This implies that the pre-routed segments & contacts *are*
correctly articulated, which is not the case when a Cell is read
from disk in "ap" format. The pre-routing feature must be used for
now without any re-read from disk. We will implement a re-articulating
pre-process in the future.
* Change: In Katabatic, in <AutoContact> derived classes, the ::updateCache()
method now display an accurate error message if a segment is connected
but has no AutoSegment conterpart (i.e. the lookup fails).
* New: In Katabatic, in <AutoSegment>, the ::computeOptimal() method is
short-circuited for pre-routed segments, the optimal axis position is
considered to be the one it is currently on (i.e. we trust the designer).
* New: In Katabatic, in <KatabaticEngine>, the ::loadGlobalRouting()
method now accept a map of excluded nets (same as Knik). This map is
the one of pre-routed nets.
* New: In Katabatic, in layer assignment, do not try to displace fixed
segments...
* New: In Katabatic, in <AutoSegment>, new flag SegUserDefined and related
methods to know if a segment comes from the global router (Knik) or
is pre-routed (supplied by the user).
* New: In Kite, In <BuildPowerRails>, support (exclusion) for pre-routed
nets.
* New: In Kite, In <GraphicKiteEngine> new menu entry for running the
router on pre-routed nets ("Detailed Pre-Route"), also integrated
in the all-on-one route command.
* New: In Kite, In KiteEngine, new method ::_initDataBase() that group
all the initialisation steps. It is a mix of calls between Knik and
Kite initializations which are intertwinneds (may have to devellop
a shared common base at a later point). It creates the Knik grid,
then the Katabatic grid, then load pre-routed wires and power rails
and protect isolated RoutingPads.
Add support for a map of pre-routed nets (to be excluded for
Knik calls).
The method "::run()" now uses function flags, firstly to know if
it is managing pre-routed wires or general purposes ones.
* New: In Kite, in <NegociateWindow>, the "::run()" methods has now two
modes. The normal one and the 'KtPreRoutedStage' that is for routing
pre-routed nets. When in pre-route stage, the wires are fixed at the
end of this step.
* New: In Kite, in <TrackElement> add decorator for AutoSegment
isUsedDefined().
* New: In Kite, in <TrackSegment>, the various ::canDogleg() methods
returns false for a pre-routed (user-defined segment).
* New: In Kite, in PyKiteEngine, added new method runNegociatePreRouted().
2014-06-21 13:16:47 -05:00
|
|
|
revalidateds[i]->check();
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
}
|
|
|
|
|
2010-03-09 09:24:55 -06:00
|
|
|
//_getKiteEngine()->_showOverlap ();
|
|
|
|
# endif
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
_sortEvents.clear();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
#if THIS_IS_DISABLED
|
|
|
|
if (not faileds.empty()) {
|
2010-05-11 06:04:47 -05:00
|
|
|
set<TrackElement*>::iterator ifailed = faileds.begin();
|
2010-12-12 15:42:57 -06:00
|
|
|
Katabatic::GCellVector gcells;
|
2010-05-11 06:04:47 -05:00
|
|
|
for ( ; ifailed != faileds.end() ; ++ifailed ) {
|
|
|
|
(*ifailed)->getGCells ( gcells );
|
2013-12-03 18:59:29 -06:00
|
|
|
(*ifailed)->makeDogLeg( gcells[0] );
|
2010-05-11 06:04:47 -05:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
count += _revalidate();
|
2010-05-11 06:04:47 -05:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
#endif
|
2010-05-11 06:04:47 -05:00
|
|
|
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
// Looking for reduced/raised segments.
|
|
|
|
for ( size_t i=0 ; i<revalidateds.size() ; ++i ) {
|
|
|
|
if (revalidateds[i]->canReduce()) {
|
|
|
|
revalidateds[i]->reduce();
|
|
|
|
TrackElement* trackSegment = lookup( revalidateds[i] );
|
|
|
|
if (trackSegment->getTrack()) _addRemoveEvent( trackSegment );
|
|
|
|
ltrace(150) << "Session: reduce:" << revalidateds[i] << endl;
|
|
|
|
}
|
|
|
|
if (revalidateds[i]->mustRaise()) {
|
|
|
|
revalidateds[i]->raise();
|
|
|
|
lookup( revalidateds[i] )->reschedule( 0 );
|
|
|
|
ltrace(150) << "Session: raise:" << revalidateds[i] << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_doRemovalEvents();
|
|
|
|
|
|
|
|
ltraceout(150);
|
2010-03-09 09:24:55 -06:00
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Session::_isEmpty () const
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if ( not _insertEvents.empty() or not _removeEvents.empty() or not _sortEvents.empty() ) {
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
cerr << Bug( "Session::_isEmpty() failed :\n"
|
|
|
|
" %u inserts, %u removes and %u sort events remains."
|
2010-03-09 09:24:55 -06:00
|
|
|
, _insertEvents.size()
|
|
|
|
, _removeEvents.size()
|
|
|
|
, _sortEvents .size() ) << endl;
|
Added support for "same layer" dogleg. Big fix for pad routing.
* Change: In Knik, in Vertex, add a "blocked" flag to signal disabled
vertexes in the grid (must not be used by the global router).
Modificate the Graph::getVertex() method so that when a vertex
is geometrically queried, if is a blocked one, return a non-blocked
neighbor. This mechanism is introduced to, at last, prevent the
global router to go *under* the pad in case of a commplete chip.
* New: In Katabatic, in AutoSegment, a new state has been added: "reduced".
A reduced segment is in the same layer as it's perpandiculars.
To be reduced, a segments has to be connected on source & target to
AutoContactTurn, both of the perpandiculars must be of the same layer
(below or above) and it's length must not exceed one pitch in the
perpandicular direction.
To reduce an AutoSegment, call ::reduce() and to revert the state,
call ::raise(). Two associated predicates are associated:
::canReduce() and ::mustRaise().
Note: No two adjacent segments can be reduced at the same time.
* Bug: In Katabatic, in GCellTopology, add a new method ::doRp_AccessPad()
to connect to the pads. Create wiring, fixed and non managed by
Katabatic, to connect the pad connector layer to the lowest routing
layers (depth 1 & 2). The former implementation was sometimes leading
to gaps (sheared contact) that *must not* occurs during the building
stage.
Remark: This bug did put under the light the fact that the initial
wiring must be created without gaps. Gaps are closed by making doglegs
on contacts. But this mechanism could only work when the database if
fully initialised (the cache is up to date). Otherwise various problems
arise, in the canonization process for example.
* New: In Katabatic, in AutoContactTerminal::getNativeConstraintBox(),
when anchored on a RoutingPad, now take account the potential rotation
of the Path's transformation. Here again, for the chip's pads.
* New: In Kite, support for reduced AutoSegment. TrackSegment associateds
to reduced AutoSegment are *not* inserted into track to become
effectively invisibles. When a segment becomes reduced, a TrackEvent
is generated to remove it. Conversely when it is raised a RoutingEvent
is created/rescheduled to insert it. All this is mostly managed inside
the Session::revalidate() method.
* New: In Kite, in KiteEngine::createGlobalGraph(), in case of a chip,
mark all global routing vertexes (Knik) that are under a pad, as blockeds.
* Bug: In Cumulus, in PadsCorona.Side.getAxis(), inversion between X and
Y coordinate of the chip size. Did not show until a non-square chip
was routed (i.e. our MIPS R3000).
* Change: In Stratus1, in st_placement.py add the ClockBuffer class for
backward compatibility with the MIPS32 bench. Have to review this
functionnality coming from the deprecated placeAndroute.py.
In st_instance.py, no longer creates the Plug ring of a Net.
In my opinion it just clutter the display until the P&R is called.
Can re-enable later as an option (in Unicorn).
* Change: In Unicorn, in cgt.py, more reliable way of loading then running
user supplied scripts. Borrowed from alliance-checker-toolkit doChip.py .
2015-08-16 16:29:28 -05:00
|
|
|
if (not _sortEvents.empty()) {
|
|
|
|
cerr << " Remaining sort events on Tracks:" << endl;
|
|
|
|
for ( Track* track : _sortEvents ) {
|
|
|
|
cerr << " | " << track << endl;
|
|
|
|
}
|
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::_addInsertEvent ( TrackMarker* marker, Track* track )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
_insertEvents.push_back( Event(marker,track) );
|
|
|
|
_addSortEvent( track, true );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::_addInsertEvent ( TrackElement* segment, Track* track )
|
|
|
|
{
|
2010-12-12 15:42:57 -06:00
|
|
|
ltrace(200) << "addInsertEvent() " << segment
|
|
|
|
<< "\n @" << track << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
if ( segment->getTrack() != NULL ) {
|
|
|
|
cerr << Bug("Session::addInsertEvent(): Segment already in Track."
|
|
|
|
"\n %s."
|
|
|
|
"\n to %s."
|
|
|
|
,getString(segment).c_str()
|
|
|
|
,getString(track).c_str()
|
|
|
|
) << endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
_insertEvents.push_back( Event(segment,track) );
|
|
|
|
_addSortEvent( track, true );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::_addRemoveEvent ( TrackElement* segment )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not segment->getTrack()) {
|
|
|
|
cerr << Bug( " Kite::Session::addRemoveEvent() : %s is not in any Track."
|
|
|
|
, getString(segment).c_str() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ltrace(200) << "Ripup: @" << DbU::getValueString(segment->getAxis()) << " " << segment << endl;
|
2013-12-03 18:59:29 -06:00
|
|
|
_removeEvents.push_back( Event(segment,segment->getTrack()) );
|
|
|
|
_addSortEvent( segment->getTrack(), true );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::_addMoveEvent ( TrackElement* segment, Track* track )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not segment->getTrack()) {
|
2016-03-06 05:37:30 -06:00
|
|
|
cerr << Bug( " Kite::Session::addMoveEvent() : %s is not yet in a track."
|
2013-12-03 18:59:29 -06:00
|
|
|
, getString(segment).c_str() ) << endl;
|
2016-03-06 05:37:30 -06:00
|
|
|
} else {
|
|
|
|
_addRemoveEvent( segment );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
_addInsertEvent( segment, track );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::_addSortEvent ( Track* track, bool forced )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not track ) {
|
|
|
|
cerr << Bug( " Kite::Session::addSortEvent() : no Track to sort." ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
if (forced) track->invalidate();
|
|
|
|
_sortEvents.insert( track );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string Session::_getTypeName () const
|
|
|
|
{ return "Kite::Session"; }
|
|
|
|
|
|
|
|
|
|
|
|
Record* Session::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = Session::_getRecord ();
|
2013-12-03 18:59:29 -06:00
|
|
|
record->add( getSlot( "_sortEvents" , &_sortEvents ) );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
} // Kite namespace.
|