diff --git a/etesian/src/BloatCells.cpp b/etesian/src/BloatCells.cpp index d082b68a..341dddc1 100644 --- a/etesian/src/BloatCells.cpp +++ b/etesian/src/BloatCells.cpp @@ -121,6 +121,39 @@ namespace Etesian { } + Bloat90Percents::Bloat90Percents () + : BloatCell("90%") + { } + + + Bloat90Percents::~Bloat90Percents () + { } + + + DbU::Unit Bloat90Percents::getDx ( const Cell* cell, const EtesianEngine* etesian ) const + { + int terminals = 0; + for ( Net* net : cell->getNets() ) { + if (net->isExternal() and not net->isPower()) ++terminals; + } + + Box ab ( cell->getAbutmentBox() ); + DbU::Unit vpitch = etesian->getVerticalPitch();; + int xsize = (ab.getWidth() + vpitch - 1) / vpitch; + + // float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch); + // if (termRatio > 0.5) { + // return vpitch*6; + // } + + if (xsize < 4) return vpitch*11; + if (xsize < 6) return vpitch*8; + if (xsize < 8) return vpitch*6; + + return vpitch*4; + } + + bool BloatCells::select ( std::string profile ) { BloatKey key ( profile ); diff --git a/etesian/src/etesian/BloatCells.h b/etesian/src/etesian/BloatCells.h index 6d4b712a..6d9cb6d4 100644 --- a/etesian/src/etesian/BloatCells.h +++ b/etesian/src/etesian/BloatCells.h @@ -90,6 +90,14 @@ namespace Etesian { virtual ~Bloat3Metals (); virtual DbU::Unit getDx ( const Cell*, const EtesianEngine* ) const; }; + + + class Bloat90Percents : public BloatCell { + public: + Bloat90Percents (); + virtual ~Bloat90Percents (); + virtual DbU::Unit getDx ( const Cell*, const EtesianEngine* ) const; + }; class BloatCells { @@ -114,9 +122,10 @@ namespace Etesian { , _bloatCells() , _dxSpace (0) { - _bloatCells.insert( new BloatDisabled() ); - _bloatCells.insert( new BloatNsxlib () ); - _bloatCells.insert( new Bloat3Metals () ); + _bloatCells.insert( new BloatDisabled () ); + _bloatCells.insert( new BloatNsxlib () ); + _bloatCells.insert( new Bloat3Metals () ); + _bloatCells.insert( new Bloat90Percents() ); select( "disabled" ); }