GoStraight & GCell density sorting bugs.
* Bug: In Anabatic::GCell::updateDensity(), the GoStraight flag is now set in this function when the density of blockage is above 40%. (should be parametrized in the future). This is linked with the Katabatic TrackFixedsegment bug. * Bug: In Anabatic::GCell::Key::Compare, the densities of the GCell where sorted in the *wrong* order, that is *less denser first*. This was making the layer assignment working on it's head. WTF, how did it ever work. Also sort on global saturation.
This commit is contained in:
parent
9df5f5f1b7
commit
7a7a3b9f1b
|
@ -1329,7 +1329,7 @@ namespace Anabatic {
|
||||||
_blockages[depth] += length;
|
_blockages[depth] += length;
|
||||||
_flags |= Flags::Invalidated;
|
_flags |= Flags::Invalidated;
|
||||||
|
|
||||||
cdebug_log(149,0) << "GCell:addBlockage() " << this << " "
|
cdebug_log(149,0) << "GCell::addBlockage() " << this << " "
|
||||||
<< depth << ":" << DbU::getValueString(_blockages[depth]) << endl;
|
<< depth << ":" << DbU::getValueString(_blockages[depth]) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1507,7 +1507,14 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the blockages.
|
// Add the blockages.
|
||||||
for ( size_t i=0 ; i<_depth ; i++ ) uLengths2[i] += _blockages[i];
|
for ( size_t i=0 ; i<_depth ; i++ ) {
|
||||||
|
uLengths2[i] += _blockages[i];
|
||||||
|
if (not i) continue;
|
||||||
|
if ((float)(_blockages[i] * Session::getPitch(i)) > 0.40*(float)(width*height)) {
|
||||||
|
flags() |= Flags::GoStraight;
|
||||||
|
//cerr << "| Set GoStraight on " << this << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Compute the number of non pass-through tracks.
|
// Compute the number of non pass-through tracks.
|
||||||
if (not processeds.empty()) {
|
if (not processeds.empty()) {
|
||||||
|
@ -1756,7 +1763,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
bool GCell::stepNetDesaturate ( size_t depth, set<Net*>& globalNets, GCell::Set& invalidateds )
|
bool GCell::stepNetDesaturate ( size_t depth, set<Net*>& globalNets, GCell::Set& invalidateds )
|
||||||
{
|
{
|
||||||
cdebug_log(9000,0) << "Deter| GCell::stepNetDesaturate() depth:" << depth << endl;
|
cdebug_log(149,0) << "GCell::stepNetDesaturate() depth:" << depth << endl;
|
||||||
cdebug_log(9000,0) << "Deter| " << this << endl;
|
cdebug_log(9000,0) << "Deter| " << this << endl;
|
||||||
|
|
||||||
updateDensity();
|
updateDensity();
|
||||||
|
@ -1778,7 +1785,7 @@ namespace Anabatic {
|
||||||
if (segmentDepth < depth) continue;
|
if (segmentDepth < depth) continue;
|
||||||
if (segmentDepth > depth) break;
|
if (segmentDepth > depth) break;
|
||||||
|
|
||||||
cdebug_log(9000,0) << "Deter| Move up " << (*isegment) << endl;
|
cdebug_log(149,0) << "Move up " << (*isegment) << endl;
|
||||||
|
|
||||||
if (getAnabatic()->moveUpNetTrunk(*isegment,globalNets,invalidateds))
|
if (getAnabatic()->moveUpNetTrunk(*isegment,globalNets,invalidateds))
|
||||||
return true;
|
return true;
|
||||||
|
@ -1843,7 +1850,7 @@ namespace Anabatic {
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
const Layer* layer = rg->getRoutingLayer(depth)->getBlockageLayer();
|
const Layer* layer = rg->getRoutingLayer(depth)->getBlockageLayer();
|
||||||
s << "_blockages[" << depth << ":" << ((layer) ? layer->getName() : "None") << "]";
|
s << "_blockages[" << depth << ":" << ((layer) ? layer->getName() : "None") << "]";
|
||||||
record->add( getSlot ( s.str(), &_blockages[depth] ) );
|
record->add( DbU::getValueSlot( s.str(), &_blockages[depth] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( size_t depth=0 ; depth<_depth ; ++depth ) {
|
for ( size_t depth=0 ; depth<_depth ; ++depth ) {
|
||||||
|
|
|
@ -335,6 +335,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
cmess1 << " o Desaturate layer "
|
cmess1 << " o Desaturate layer "
|
||||||
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
|
||||||
|
cdebug_log(149,0) << "Session::getSaturateRatio()=" << Session::getSaturateRatio() << endl;
|
||||||
|
|
||||||
GCellKeyQueue queue;
|
GCellKeyQueue queue;
|
||||||
GCell::Set invalidateds;
|
GCell::Set invalidateds;
|
||||||
|
|
|
@ -114,13 +114,14 @@ namespace Anabatic {
|
||||||
public:
|
public:
|
||||||
class Key {
|
class Key {
|
||||||
public:
|
public:
|
||||||
inline Key ( const GCell*, size_t depth );
|
inline Key ( const GCell*, size_t depth );
|
||||||
inline ~Key ();
|
inline ~Key ();
|
||||||
inline float getDensity () const;
|
inline float getDensity () const;
|
||||||
inline const GCell* getGCell () const;
|
inline const GCell* getGCell () const;
|
||||||
inline bool isActive () const;
|
inline bool isActive () const;
|
||||||
inline void update ( size_t depth );
|
inline bool isSaturated () const;
|
||||||
friend bool operator< ( const Key&, const Key& );
|
inline void update ( size_t depth );
|
||||||
|
friend bool operator< ( const Key&, const Key& );
|
||||||
public:
|
public:
|
||||||
class Compare {
|
class Compare {
|
||||||
public:
|
public:
|
||||||
|
@ -506,10 +507,11 @@ namespace Anabatic {
|
||||||
inline GCell::Key::~Key ()
|
inline GCell::Key::~Key ()
|
||||||
{ if (isActive()) _gcell->clearClonedKey(); }
|
{ if (isActive()) _gcell->clearClonedKey(); }
|
||||||
|
|
||||||
inline float GCell::Key::getDensity () const { return _density; }
|
inline float GCell::Key::getDensity () const { return _density; }
|
||||||
inline const GCell* GCell::Key::getGCell () const { return _gcell; }
|
inline const GCell* GCell::Key::getGCell () const { return _gcell; }
|
||||||
inline void GCell::Key::update ( size_t depth ) { _density=_gcell->getWDensity(depth); }
|
inline void GCell::Key::update ( size_t depth ) { _density=_gcell->getWDensity(depth); }
|
||||||
inline bool GCell::Key::isActive () const { return (this == _gcell->getLastClonedKey()); }
|
inline bool GCell::Key::isActive () const { return (this == _gcell->getLastClonedKey()); }
|
||||||
|
inline bool GCell::Key::isSaturated () const { return _gcell->isSaturated(); }
|
||||||
|
|
||||||
inline bool operator< ( const GCell::Key& lhs, const GCell::Key& rhs )
|
inline bool operator< ( const GCell::Key& lhs, const GCell::Key& rhs )
|
||||||
{
|
{
|
||||||
|
@ -521,8 +523,10 @@ namespace Anabatic {
|
||||||
|
|
||||||
inline bool GCell::Key::Compare::operator() ( const GCell::Key* lhs, const GCell::Key* rhs )
|
inline bool GCell::Key::Compare::operator() ( const GCell::Key* lhs, const GCell::Key* rhs )
|
||||||
{
|
{
|
||||||
|
//if (lhs->isSaturated() xor rhs->isSaturated()) return lhs->isSaturated();
|
||||||
|
|
||||||
float difference = lhs->_density - rhs->_density;
|
float difference = lhs->_density - rhs->_density;
|
||||||
if (difference != 0.0) return (difference > 0.0);
|
if (difference != 0.0) return (difference < 0.0);
|
||||||
|
|
||||||
return lhs->_gcell->getId() < rhs->_gcell->getId();
|
return lhs->_gcell->getId() < rhs->_gcell->getId();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue