From bbea20b4f64ea2451f1495edf92101bd091128bf Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 5 Jun 2022 20:35:39 +0200 Subject: [PATCH 1/3] Correct, again, the problem of PyLayoutGenerator in Python 3. * Bug: In PyLayoutGenerator, in the method definition of setVerboselevel(), the error was not METH_STATIC but the lack of METH_VARARGS flag. --- hurricane/src/analog/PyLayoutGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hurricane/src/analog/PyLayoutGenerator.cpp b/hurricane/src/analog/PyLayoutGenerator.cpp index 2014e7ab..635e4f57 100644 --- a/hurricane/src/analog/PyLayoutGenerator.cpp +++ b/hurricane/src/analog/PyLayoutGenerator.cpp @@ -287,8 +287,8 @@ extern "C" { PyMethodDef PyLayoutGenerator_Methods[] = - { { "getVerboseLevel" , (PyCFunction)PyLayoutGenerator_getVerboseLevel , METH_NOARGS|METH_CLASS, "Return the verbosity level." } - , { "setVerboseLevel" , (PyCFunction)PyLayoutGenerator_setVerboseLevel , METH_CLASS, "Sets the verbosity level." } + { { "getVerboseLevel" , (PyCFunction)PyLayoutGenerator_getVerboseLevel , METH_NOARGS |METH_STATIC, "Return the verbosity level." } + , { "setVerboseLevel" , (PyCFunction)PyLayoutGenerator_setVerboseLevel , METH_VARARGS|METH_STATIC, "Sets the verbosity level." } , { "getDevice" , (PyCFunction)PyLayoutGenerator_getDevice , METH_NOARGS , "Return the Device currently loaded." } , { "getNumberTransistor", (PyCFunction)PyLayoutGenerator_getNumberTransistor, METH_NOARGS , "Return how many real transistors (fingers) are useds." } , { "getNumberStack" , (PyCFunction)PyLayoutGenerator_getNumberStack , METH_NOARGS , "Return how many transistor stacks are useds." } From 33a5cd3b0b55ae0a551af956d8e6f6c3c136eba7 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 5 Jun 2022 20:36:01 +0200 Subject: [PATCH 2/3] Nicer looking of the dots in Bora::SlicingPlotWidget (IMHO). --- bora/src/SlicingPlotWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bora/src/SlicingPlotWidget.cpp b/bora/src/SlicingPlotWidget.cpp index 89995b0b..d152b52a 100644 --- a/bora/src/SlicingPlotWidget.cpp +++ b/bora/src/SlicingPlotWidget.cpp @@ -93,7 +93,7 @@ namespace Bora { _picker->setStateMachine(new QwtPickerClickPointMachine()); setStyleSheet ( "border: 0px" ); - int ptSize = Graphics::isHighDpi() ? 5 : 3; + int ptSize = Graphics::isHighDpi() ? 2 : 2; QwtText xTitle ( QString::fromUtf8("Width (µm)") ); QwtText yTitle ( QString::fromUtf8("Height (µm)") ); @@ -124,8 +124,8 @@ namespace Bora { _STreeCurve->attach ( _plot ); QwtSymbol* symbol = new QwtSymbol(); - symbol->setStyle( QwtSymbol::Cross ); - symbol->setSize ( 20 ); + symbol->setStyle( QwtSymbol::Triangle ); + symbol->setSize ( 6 ); symbol->setPen ( dotPen ); _STreeCurve->setSymbol( symbol ); From 9d818df5b12f6e3809c400f88a9016a770985f83 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 5 Jun 2022 20:36:41 +0200 Subject: [PATCH 3/3] Computation of the relative area used by the registers in Etesian. * Change: In EtesianEngine::toColoquinte(), not only compute the ratio of DFF versus the total number of gates, but also the ratio in term of area. As the DFF are usually very big cells compare to combinatorial one, the direct gate ratio could be misleading as to the "weight" of those cell in the design. --- etesian/src/EtesianEngine.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 2c31c702..95d6fb15 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -733,8 +733,9 @@ namespace Etesian { } cmess2 << " - Whole place area: " << getBlockCell()->getAbutmentBox() << "." << endl; cmess2 << " - Sub-place Area: " << _placeArea << "." << endl; - DbU::Unit totalLength = (_placeArea.getHeight()/sliceHeight) * _placeArea.getWidth(); - DbU::Unit usedLength = 0; + DbU::Unit totalLength = (_placeArea.getHeight()/sliceHeight) * _placeArea.getWidth(); + DbU::Unit usedLength = 0; + DbU::Unit registerLength = 0; Dots dots ( cmess2, " ", 80, 1000 ); if (not cmess2.enabled()) dots.disable(); @@ -750,8 +751,11 @@ namespace Etesian { for ( Instance* instance : getCell()->getInstances() ) { if (instance == getBlockInstance()) continue; string masterName = getString( instance->getMasterCell()->getName() ); - if (masterName.substr(0,3) == "sff") ++registerNb; - Box instanceAb = instance->getAbutmentBox(); + Box instanceAb = instance->getAbutmentBox(); + if (masterName.substr(0,3) == "sff") { + ++registerNb; + registerLength += instanceAb.getWidth(); + } if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) { if (topAb.intersect(instanceAb)) { ++instancesNb; @@ -759,6 +763,9 @@ namespace Etesian { totalLength -= (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth(); } } + if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) { + cerr << "PLACED " << instance << endl; + } } } @@ -767,10 +774,15 @@ namespace Etesian { Instance* instance = static_cast(occurrence.getEntity()); Box instanceAb = instance->getAbutmentBox(); string masterName = getString( instance->getMasterCell()->getName() ); - if (masterName.substr(0,3) == "sff") ++registerNb; + if (masterName.substr(0,3) == "sff") { + ++registerNb; + registerLength += instanceAb.getWidth(); + } if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) { ++fixedNb; totalLength -= (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth(); + } else if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) { + cerr << "PLACED " << instance << endl; } else { usedLength += (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth(); //cerr << DbU::getValueString(usedLength) << " " << instance << endl; @@ -799,7 +811,9 @@ namespace Etesian { float ratio = ((float)registerNb / (float)instancesNb) * 100.0; ostringstream os1; os1 << registerNb << " (" << fixed << setprecision(2) << ratio << "%)"; - cmess1 << ::Dots::asString( " - Registers (DFF) ", os1.str() ) << endl; + cmess1 << ::Dots::asString ( " - Registers (DFF) ", os1.str() ) << endl; + cmess1 << ::Dots::asPercentage( " - Registers (DFF) area " + , (float)(registerLength)/(float)totalLength ) << endl; ratio = ((float)_bufferCount / (float)instancesNb) * 100.0; ostringstream os2; os2 << _bufferCount << " (" << fixed << setprecision(2) << ratio << "%)";