2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2013-12-03 18:58:58 -06:00
|
|
|
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
2010-03-09 09:24:29 -06:00
|
|
|
//
|
2013-12-03 18:58:58 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:29 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K a t a b a t i c - Routing Toolbox |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
2013-12-03 18:58:58 -06:00
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
2010-03-09 09:24:29 -06:00
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./LayerAssign.cpp" |
|
2013-12-03 18:58:58 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <sstream>
|
|
|
|
#include "hurricane/Bug.h"
|
|
|
|
#include "hurricane/Warning.h"
|
|
|
|
#include "hurricane/DebugSession.h"
|
|
|
|
#include "hurricane/Net.h"
|
|
|
|
#include "hurricane/NetExternalComponents.h"
|
|
|
|
#include "hurricane/Layer.h"
|
|
|
|
#include "hurricane/RoutingPad.h"
|
|
|
|
#include "hurricane/Pad.h"
|
|
|
|
#include "hurricane/Plug.h"
|
|
|
|
#include "hurricane/Instance.h"
|
|
|
|
#include "hurricane/Vertical.h"
|
|
|
|
#include "hurricane/Horizontal.h"
|
|
|
|
#include "crlcore/RoutingGauge.h"
|
|
|
|
#include "katabatic/AutoContact.h"
|
|
|
|
#include "katabatic/AutoSegment.h"
|
|
|
|
#include "katabatic/GCellGrid.h"
|
|
|
|
#include "katabatic/KatabaticEngine.h"
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace Katabatic {
|
|
|
|
|
|
|
|
using Hurricane::DebugSession;
|
|
|
|
using Hurricane::ltracein;
|
|
|
|
using Hurricane::ltraceout;
|
|
|
|
using Hurricane::ForEachIterator;
|
|
|
|
using Hurricane::Warning;
|
|
|
|
|
|
|
|
|
2010-03-23 04:25:15 -05:00
|
|
|
void KatabaticEngine::_desaturate ( unsigned int depth
|
|
|
|
, set<Net*>& globalNets
|
|
|
|
, unsigned long& total
|
|
|
|
, unsigned long& globals )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
if (depth+2 >= Session::getConfiguration()->getAllowedDepth()) {
|
2010-03-09 09:24:29 -06:00
|
|
|
cerr << Warning("Katabatic::_desaturate(): %s, no remaining upper layers."
|
|
|
|
,getString(Session::getRoutingGauge()->getRoutingLayer(depth)->getName()).c_str()
|
|
|
|
) << endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
cmess1 << " o Desaturate layer "
|
|
|
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
GCellDensitySet queue ( depth, *(_gcellGrid->getGCellVector()) );
|
|
|
|
GCell::SetIndex invalidateds;
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
bool optimized = true;
|
|
|
|
while ( optimized ) {
|
2010-12-12 15:43:25 -06:00
|
|
|
Session::revalidate ();
|
2010-03-09 09:24:29 -06:00
|
|
|
optimized = false;
|
2013-12-03 18:58:58 -06:00
|
|
|
queue.requeue ();
|
2010-03-23 04:25:15 -05:00
|
|
|
|
|
|
|
std::set<GCell*,GCell::CompareByKey>::const_iterator igcell = queue.getGCells().begin();
|
|
|
|
size_t i = 0;
|
|
|
|
for ( ; igcell!=queue.getGCells().end() ; ++igcell, ++i ) {
|
2011-01-09 12:08:31 -06:00
|
|
|
ltrace(400) << "_desaturate: [" << depth << "]:"
|
|
|
|
<< (*igcell)->getDensity(depth) << " " << *igcell << endl;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not (*igcell)->isSaturated(depth)) {
|
2011-01-09 12:08:31 -06:00
|
|
|
ltrace(400) << "STOP desaturated: @" << i << " " << *igcell << endl;
|
2010-03-23 04:25:15 -05:00
|
|
|
for ( ; igcell!=queue.getGCells().end() ; ++igcell ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
if ( (*igcell)->isSaturated( depth ) ) {
|
|
|
|
cparanoid << "[ERROR] Still saturated: @" << i << " " << *igcell << endl;
|
2010-03-23 04:25:15 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
optimized = (*igcell)->stepNetDesaturate( depth, globalNets, invalidateds );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
if ( optimized ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
for ( GCell::SetIndex::iterator igcell=invalidateds.begin() ; igcell!=invalidateds.end() ; ++igcell ) {
|
|
|
|
queue.unqueue( *igcell );
|
2010-03-23 04:25:15 -05:00
|
|
|
}
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
break;
|
2010-03-23 04:25:15 -05:00
|
|
|
}
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_layerAssignByLength ( Net* net, unsigned long& total, unsigned long& global, set<Net*>& globalNets )
|
|
|
|
{
|
|
|
|
DebugSession::open ( net, 90 );
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(100) << "Katabatic::_layerAssignByLength( " << net << " )" << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
ltracein(99);
|
|
|
|
|
|
|
|
bool isGlobal = false;
|
|
|
|
set<AutoContact*> globalContacts;
|
|
|
|
|
|
|
|
forEach ( Segment*, isegment, net->getSegments() ) {
|
|
|
|
total++;
|
|
|
|
if ( (*isegment)->getLength() > getGlobalThreshold() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not isGlobal) {
|
2010-03-09 09:24:29 -06:00
|
|
|
isGlobal = true;
|
2013-12-03 18:58:58 -06:00
|
|
|
globalNets.insert( net );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
global++;
|
2013-12-03 18:58:58 -06:00
|
|
|
if ((*isegment)->getLayer() == Session::getRoutingLayer(1)) (*isegment)->setLayer( Session::getRoutingLayer(3) );
|
|
|
|
if ((*isegment)->getLayer() == Session::getRoutingLayer(2)) (*isegment)->setLayer( Session::getRoutingLayer(4) );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ltraceout(99);
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_layerAssignByLength ( unsigned long& total, unsigned long& global, set<Net*>& globalNets )
|
|
|
|
{
|
|
|
|
cmess1 << " o Assign Layer (simple wirelength)." << endl;
|
|
|
|
|
2010-05-11 06:04:23 -05:00
|
|
|
NetSet::iterator inet = _routingNets.begin();
|
|
|
|
for ( ; inet != _routingNets.end() ; ++inet )
|
|
|
|
_layerAssignByLength ( *inet, total, global, globalNets );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
void KatabaticEngine::_layerAssignByTrunk ( Net* net, set<Net*>& globalNets, unsigned long& total, unsigned long& global )
|
2010-03-09 09:24:29 -06:00
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::open( net, 90 );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
ltrace(100) << "Katabatic::_layerAssignByTrunk ( " << net << " )" << endl;
|
|
|
|
ltracein(99);
|
|
|
|
|
|
|
|
bool isGlobal = false;
|
|
|
|
unsigned long netGlobal = 0;
|
|
|
|
unsigned long netTotal = 0;
|
|
|
|
set<AutoContact*> globalContacts;
|
|
|
|
|
|
|
|
forEach ( Segment*, isegment, net->getSegments() ) {
|
|
|
|
netTotal++;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if ((*isegment)->getLength() > getGlobalThreshold()) {
|
2010-03-09 09:24:29 -06:00
|
|
|
isGlobal = true;
|
|
|
|
netTotal = 0;
|
2013-12-03 18:58:58 -06:00
|
|
|
globalNets.insert( net );
|
2010-03-09 09:24:29 -06:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (isGlobal) {
|
2010-03-09 09:24:29 -06:00
|
|
|
forEach ( Segment*, isegment, net->getSegments() ) {
|
|
|
|
netTotal++;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegment* autoSegment = Session::lookup( *isegment );
|
|
|
|
if ( autoSegment and not autoSegment->isStrongTerminal() ) {
|
2010-03-09 09:24:29 -06:00
|
|
|
netGlobal++;
|
|
|
|
|
|
|
|
ltrace(99) << "Migrate to M4/M5: " << autoSegment << endl;
|
2013-12-03 18:58:58 -06:00
|
|
|
if (autoSegment->isHorizontal()) autoSegment->setLayer( Session::getRoutingLayer(3) );
|
|
|
|
if (autoSegment->isVertical ()) autoSegment->setLayer( Session::getRoutingLayer(4) );
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
total += netTotal;
|
|
|
|
global += netGlobal;
|
|
|
|
|
|
|
|
ltraceout(99);
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::_layerAssignByTrunk ( unsigned long& total, unsigned long& global, set<Net*>& globalNets )
|
|
|
|
{
|
|
|
|
cmess1 << " o Assign Layer (whole net trunk)." << endl;
|
|
|
|
|
2010-05-11 06:04:23 -05:00
|
|
|
NetSet::iterator inet = _routingNets.begin();
|
|
|
|
for ( ; inet != _routingNets.end() ; ++inet )
|
2013-12-03 18:58:58 -06:00
|
|
|
_layerAssignByTrunk( *inet, globalNets, total, global );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void KatabaticEngine::moveULeft ( AutoSegment* seed, set<Net*>& globalNets, GCell::SetIndex& invalidateds )
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
{
|
|
|
|
Net* net = seed->getNet();
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::open( net, 90 );
|
|
|
|
|
|
|
|
ltrace(500) << "Deter| Move left: " << seed << endl;
|
|
|
|
|
|
|
|
seed->moveULeft();
|
|
|
|
globalNets.insert( net );
|
|
|
|
|
|
|
|
GCell* begin = seed->getAutoSource()->getGCell();
|
|
|
|
GCell* end = seed->getAutoTarget()->getGCell();
|
|
|
|
|
|
|
|
if (seed->isHorizontal()) {
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
|
|
|
|
begin = begin->getDown();
|
|
|
|
end = end ->getDown();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
} else {
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
|
|
|
|
begin = begin->getLeft();
|
|
|
|
end = end ->getLeft();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
}
|
|
|
|
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void KatabaticEngine::moveURight ( AutoSegment* seed, set<Net*>& globalNets, GCell::SetIndex& invalidateds )
|
|
|
|
{
|
|
|
|
Net* net = seed->getNet();
|
|
|
|
DebugSession::open( net, 90 );
|
|
|
|
|
|
|
|
ltrace(500) << "Deter| Move right: " << seed << endl;
|
|
|
|
|
|
|
|
seed->moveURight();
|
|
|
|
globalNets.insert( net );
|
|
|
|
|
|
|
|
GCell* begin = seed->getAutoSource()->getGCell();
|
|
|
|
GCell* end = seed->getAutoTarget()->getGCell();
|
|
|
|
|
|
|
|
if (seed->isHorizontal()) {
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
|
|
|
|
begin = begin->getUp();
|
|
|
|
end = end ->getUp();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getRight() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
} else {
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
|
|
|
|
begin = begin->getRight();
|
|
|
|
end = end ->getRight();
|
|
|
|
|
|
|
|
for ( GCell* gcell=begin ; gcell and gcell!=end ; gcell=gcell->getUp() )
|
|
|
|
invalidateds.insert( gcell );
|
|
|
|
}
|
|
|
|
|
|
|
|
DebugSession::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KatabaticEngine::moveUpNetTrunk ( AutoSegment* seed, set<Net*>& globalNets, GCell::SetIndex& invalidateds )
|
|
|
|
{
|
|
|
|
Net* net = seed->getNet();
|
|
|
|
unsigned int seedDepth = Session::getRoutingGauge()->getLayerDepth(seed->getLayer());
|
|
|
|
|
|
|
|
DebugSession::open( net, 90 );
|
|
|
|
ltrace(500) << "Deter| moveUpNetTrunk() depth:" << seedDepth << " " << seed << endl;
|
|
|
|
|
|
|
|
if (not seed->canMoveUp( 1.0, KbPropagate|KbAllowTerminal|KbNoCheckLayer) ) {
|
|
|
|
ltrace(500) << "Deter| Reject seed move up, cannot move up." << endl;
|
|
|
|
DebugSession::close();
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
return false;
|
|
|
|
}
|
2011-01-09 12:08:31 -06:00
|
|
|
ltracein(400);
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
globalNets.insert( net );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
vector<AutoSegment*> globals;
|
|
|
|
vector<AutoSegment*> locals;
|
|
|
|
|
|
|
|
forEach ( Segment*, isegment, net->getSegments() ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
AutoSegment* autoSegment = Session::lookup( *isegment );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Loop " << autoSegment << endl;
|
|
|
|
|
|
|
|
if (not autoSegment) continue;
|
|
|
|
if (autoSegment->isLocal()) {
|
|
|
|
if (autoSegment->isStrongTerminal()) continue;
|
|
|
|
locals.push_back( autoSegment );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
} else {
|
|
|
|
// Ugly: Hard-coded GCell side.
|
2013-12-03 18:58:58 -06:00
|
|
|
if ( (autoSegment->getLength() < 3*DbU::lambda(50.0)) and (autoSegment != seed) )
|
|
|
|
locals.push_back( autoSegment );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
else
|
2013-12-03 18:58:58 -06:00
|
|
|
globals.push_back( autoSegment );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
sort( globals.begin(), globals.end(), AutoSegment::CompareId() );
|
|
|
|
sort( locals.begin(), locals.end(), AutoSegment::CompareId() );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
for ( size_t i=0 ; i<globals.size() ; ++i ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Looking up G:" << globals[i] << endl;
|
|
|
|
|
|
|
|
unsigned int depth = Session::getRoutingGauge()->getLayerDepth( globals[i]->getLayer() );
|
|
|
|
if (depth > seedDepth+1) continue;
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2011-01-25 11:16:27 -06:00
|
|
|
if ( globals[i]->isVertical() and (globals[i] != seed) ) continue;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if ( globals[i]->canMoveUp(1.0,KbPropagate|KbAllowTerminal|KbNoCheckLayer) ) {
|
|
|
|
globals[i]->changeDepth( depth+2, KbWithNeighbors );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Trunk move up G:" << globals[i] << endl;
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
vector<GCell*> gcells;
|
2013-12-03 18:58:58 -06:00
|
|
|
globals[i]->getGCells( gcells );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
for ( size_t j=0 ; j<gcells.size() ; j++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
invalidateds.insert( gcells[j] );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
}
|
|
|
|
} else {
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Reject Trunk move up G:" << globals[i] << endl;
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<locals.size() ; ++i ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Looking up L:" << locals[i] << endl;
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
unsigned int depth = Session::getRoutingGauge()->getLayerDepth(locals[i]->getLayer());
|
|
|
|
if (depth > seedDepth+1) continue;
|
2011-01-25 11:16:27 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (locals[i]->canPivotUp(2.0,KbPropagate|KbNoCheckLayer)) {
|
|
|
|
locals[i]->changeDepth( depth+2, KbWithNeighbors );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
//ltrace(500) << "Deter| Trunk move up L:" << locals[i] << endl;
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
vector<GCell*> gcells;
|
2013-12-03 18:58:58 -06:00
|
|
|
locals[i]->getGCells( gcells );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
for ( size_t j=0 ; j<gcells.size() ; j++ ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
invalidateds.insert( gcells[j] );
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-09 12:08:31 -06:00
|
|
|
ltraceout(400);
|
2013-12-03 18:58:58 -06:00
|
|
|
DebugSession::close();
|
* ./katabatic:
- New: In AutoSegment, adds a "_parent" attribute to keep track of the fragmentation
processus. Currently used only for strap segments, points to the original
segment in the appropriate direction (before the split).
- New: In GCell & LayerAssign, new method of layer assignment. Move up
the whole net trunk if only one of it's segment is inside an over-saturated
GCell. AutoSegment are moved up only if there is at least 2 free tracks
remaining on the upper level.
- Change: In Session::_canonize(), uses the lowest segment Id as canonical.
More reliable than geometricals criterions in the end. Assuming that the
segments are being created in deterministic order, which *should* be the
case consediring the way we are walking through the global routing.
- Change: In AutoSegment, completly suppress the CompareCanonical(), replace
it by the much simpler CompareId().
- Change: In GCell::rpDesaturate(), stops desaturation when bottom density
is under 0.5, otherwise we are causing a severe imbalance in M2/M4
densities. All wires pushed up to M4...
- Change: In ChipTools, for the Pad's RoutingPad, reslect the best component
using the one in the lowest layer. To avoid problem when splitting
AutoContact as we expect the base Contact to be on the lower layer.
- Bug: In GCellConfiguration::_GCell_xG_xL1_xL3(), add H/V alignement constraints
in fork case. This allow NE/SW contact to be splitted correctly later.
- Bug: In AutoContact::split(), the connexity on the splitted contacts was
not correctly restored, leading to canonization and parentage looping
errors. This was concealed by the Kite Track::_check() bug (incomplete
individual TrackSegment checking).
2010-12-30 12:41:19 -06:00
|
|
|
|
|
|
|
return true;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
void KatabaticEngine::_balanceGlobalDensity ( unsigned int depth )
|
|
|
|
{
|
|
|
|
startMeasures();
|
|
|
|
Session::open( this );
|
|
|
|
|
|
|
|
cmess1 << " o Balance Global Density "
|
|
|
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
|
|
|
|
|
|
|
GCellDensitySet queue ( depth, *(_gcellGrid->getGCellVector()) );
|
|
|
|
GCell::SetIndex invalidateds;
|
|
|
|
|
|
|
|
bool optimized = true;
|
|
|
|
while ( optimized ) {
|
|
|
|
Session::revalidate();
|
|
|
|
optimized = false;
|
|
|
|
queue.requeue();
|
|
|
|
|
|
|
|
std::set<GCell*,GCell::CompareByKey>::const_iterator igcell = queue.getGCells().begin();
|
|
|
|
size_t i = 0;
|
|
|
|
for ( ; igcell!=queue.getGCells().end() ; ++igcell, ++i ) {
|
|
|
|
ltrace(400) << "_balance: [" << depth << "]:"
|
|
|
|
<< (*igcell)->getDensity(depth) << " " << *igcell << endl;
|
|
|
|
|
|
|
|
if (not (*igcell)->isSaturated(depth)) {
|
|
|
|
ltrace(400) << "STOP desaturated: @" << i << " " << *igcell << endl;
|
|
|
|
for ( ; igcell!=queue.getGCells().end() ; ++igcell ) {
|
|
|
|
if ((*igcell)->isSaturated(depth)) {
|
|
|
|
cparanoid << Error( "Still saturated: @%d %s", i, getString(*igcell).c_str() ) << endl;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
optimized = (*igcell)->stepBalance( depth, invalidateds );
|
|
|
|
if (optimized) {
|
|
|
|
for ( GCell::SetIndex::iterator igcell=invalidateds.begin() ; igcell!=invalidateds.end() ; ++igcell ) {
|
|
|
|
queue.unqueue( *igcell );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Session::close();
|
|
|
|
stopMeasures();
|
|
|
|
printMeasures( "balance" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KatabaticEngine::balanceGlobalDensity ()
|
|
|
|
{
|
|
|
|
ltrace(500) << "Deter| Balance Global Density" << endl;
|
|
|
|
|
|
|
|
//_balanceGlobalDensity( 1 ); // metal2
|
|
|
|
//_balanceGlobalDensity( 2 ); // metal3
|
|
|
|
|
|
|
|
set<Net*> globalNets;
|
|
|
|
GCell::SetIndex invalidateds;
|
|
|
|
|
|
|
|
Session::open( this );
|
|
|
|
|
|
|
|
vector<AutoSegment*> segments;
|
|
|
|
|
|
|
|
AutoSegmentLut::iterator ilut = _autoSegmentLut.begin();
|
|
|
|
for ( ; ilut!=_autoSegmentLut.end() ; ++ilut ) {
|
|
|
|
AutoSegment* segment = (*ilut).second;
|
|
|
|
|
|
|
|
if (segment->isLocal()) continue;
|
|
|
|
if (not segment->isCanonical()) continue;
|
|
|
|
|
|
|
|
segments.push_back( segment );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sort on id before moving to ensure determinism.
|
|
|
|
sort( segments.begin(), segments.end(), AutoSegment::CompareId() );
|
|
|
|
|
|
|
|
for ( size_t i=0 ; i<segments.size() ; ++i ) {
|
|
|
|
// Hard-coded: reserve 3 tracks (1/20 * 3).
|
|
|
|
if (segments[i]->canMoveULeft(0.10)) {
|
|
|
|
getGCellGrid()->getKatabatic()->moveULeft(segments[i],globalNets,invalidateds);
|
|
|
|
} else if (segments[i]->canMoveURight(0.10)) {
|
|
|
|
getGCellGrid()->getKatabatic()->moveURight(segments[i],globalNets,invalidateds);
|
|
|
|
}
|
|
|
|
|
|
|
|
for ( GCell::SetIndex::iterator igcell=invalidateds.begin() ; igcell!=invalidateds.end() ; ++igcell ) {
|
|
|
|
(*igcell)->updateDensity();
|
|
|
|
}
|
|
|
|
invalidateds.clear();
|
|
|
|
Session::revalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
Session::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
void KatabaticEngine::layerAssign ( unsigned int method )
|
|
|
|
{
|
2013-12-03 18:58:58 -06:00
|
|
|
ltrace(500) << "Deter| Layer Assignment" << endl;
|
|
|
|
|
2010-03-09 09:24:29 -06:00
|
|
|
set<Net*> globalNets;
|
|
|
|
|
|
|
|
unsigned long total = 0;
|
|
|
|
unsigned long global = 0;
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
startMeasures();
|
|
|
|
Session::open( this );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
|
|
|
switch ( method ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
case EngineLayerAssignByLength: _layerAssignByLength( total, global, globalNets ); break;
|
|
|
|
case EngineLayerAssignByTrunk: _layerAssignByTrunk ( total, global, globalNets ); break;
|
|
|
|
case EngineNoNetLayerAssign: break;
|
2010-03-09 09:24:29 -06:00
|
|
|
default:
|
2013-12-03 18:58:58 -06:00
|
|
|
stopMeasures();
|
|
|
|
Session::close();
|
|
|
|
throw Error( badMethod
|
|
|
|
, "Katabatic::layerAssign()"
|
|
|
|
, method
|
|
|
|
, getString(_cell).c_str()
|
|
|
|
);
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
globalNets.clear();
|
|
|
|
Session::revalidate();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (getConfiguration()->getAllowedDepth() > 2) {
|
2010-08-22 07:37:48 -05:00
|
|
|
for ( int i=0 ; i < 3 ; i++ ) {
|
|
|
|
for ( size_t depth=1 ; depth < getConfiguration()->getAllowedDepth()-2; ++depth ) {
|
2013-12-03 18:58:58 -06:00
|
|
|
_desaturate( depth, globalNets, total, global );
|
|
|
|
if ( (depth > 1) and ((depth-1)%2 == 1) ) Session::revalidate();
|
2010-08-22 07:37:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
globalNets.clear ();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
if (not _gcellGrid->updateDensity()) break;
|
2010-08-22 07:37:48 -05:00
|
|
|
}
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::revalidate();
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CHECK_DATABASE)
|
2013-12-03 18:58:58 -06:00
|
|
|
_check( "after layer assignment" );
|
2010-03-09 09:24:29 -06:00
|
|
|
#endif
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::setKatabaticFlags( EngineWarnOnGCellOverload );
|
|
|
|
_gcellGrid->checkDensity();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
Session::close();
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
stopMeasures();
|
|
|
|
printMeasures( "assign" );
|
2010-03-09 09:24:29 -06:00
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
// cmess2 << " - Total segments : " << total << endl;
|
|
|
|
// cmess2 << " - Global segments : " << global << endl;
|
|
|
|
// cmess2 << " - Ratio : "
|
|
|
|
// << ((float)global/(float)total)*100.0 << "%." << endl;
|
2010-03-09 09:24:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-03 18:58:58 -06:00
|
|
|
} // Katabatic namespace.
|