coriolis/kite/src/NegociateWindow.cpp

660 lines
21 KiB
C++
Raw Normal View History

// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2008-2018, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | 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" |
// +-----------------------------------------------------------------+
#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"
namespace {
using namespace std;
using namespace Hurricane;
using namespace CRL;
using namespace Kite;
void NegociateOverlapCost ( const TrackElement* segment, TrackCost& cost )
{
cdebug_log(9000,0) << "Deter| NegociateOverlapCost() " << segment << endl;
Interval intersect = segment->getCanonicalInterval();
if (not intersect.intersect(cost.getInterval())) return;
if (segment->isBlockage() or segment->isFixed()) {
cdebug_log(159,0) << "Infinite cost from: " << segment << endl;
cost.setInfinite ();
cost.setOverlap ();
cost.setHardOverlap();
cost.setBlockage ();
return;
}
if (cost.getInterval().getVMax() > intersect.getVMax()) cost.setLeftOverlap();
if (cost.getInterval().getVMin() < intersect.getVMin()) cost.setRightOverlap();
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 {
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
}
DataNegociate* data = segment->getDataNegociate();
if (not data) return;
cost.mergeRipupCount( data->getRipupCount() );
if ( segment->isLocal() ) {
cost.mergeDataState( data->getState() );
if (data->getState() >= DataNegociate::LocalVsGlobal) {
cdebug_log(159,0) << "MaximumSlack/LocalVsGlobal for " << segment << endl;
}
}
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
}
cost.setOverlap();
if ( segment->isLocal()
or (cost.isForGlobal() and (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3)) ) {
cdebug_log(9000,0) << "Deter| incTerminals() " << boolalpha << cost.isForGlobal() << " " << (data->getTerminals()*100) << endl;
cost.incTerminals( data->getTerminals()*100 );
} else {
cdebug_log(9000,0) << "Deter| isForGlobal() " << boolalpha << cost.isForGlobal() << 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
cdebug_log(159,0) << "| Increment Delta: " << DbU::getValueString(intersect.getSize()) << endl;
cost.incDelta( intersect.getSize() );
}
void loadRoutingPads ( NegociateWindow* nw )
{
AllianceFramework* af = AllianceFramework::get ();
RoutingGauge* rg = nw->getKiteEngine()->getRoutingGauge();
for( Net* net : nw->getCell()->getNets() ) {
if (net->getType() == Net::Type::POWER ) continue;
if (net->getType() == Net::Type::GROUND) continue;
if (net->getType() == Net::Type::CLOCK ) continue;
if (af->isBLOCKAGE(net->getName())) continue;
for( RoutingPad* rp : net->getRoutingPads() ) {
size_t depth = rg->getLayerDepth(rp->getLayer());
if (depth > 0) continue;
if (depth == 0)
TrackMarker::create( rp, 1 );
}
}
}
} // Anonymous namespace.
namespace Kite {
using std::cerr;
using std::endl;
using std::setw;
using std::left;
using std::right;
using std::setprecision;
using Hurricane::Warning;
using Hurricane::Bug;
using Hurricane::tab;
using Hurricane::ForEachIterator;
using CRL::Histogram;
using CRL::addMeasure;
using Katabatic::AutoContact;
using Katabatic::AutoSegmentLut;
using Katabatic::perpandicularTo;
// -------------------------------------------------------------------
// Class : "NegociateWindow".
NegociateWindow::NegociateWindow ( KiteEngine* kite )
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
: _flags (KtNoFlags)
, _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)
{ }
NegociateWindow* NegociateWindow::create ( KiteEngine* kite )
{
NegociateWindow* negociateWindow = new NegociateWindow ( kite );
return negociateWindow;
}
NegociateWindow::~NegociateWindow ()
{ }
void NegociateWindow::destroy ()
{ delete this; }
Cell* NegociateWindow::getCell () const
{ return _kite->getCell(); }
void NegociateWindow::setGCells ( const Katabatic::GCellVector& gcells )
{
_gcells = gcells;
loadRoutingPads( this );
Session::revalidate();
TrackElement* segment;
AutoSegmentLut lut = Session::getKiteEngine()->_getAutoSegmentLut();
AutoSegmentLut::iterator it = lut.begin ();
for ( ; it != lut.end() ; it++ ) {
segment = Session::lookup( it->second );
if (segment) segment->getDataNegociate()->update();
}
_statistics.setGCellsCount( _gcells.size() );
}
void NegociateWindow::addRoutingEvent ( TrackElement* segment, unsigned int level )
{
DataNegociate* data = segment->getDataNegociate();
if (not data or not data->hasRoutingEvent())
_eventQueue.add( segment, level );
else
cerr << Bug( "NegociateWidow::addRoutingEvent(): Try to adds twice the same TrackElement event."
"\n %p:%s."
, (void*)segment->base()->base()
, getString(segment).c_str()
) << endl;
}
TrackElement* NegociateWindow::createTrackSegment ( AutoSegment* autoSegment, unsigned int flags )
{
cdebug_log(159,1) << "NegociateWindow::createTrackSegment() - " << autoSegment << endl;
// Special case: fixed AutoSegments must not interfere with blockages.
// Ugly: uses of getExtensionCap().
if (autoSegment->isFixed()) {
RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer());
Track* track = plane->getTrackByPosition( autoSegment->getAxis() );
size_t begin;
size_t end;
Interval fixedSpan;
Interval blockageSpan;
autoSegment->getCanonical( fixedSpan );
ExtensionCap support and source/target terminal flags in Katabatic & Kite. Placement management: * Change: In <metis>, always disable the hMetis support regardless of it being detected or not as the placer is still unable manage the final bin contents. Routing gauge management: * Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and size for the routing layers and the cell gauge. * Change: In Katabatic & Kite, extract the correct extension cap for each routing layer from the layers characteristics (cache then in Katabatic::Configuration). * Change: In Katabatic, <AutoSegment>, create segment with the wire width defined in the gauge. For AutoSegment created on already existing Segment from the global routing, adjust the width. * Change: In Katabatic, <AutoSegment>, more accurate information about how a segment is connected to terminal via source and/or target. The flag SegStrongTerminal is splitted into SegSourceTerminal and SegSourceTarget (but still used as a mask). So now we can know by which end an AutoSegment is connected to a terminal. * Change: In Katabatic, ::doRp_Access(), create constraint freeing segments not only when HSmall but also when VSmall (more critical for <vsclib>). Otherwise we may see AutoSegments with incompatible source/target constraints. * Change: In Kite, BuildPowerRails, do not create blockage on PinOnly layers *but* still create power rails planes. This is a temporary workaround for <vsclib> where the METAL1 blockages overlaps the terminals (it was fine for Nero, but they shouldn't for Kite). * Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained, directly bybass it's slackening state to DataNegociate::Slacken. Also rename the flag "_canHandleConstraints" to "_overConstrained", seems clearer to me. Miscellaneous: * Change: In CRL Core, <Utilities>, add a "pass-though" capability on the mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
fixedSpan.inflate( Session::getExtensionCap(autoSegment->getLayer())-1 );
track->getOverlapBounds( fixedSpan, begin, end );
for ( ; (begin < end) ; begin++ ) {
TrackElement* other = track->getSegment(begin);
cdebug_log(159,0) << "| overlap: " << other << endl;
if (not other->isBlockage()) continue;
other->getCanonical( blockageSpan );
ExtensionCap support and source/target terminal flags in Katabatic & Kite. Placement management: * Change: In <metis>, always disable the hMetis support regardless of it being detected or not as the placer is still unable manage the final bin contents. Routing gauge management: * Bug: In CRL Core, <vsclib/alliance.conf>, set the correct pitches and size for the routing layers and the cell gauge. * Change: In Katabatic & Kite, extract the correct extension cap for each routing layer from the layers characteristics (cache then in Katabatic::Configuration). * Change: In Katabatic, <AutoSegment>, create segment with the wire width defined in the gauge. For AutoSegment created on already existing Segment from the global routing, adjust the width. * Change: In Katabatic, <AutoSegment>, more accurate information about how a segment is connected to terminal via source and/or target. The flag SegStrongTerminal is splitted into SegSourceTerminal and SegSourceTarget (but still used as a mask). So now we can know by which end an AutoSegment is connected to a terminal. * Change: In Katabatic, ::doRp_Access(), create constraint freeing segments not only when HSmall but also when VSmall (more critical for <vsclib>). Otherwise we may see AutoSegments with incompatible source/target constraints. * Change: In Kite, BuildPowerRails, do not create blockage on PinOnly layers *but* still create power rails planes. This is a temporary workaround for <vsclib> where the METAL1 blockages overlaps the terminals (it was fine for Nero, but they shouldn't for Kite). * Change: In Kite, <RoutingEvent>, if a TrackSegment is overconstrained, directly bybass it's slackening state to DataNegociate::Slacken. Also rename the flag "_canHandleConstraints" to "_overConstrained", seems clearer to me. Miscellaneous: * Change: In CRL Core, <Utilities>, add a "pass-though" capability on the mstream to temporarily make them print everything.
2014-05-25 08:00:35 -05:00
blockageSpan.inflate( Session::getExtensionCap(autoSegment->getLayer()) );
cdebug_log(159,0) << " fixed:" << fixedSpan << " vs. blockage:" << blockageSpan << endl;
if (not fixedSpan.intersect(blockageSpan)) continue;
// Overlap between fixed & blockage.
cdebug_log(159,0) << "* Blockage overlap: " << autoSegment << endl;
Session::destroyRequest( autoSegment );
cerr << Warning( "Overlap between fixed %s and blockage at %s."
, getString(autoSegment).c_str()
, getString(blockageSpan).c_str() ) << endl;
cdebug_tabw(159,-1);
return NULL;
}
}
Interval span;
autoSegment = autoSegment->getCanonical( span );
bool created;
TrackElement* trackSegment = TrackSegment::create( autoSegment, NULL, created );
if (not (flags & KtLoadingStage))
cdebug_log(159,0) << "* lookup: " << autoSegment << endl;
if (created) {
cdebug_log(159,0) << "* " << trackSegment << endl;
RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer());
Track* track = plane->getTrackByPosition ( autoSegment->getAxis() );
Interval uside = autoSegment->getAutoSource()->getGCell()->getSide( perpandicularTo(autoSegment->getDirection()) );
Interval constraints;
autoSegment->getConstraints( constraints );
uside.intersection( constraints );
if (track->getAxis() > uside.getVMax()) track = track->getPreviousTrack();
if (track->getAxis() < uside.getVMin()) track = track->getNextTrack();
cdebug_log(159,0) << "* GCell U-side " << uside << endl;
cdebug_log(159,0) << "* " << plane << endl;
cdebug_log(159,0) << "* " << track << endl;
trackSegment->setAxis( track->getAxis(), Katabatic::SegAxisSet );
trackSegment->invalidate();
if (trackSegment->isFixed()) {
Session::addInsertEvent( trackSegment, track );
} else {
_segments.push_back( trackSegment );
}
}
if (not created and not (flags & KtLoadingStage)) {
cdebug_log(159,0) << "TrackSegment already exists (and not in loading stage)." << endl;
}
cdebug_tabw(159,-1);
return trackSegment;
}
double NegociateWindow::computeWirelength ()
{
set<TrackElement*> accounteds;
double totalWL = 0.0;
for ( size_t igcell=0 ; igcell<_gcells.size() ; ++igcell ) {
double gcellWL = 0.0;
Segment* segment;
TrackElement* trackSegment;
const vector<AutoContact*>& contacts = _gcells[igcell]->getContacts();
for ( size_t i=0 ; i<contacts.size() ; i++ ) {
for( Hook* hook : contacts[i]->getBodyHook()->getSlaveHooks() ) {
Hook* sourceHook = dynamic_cast<Segment::SourceHook*>(hook);
if (not sourceHook) continue;
segment = dynamic_cast<Segment*>(sourceHook->getComponent());
trackSegment = Session::lookup( segment );
if (trackSegment) {
if (accounteds.find(trackSegment) != accounteds.end()) continue;
accounteds.insert( trackSegment );
gcellWL += DbU::getLambda( trackSegment->getLength() );
}
}
}
// Partial sum to limit rounding errors.
totalWL += gcellWL;
}
return totalWL;
}
void NegociateWindow::_createRouting ( Katabatic::GCell* gcell )
{
cdebug_log(159,1) << "NegociateWindow::_createRouting() - " << gcell << endl;
Segment* segment;
AutoSegment* autoSegment;
cdebug_log(159,0) << "AutoSegments from AutoContacts" << endl;
const vector<AutoContact*>& contacts = gcell->getContacts();
for ( size_t i=0 ; i<contacts.size() ; i++ ) {
for( Component* component : contacts[i]->getSlaveComponents() ) {
segment = dynamic_cast<Segment*>(component);
autoSegment = Session::base()->lookup( segment );
cdebug_log(159,0) << autoSegment << endl;
if (autoSegment and autoSegment->isCanonical()) {
createTrackSegment( autoSegment, KtLoadingStage );
}
}
}
cdebug_log(159,0) << "_segments.size():" << _segments.size() << endl;
cdebug_tabw(159,-1);
}
void NegociateWindow::_pack ( size_t& count, bool last )
{
unsigned long limit = _kite->getEventsLimit();
unsigned int pushStage = RoutingEvent::getStage();
RoutingEvent::setStage( RoutingEvent::Pack );
RoutingEventQueue packQueue;
//for ( size_t i = (count > 600) ? count-600 : 0
// ; (i<_eventHistory.size()-(last ? 0 : 100)) and not isInterrupted() ; i++ ) {
for ( size_t i=0 ; i<_eventHistory.size() ; ++i ) {
RoutingEvent* event = _eventHistory.getNth(i);
if ( event and not event->isCloned() ) {
cerr << "Cloned:" << event->isCloned()
<< " UTurn:" << event->getSegment()->isUTurn() << " " << event->getSegment() << endl;
}
if ( event and not event->isCloned() and event->getSegment()->isUTurn() ) {
event->reschedule( packQueue, 0 );
}
}
packQueue.commit();
while ( not packQueue.empty() and not isInterrupted() ) {
RoutingEvent* event = packQueue.pop();
if (tty::enabled()) {
cmess2 << " <pack.event:" << tty::bold << setw(8) << setfill('0')
<< RoutingEvent::getProcesseds() << tty::reset
<< " remains:" << right << setw(8) << setfill('0')
<< packQueue.size() << ">"
<< setfill(' ') << tty::reset << tty::cr;
cmess2.flush();
} else {
cmess2 << " <pack.event:" << setw(8) << setfill('0')
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
<< event->getEventLevel() << ":" << event->getPriority() << "> "
<< event->getSegment()
<< endl;
cmess2.flush();
}
event->process( packQueue, _eventHistory, _eventLoop );
if (RoutingEvent::getProcesseds() >= limit) setInterrupt( true );
}
// Count will be wrong!
RoutingEvent::setStage( pushStage );
}
size_t NegociateWindow::_negociate ()
{
cdebug_log(9000,0) << "Deter| NegociateWindow::_negociate()" << endl;
cdebug_log(159,1) << "NegociateWindow::_negociate() - " << _segments.size() << 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 Negociation Stage." << endl;
unsigned long limit = _kite->getEventsLimit();
bool profiling = _kite->profileEventCosts();
ofstream ofprofile;
if (profiling) ofprofile.open( "kite.profile.txt" );
_eventHistory.clear();
_eventQueue.load( _segments );
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <queue:" << right << setw(8) << setfill('0') << _eventQueue.size() << ">" << endl;
if (cdebug.enabled(9000)) _eventQueue.dump();
size_t count = 0;
RoutingEvent::setStage( RoutingEvent::Negociate );
while ( not _eventQueue.empty() and not isInterrupted() ) {
RoutingEvent* event = _eventQueue.pop();
if (tty::enabled()) {
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <event:" << tty::bold << right << setw(8) << setfill('0')
<< RoutingEvent::getProcesseds() << tty::reset
<< " remains:" << right << setw(8) << setfill('0')
<< _eventQueue.size()
<< 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 ();
} else {
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <event:" << right << setw(8) << setfill('0')
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
<< event->getEventLevel() << ":" << event->getPriority() << "> "
<< event->getSegment()
<< endl;
cmess2.flush();
}
if (ofprofile.is_open()) {
size_t depth = _kite->getConfiguration()->getLayerDepth( event->getSegment()->getLayer() );
if (depth < 6) {
ofprofile << setw(10) << right << count << " ";
for ( size_t i=0 ; i<6 ; ++i ) {
if (i == depth)
ofprofile << setw(10) << right << setprecision(2) << event->getPriority () << " ";
else
ofprofile << setw(10) << right << setprecision(2) << 0.0 << " ";
}
ofprofile << setw( 2) << right << event->getEventLevel() << endl;
}
}
event->process( _eventQueue, _eventHistory, _eventLoop );
count++;
//if (count and not (count % 500)) {
// _pack( count, false );
//}
if (RoutingEvent::getProcesseds() >= limit) setInterrupt( true );
}
//_pack( count, true );
if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl;
cdebug_log(9000,0) << "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;
cdebug_log(159,0) << "Loadind Repair queue." << endl;
RoutingEvent::setStage( RoutingEvent::Repair );
for ( size_t i=0 ; (i<_eventHistory.size()) and not isInterrupted() ; i++ ) {
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
if (not event->isCloned() and event->isUnimplemented()) {
event->reschedule( _eventQueue, 0 );
}
}
_eventQueue.commit();
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <repair.queue:" << right << setw(8) << setfill('0')
<< _eventQueue.size() << ">" << 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
count = 0;
//_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() ) {
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()) {
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <repair.event:" << tty::bold << setw(8) << setfill('0')
<< RoutingEvent::getProcesseds() << tty::reset
<< " remains:" << right << setw(8) << setfill('0')
<< _eventQueue.size() << ">"
<< setfill(' ') << tty::reset << tty::cr;
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 {
Support for Net alias names. Blif parser enhancements. * New: In Hurricane, In Net & Cell, support for Net aliases names. Use a structure based on a simple ring of NetAliasHook. The Net holds a global map, sorted by names of all the aliases of all Nets. Elements NetAliasesHook of the map are slaves of ring whose master is an attribute of the Net (it is *not* in the map, as the primary name of the Net). In case of merge, the aliases of both Nets are merged and the name of the merged one become an alias. The Cell::getNet() looks in both the Net map and the aliases to find a Net by name. * Bug: In CRL Core, in coriolisInit.py, reoder the loading of the configuration files so the real technology is read as early as possible to set up the <gridsPerLambda> factor before any lambda is actually computed... * Bug: In CRL Core, in AcmSigda, do not try to fed the file when it has failed to be opened. Throw a clean exception instead. * New: In CRL Core, in Toolbox, add a NamingScheme object to convert a design into VHDL compliant names (mainly from Blif/Verilog). This is extensible in any case. * New: In CRL Core, in BlifParser, slightly more informative warning messages. Align the loading progress information on the other parsers. Add a capability to select which component of the design will be returned, if there are more than one. Use the "." as separator. For exemple you can request "Processor.Alu", which will load the "Alu" component from the design in "Processor.blif". To be able to save a Blif loaded design, systematically convert all the name for VHDL compliance, as it is the format used by the Coriolis native files (vst). Export the Blif parser to the Python interface. * New: In Kite, In NegociateWindow, add a counter of the number of remaining events. Gives an idea of the ETA... * New: In Unicorn, in cgt.by, add an option to load a Blif design from the command line. * New: In Cumulus, new RSave plugin to save both netlist & layout. Partly redundant with the previous one. Have to better organize that later.
2015-04-16 08:40:02 -05:00
cmess2 << " <repair.event:" << setw(8) << setfill('0')
* ./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
<< RoutingEvent::getProcesseds() << setfill(' ') << " "
<< event->getEventLevel() << ":" << event->getPriority() << "> "
<< event->getSegment()
<< endl;
cmess2.flush();
}
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++;
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
}
if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl;
size_t eventsCount = _eventHistory.size();
_eventHistory.clear();
_eventQueue.clear();
if (RoutingEvent::getAllocateds() > 0) {
cerr << Bug( "%d events remains after clear.", RoutingEvent::getAllocateds() ) << endl;
}
if (ofprofile.is_open()) ofprofile.close();
_statistics.setEventsCount( eventsCount );
cdebug_tabw(159,-1);
return eventsCount;
}
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
void NegociateWindow::run ( unsigned int flags )
{
cdebug_log(159,1) << "NegociateWindow::run()" << 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 Running Negociate Algorithm" << endl;
TrackElement::setOverlapCostCB( NegociateOverlapCost );
RoutingEvent::resetProcesseds();
for ( size_t igcell=0 ; igcell<_gcells.size() ; ++igcell ) {
_createRouting( _gcells[igcell] );
}
Session::revalidate();
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
if (not (flags & KtPreRoutedStage)) {
_kite->preProcess();
Session::revalidate();
}
_kite->setMinimumWL( computeWirelength() );
#if defined(CHECK_DATABASE)
unsigned int overlaps = 0;
Session::getKiteEngine()->_check( overlaps, "after _createRouting(GCell*)" );
#endif
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
_flags |= flags;
_negociate();
printStatistics();
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
if (flags & KtPreRoutedStage) {
_kite->setFixedPreRouted();
}
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
Session::revalidate();
Session::get()->isEmpty();
# if defined(CHECK_DATABASE)
_kite->_check( overlaps, "after negociation" );
# endif
cdebug_tabw(159,-1);
}
void NegociateWindow::printStatistics () const
{
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;
cmess1 << Dots::asSizet(" - # of GCells",_statistics.getGCellsCount()) << endl;
_kite->printCompletion();
addMeasure<size_t>( getCell(), "Events" , RoutingEvent::getProcesseds(), 12 );
addMeasure<size_t>( getCell(), "UEvents", RoutingEvent::getProcesseds()-RoutingEvent::getCloneds(), 12 );
Histogram* densityHistogram = new Histogram ( 1.0, 0.1, 2 );
addMeasure<Histogram>( getCell(), "GCells Density Histogram", densityHistogram );
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 );
const Katabatic::GCellVector* gcells = getKiteEngine()->getGCellGrid()->getGCellVector();
getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxHVDensity );
for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) {
densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 0 );
}
getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxDensity );
for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) {
densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 1 );
}
densityHistogram->normalize( 0 );
densityHistogram->normalize( 1 );
}
string NegociateWindow::_getString () const
{
ostringstream os;
os << "<" << _getTypeName() << ">";
return os.str();
}
Record* NegociateWindow::_getRecord () const
{
Record* record = new Record ( _getString() );
record->add( getSlot( "_gcells", _gcells ) );
return record;
}
} // Kite namespace.