New densityVariation option to replace uniformDensity

This commit is contained in:
Gabriel Gouvine 2023-06-10 14:35:55 +02:00
parent e395069025
commit 5c75a1ffb7
6 changed files with 35 additions and 52 deletions

View File

@ -19,14 +19,14 @@ import coriolis.Cfg as Cfg
param = Cfg.getParamDouble( 'etesian.aspectRatio' )
param.setDouble( 1.0 )
Cfg.getParamDouble ( 'etesian.spaceMargin' ).setPercentage( 0.05 )
Cfg.getParamDouble ( 'etesian.spreadMargin' ).setPercentage( 0.05 )
Cfg.getParamBool ( 'etesian.uniformDensity' ).setBool ( False )
Cfg.getParamBool ( 'etesian.routingDriven' ).setBool ( False )
Cfg.getParamString ( 'etesian.feedNames' ).setString ( 'tie_x0,rowend_x0' )
Cfg.getParamString ( 'etesian.cell.zero' ).setString ( 'zero_x0' )
Cfg.getParamString ( 'etesian.cell.one' ).setString ( 'one_x0' )
Cfg.getParamString ( 'etesian.bloat' ).setString ( 'disabled' )
Cfg.getParamDouble ( 'etesian.spaceMargin' ).setPercentage( 0.05 )
Cfg.getParamDouble ( 'etesian.densityVariation' ).setPercentage( 0.05 )
Cfg.getParamBool ( 'etesian.uniformDensity' ).setBool ( False )
Cfg.getParamBool ( 'etesian.routingDriven' ).setBool ( False )
Cfg.getParamString ( 'etesian.feedNames' ).setString ( 'tie_x0,rowend_x0' )
Cfg.getParamString ( 'etesian.cell.zero' ).setString ( 'zero_x0' )
Cfg.getParamString ( 'etesian.cell.one' ).setString ( 'one_x0' )
Cfg.getParamString ( 'etesian.bloat' ).setString ( 'disabled' )
param = Cfg.getParamEnumerate( 'etesian.effort' )
param.setInt( 2 )
@ -44,13 +44,12 @@ param.addValue( 'Show result only', 3 )
layout = Cfg.Configuration.get().getLayout()
layout.addTab ( 'Placer', 'etesian' )
layout.addTitle ( 'Placer', 'Placement area' )
layout.addParameter( 'Placer', 'etesian.aspectRatio' , 'Aspect Ratio, X/Y (%)', 0 )
layout.addParameter( 'Placer', 'etesian.spaceMargin' , 'Space Margin' , 1 )
layout.addParameter( 'Placer', 'etesian.spreadMargin' , 'Threshold before spreading', 1 )
layout.addParameter( 'Placer', 'etesian.aspectRatio' , 'Aspect Ratio, X/Y' , 0 )
layout.addParameter( 'Placer', 'etesian.spaceMargin' , 'Space Margin' , 1 )
layout.addRule ( 'Placer' )
layout.addTitle ( 'Placer', 'Etesian - Placer')
layout.addParameter( 'Placer', 'etesian.uniformDensity', 'Uniform density' , 0 )
layout.addParameter( 'Placer', 'etesian.routingDriven' , 'Routing driven' , 0 )
layout.addParameter( 'Placer', 'etesian.effort' , 'Placement effort' , 1 )
layout.addParameter( 'Placer', 'etesian.graphics' , 'Placement view' , 1 )
layout.addParameter( 'Placer', 'etesian.densityVariation' , 'Density variation' , 0 )
layout.addParameter( 'Placer', 'etesian.routingDriven' , 'Routing driven' , 0 )
layout.addParameter( 'Placer', 'etesian.effort' , 'Placement effort' , 1 )
layout.addParameter( 'Placer', 'etesian.graphics' , 'Placement view' , 1 )
layout.addRule ( 'Placer' )

View File

@ -60,7 +60,7 @@ namespace Etesian {
, _spreadingConf ( Cfg::getParamBool ("etesian.uniformDensity" , false )->asBool()? ForceUniform : MaxDensity )
, _routingDriven ( Cfg::getParamBool ("etesian.routingDriven" , false )->asBool())
, _spaceMargin ( Cfg::getParamPercentage("etesian.spaceMargin" , 5.0)->asDouble() )
, _spreadMargin ( Cfg::getParamPercentage("etesian.spreadMargin" , 5.0)->asDouble() )
, _densityVariation ( Cfg::getParamPercentage("etesian.densityVariation", 5.0)->asDouble() )
, _aspectRatio ( Cfg::getParamPercentage("etesian.aspectRatio" ,100.0)->asDouble() )
, _tieName ( Cfg::getParamString ("etesian.tieName" ,"tie_x0" )->asString() )
, _feedNames ( Cfg::getParamString ("etesian.feedNames" ,"tie_x0,rowend_x0")->asString() )
@ -108,7 +108,7 @@ namespace Etesian {
, _updateConf ( other._updateConf )
, _spreadingConf ( other._spreadingConf )
, _spaceMargin ( other._spaceMargin )
, _spreadMargin ( other._spreadMargin )
, _densityVariation ( other._densityVariation)
, _aspectRatio ( other._aspectRatio )
, _tieName ( other._tieName )
, _feedNames ( other._feedNames )
@ -116,8 +116,8 @@ namespace Etesian {
, _spareBufferName ( other._spareBufferName )
, _bloat ( other._bloat )
, _latchUpDistance ( other._latchUpDistance )
, _antennaGateMaxWL ( other._antennaGateMaxWL )
, _antennaDiodeMaxWL( other._antennaDiodeMaxWL )
, _antennaGateMaxWL ( other._antennaGateMaxWL )
, _antennaDiodeMaxWL( other._antennaDiodeMaxWL)
{
if (other._rg) _rg = other._rg->getClone();
if (other._cg) _cg = other._cg->getClone();
@ -143,7 +143,7 @@ namespace Etesian {
cmess1 << Dots::asInt (" - Spreading Conf" ,_spreadingConf ) << endl;
cmess1 << Dots::asBool (" - Routing driven" ,_routingDriven ) << endl;
cmess1 << Dots::asPercentage(" - Space Margin" ,_spaceMargin ) << endl;
cmess1 << Dots::asPercentage(" - Spread Margin" ,_spreadMargin ) << endl;
cmess1 << Dots::asPercentage(" - Spread Margin" ,_densityVariation ) << endl;
cmess1 << Dots::asPercentage(" - Aspect Ratio" ,_aspectRatio ) << endl;
cmess1 << Dots::asString (" - Bloat model" ,_bloat ) << endl;
cmess1 << Dots::asString (" - Antenna gate Max. WL" ,DbU::getValueString(_antennaGateMaxWL )) << endl;
@ -175,7 +175,7 @@ namespace Etesian {
record->add ( getSlot( "_updateConf" , (int)_updateConf ) );
record->add ( getSlot( "_spreadingConf" , (int)_spreadingConf ) );
record->add ( getSlot( "_spaceMargin" , _spaceMargin ) );
record->add ( getSlot( "_spreadMargin" , _spreadMargin ) );
record->add ( getSlot( "_densityVariation" , _densityVariation ) );
record->add ( getSlot( "_aspectRatio" , _aspectRatio ) );
record->add ( getSlot( "_tieName" , _tieName ) );
record->add ( getSlot( "_feedNames" , _feedNames ) );

View File

@ -55,19 +55,6 @@ namespace {
using Etesian::EtesianEngine;
using coloquinte::CellOrientation;
// Options for both placers
unsigned const SteinerModel = 0x0001;
// Options for the global placer
unsigned const ForceUniformDensity = 0x0010;
unsigned const UpdateLB = 0x0020;
unsigned const UpdateUB = 0x0040;
// Options for the detailed placer
unsigned const UpdateDetailed = 0x0100;
//unsigned const NonConvexOpt = 0x0200;
Instance* extractInstance ( const RoutingPad* rp )
{
return rp->getOccurrence().getPath().getTailInstance();
@ -871,11 +858,9 @@ namespace Etesian {
}
double spaceMargin = getSpaceMargin();
double spreadMargin = getSpreadMargin();
Density densityConf = getSpreadingConf();
double bloatFactor = 1.0;
if (densityConf == Density::ForceUniform) {
bloatFactor += std::max(spaceMargin - spreadMargin, 0.0);
double densityVariation = getDensityVariation();
double bloatFactor = 1.0 + std::max(spaceMargin - densityVariation, 0.0);
if (bloatFactor != 1.0) {
cmess1 << " - Cells inflated by " << bloatFactor << endl;
}
@ -1052,7 +1037,6 @@ namespace Etesian {
if (_bloatCells.getSelected()->getName() != "disabled")
cmess2 << stdCellSizes.toString(1) << endl;
//_densityLimits = new coloquinte::density_restrictions ();
_surface = new coloquinte::Rectangle( (int)(topAb.getXMin() / hpitch)
, (int)(topAb.getXMax() / hpitch)
, (int)(topAb.getYMin() / vpitch)

View File

@ -81,7 +81,7 @@ extern "C" {
DirectSetLongAttribute (PyEtesianEngine_setFixedAbHeight,setFixedAbHeight,PyEtesianEngine,EtesianEngine)
DirectSetLongAttribute (PyEtesianEngine_setFixedAbWidth ,setFixedAbWidth ,PyEtesianEngine,EtesianEngine)
DirectSetDoubleAttribute (PyEtesianEngine_setSpaceMargin ,setSpaceMargin ,PyEtesianEngine,EtesianEngine)
DirectSetDoubleAttribute (PyEtesianEngine_setSpreadMargin ,setSpreadMargin ,PyEtesianEngine,EtesianEngine)
DirectSetDoubleAttribute (PyEtesianEngine_setDensityVariation,setDensityVariation ,PyEtesianEngine,EtesianEngine)
DirectSetDoubleAttribute (PyEtesianEngine_setAspectRatio ,setAspectRatio ,PyEtesianEngine,EtesianEngine)
DirectGetLongAttribute (PyEtesianEngine_getFixedAbHeight,getFixedAbHeight,PyEtesianEngine,EtesianEngine)
DirectGetLongAttribute (PyEtesianEngine_getFixedAbWidth ,getFixedAbWidth ,PyEtesianEngine,EtesianEngine)
@ -274,8 +274,8 @@ extern "C" {
, "Use this width when computing the size of the default abutment box (disable aspect ratio)." }
, { "setSpaceMargin" , (PyCFunction)PyEtesianEngine_setSpaceMargin , METH_VARARGS
, "Override the configuration space margin parameter value." }
, { "setSpreadMargin" , (PyCFunction)PyEtesianEngine_setSpreadMargin , METH_VARARGS
, "Override the configuration spread margin parameter value." }
, { "setDensityVariation" , (PyCFunction)PyEtesianEngine_setDensityVariation, METH_VARARGS
, "Override the configuration density variation parameter value." }
, { "setAspectRatio" , (PyCFunction)PyEtesianEngine_setAspectRatio , METH_VARARGS
, "Override the configuration aspect ratio parameter value." }
, { "resetPlacement" , (PyCFunction)PyEtesianEngine_resetPlacement , METH_NOARGS

View File

@ -66,7 +66,7 @@ namespace Etesian {
inline Density getSpreadingConf () const;
inline bool getRoutingDriven () const;
inline double getSpaceMargin () const;
inline double getSpreadMargin () const;
inline double getDensityVariation () const;
inline double getAspectRatio () const;
inline string getTieName () const;
inline string getFeedNames () const;
@ -77,7 +77,7 @@ namespace Etesian {
inline DbU::Unit getAntennaGateMaxWL () const;
inline DbU::Unit getAntennaDiodeMaxWL () const;
inline void setSpaceMargin ( double );
inline void setSpreadMargin ( double );
inline void setDensityVariation ( double );
inline void setAspectRatio ( double );
void print ( Cell* ) const;
Record* _getRecord () const;
@ -92,7 +92,7 @@ namespace Etesian {
Density _spreadingConf;
bool _routingDriven;
double _spaceMargin;
double _spreadMargin;
double _densityVariation;
double _aspectRatio;
string _tieName;
string _feedNames;
@ -115,7 +115,7 @@ namespace Etesian {
inline Density Configuration::getSpreadingConf () const { return _spreadingConf; }
inline bool Configuration::getRoutingDriven () const { return _routingDriven; }
inline double Configuration::getSpaceMargin () const { return _spaceMargin; }
inline double Configuration::getSpreadMargin () const { return _spreadMargin; }
inline double Configuration::getDensityVariation () const { return _densityVariation; }
inline double Configuration::getAspectRatio () const { return _aspectRatio; }
inline string Configuration::getTieName () const { return _tieName; }
inline string Configuration::getFeedNames () const { return _feedNames; }
@ -126,7 +126,7 @@ namespace Etesian {
inline DbU::Unit Configuration::getAntennaGateMaxWL () const { return _antennaGateMaxWL; }
inline DbU::Unit Configuration::getAntennaDiodeMaxWL () const { return _antennaDiodeMaxWL; }
inline void Configuration::setSpaceMargin ( double margin ) { _spaceMargin = margin; }
inline void Configuration::setSpreadMargin ( double margin ) { _spreadMargin = margin; }
inline void Configuration::setDensityVariation ( double margin ) { _densityVariation = margin; }
inline void Configuration::setAspectRatio ( double ratio ) { _aspectRatio = ratio; }

View File

@ -92,7 +92,7 @@ namespace Etesian {
inline GraphicUpdate getUpdateConf () const;
inline Density getSpreadingConf () const;
inline double getSpaceMargin () const;
inline double getSpreadMargin () const;
inline double getDensityVariation () const;
inline double getAspectRatio () const;
inline DbU::Unit getAntennaGateMaxWL () const;
inline DbU::Unit getAntennaDiodeMaxWL () const;
@ -113,7 +113,7 @@ namespace Etesian {
inline void setFixedAbHeight ( DbU::Unit );
inline void setFixedAbWidth ( DbU::Unit );
inline void setSpaceMargin ( double );
inline void setSpreadMargin ( double );
inline void setDensityVariation ( double );
inline void setAspectRatio ( double );
void setDefaultAb ();
void adjustSliceHeight ();
@ -210,7 +210,7 @@ namespace Etesian {
inline GraphicUpdate EtesianEngine::getUpdateConf () const { return getConfiguration()->getUpdateConf(); }
inline Density EtesianEngine::getSpreadingConf () const { return getConfiguration()->getSpreadingConf(); }
inline double EtesianEngine::getSpaceMargin () const { return getConfiguration()->getSpaceMargin(); }
inline double EtesianEngine::getSpreadMargin () const { return getConfiguration()->getSpreadMargin(); }
inline double EtesianEngine::getDensityVariation () const { return getConfiguration()->getDensityVariation(); }
inline double EtesianEngine::getAspectRatio () const { return getConfiguration()->getAspectRatio(); }
inline DbU::Unit EtesianEngine::getAntennaGateMaxWL () const { return getConfiguration()->getAntennaGateMaxWL(); }
inline DbU::Unit EtesianEngine::getAntennaDiodeMaxWL () const { return getConfiguration()->getAntennaDiodeMaxWL(); }
@ -226,7 +226,7 @@ namespace Etesian {
inline void EtesianEngine::setFixedAbHeight ( DbU::Unit abHeight ) { _fixedAbHeight = abHeight; }
inline void EtesianEngine::setFixedAbWidth ( DbU::Unit abWidth ) { _fixedAbWidth = abWidth; }
inline void EtesianEngine::setSpaceMargin ( double margin ) { getConfiguration()->setSpaceMargin(margin); }
inline void EtesianEngine::setSpreadMargin ( double margin ) { getConfiguration()->setSpreadMargin(margin); }
inline void EtesianEngine::setDensityVariation ( double margin ) { getConfiguration()->setDensityVariation(margin); }
inline void EtesianEngine::setAspectRatio ( double ratio ) { getConfiguration()->setAspectRatio(ratio); }
inline DbU::Unit EtesianEngine::toDbU ( int64_t v ) const { return v*getSliceStep(); }
inline uint32_t EtesianEngine::_getNewDiodeId () { return _diodeCount++; }