From 8ce2a7e318484379f99f619c2a80666309719ccd Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 14 Jul 2020 19:51:01 +0200 Subject: [PATCH] In Etesian, do not reset the placement if we are using a sub-block. * Bug: In EtesianEngine::place(), reset the placement *only* if we are *not* placing a sub-block *and* the top cell abutment box is empty. * Bug: In EtesianEngine::place(), set the instance placement status of all intermediate instances to PLACED, so the AP driver will save them (we were having partially saved layout when using hierarchical designs). * Bug: In EtesianEngine::resetPlacement(), reset the PLACED flag and the abutment box on the top cell or sub-block to be placed. --- etesian/src/EtesianEngine.cpp | 18 ++++++++++++------ katana/src/KatanaEngine.cpp | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 48d8867c..0950c3a3 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -519,8 +519,8 @@ namespace Etesian { // if (not getBlockCell()->getAbutmentBox().isEmpty() ) // setFixedAbHeight( getBlockCell()->getAbutmentBox().getHeight() ); - // getBlockCell()->setAbutmentBox( Box() ); - // getBlockCell()->resetFlags( Cell::Flags::Placed ); + getBlockCell()->setAbutmentBox( Box() ); + getBlockCell()->resetFlags( Cell::Flags::Placed ); UpdateSession::close(); dots.finish( Dots::Reset ); @@ -1002,8 +1002,10 @@ namespace Etesian { getConfiguration()->print( getCell() ); adjustSliceHeight(); - resetPlacement(); - if (getBlockCell()->getAbutmentBox().isEmpty()) setDefaultAb(); + if ( (getCell() == getBlockCell()) and getCell()->getAbutmentBox().isEmpty() ) { + resetPlacement(); + setDefaultAb(); + } findYSpin(); toColoquinte(); @@ -1020,7 +1022,6 @@ namespace Etesian { preplace(); - float_t minPenaltyIncrease, maxPenaltyIncrease, targetImprovement; int detailedIterations, detailedEffort; unsigned globalOptions=0, detailedOptions=0; @@ -1085,9 +1086,14 @@ namespace Etesian { rp->invalidate(); } } - UpdateSession::close(); getCell()->setFlags( Cell::Flags::Placed ); + for ( Occurrence occurrence : getCell()->getNonTerminalNetlistInstanceOccurrences(getBlockInstance()) ) { + Instance* instance = static_cast(occurrence.getEntity()); + if (instance->getPlacementStatus() == Instance::PlacementStatus::UNPLACED) + instance->setPlacementStatus( Instance::PlacementStatus::PLACED ); + } + UpdateSession::close(); } diff --git a/katana/src/KatanaEngine.cpp b/katana/src/KatanaEngine.cpp index 7eb94921..012edc3a 100644 --- a/katana/src/KatanaEngine.cpp +++ b/katana/src/KatanaEngine.cpp @@ -419,6 +419,7 @@ namespace Katana { return NULL; } + void KatanaEngine::openSession () { Session::_open(this); }