From 43ea63d98dbdc3e6fbda34d6403e5f77f9ea64be Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 13 Oct 2019 17:52:03 +0200 Subject: [PATCH] New Etesian bloat profile "90%". * New: In Etesian::BloatCells, new profile for hihgly saturated designs named "90%", as it add, on average, 90% of free space. This has been made for the "ao68000" of Staf Verhaegen and may needs some refinement as it is a bit brutal. --- etesian/src/BloatCells.cpp | 33 ++++++++++++++++++++++++++++++++ etesian/src/etesian/BloatCells.h | 15 ++++++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) 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" ); }