@@ -873,8 +873,11 @@ class NesterovBaseCommon
873873 void resetDeltaArea () { delta_area_ = 0 ; }
874874 int getNewGcellsCount () { return new_gcells_count_; }
875875 int getDeletedGcellsCount () { return deleted_gcells_count_; }
876- void resetNewGcellsCount () { new_gcells_count_ = 0 ;
877- deleted_gcells_count_ = 0 ; }
876+ void resetNewGcellsCount ()
877+ {
878+ new_gcells_count_ = 0 ;
879+ deleted_gcells_count_ = 0 ;
880+ }
878881
879882 private:
880883 NesterovBaseVars nbVars_;
@@ -997,49 +1000,59 @@ class NesterovBase
9971000 float getTargetDensity () const ;
9981001
9991002 void setTargetDensity (float targetDensity);
1000- void checkConsistency () {
1003+ void checkConsistency ()
1004+ {
10011005 auto block = pb_->db ()->getChip ()->getBlock ();
10021006 const int64_t tolerance = 10000 ;
1003-
1004- int64_t expected_white_space = pb_->getDie ().coreArea () - pb_->nonPlaceInstsArea ();
1005- if (std::abs (whiteSpaceArea_ - expected_white_space) > tolerance) {
1007+
1008+ int64_t expected_white_space
1009+ = pb_->getDie ().coreArea () - pb_->nonPlaceInstsArea ();
1010+ if (std::abs (whiteSpaceArea_ - expected_white_space) > tolerance) {
10061011 log_->warn (utl::GPL, 319 , " Inconsistent white space area" );
1007- log_->report (" whiteSpaceArea_: {} (expected:{}) | coreArea: {}, nonPlaceInstsArea: {}" ,
1008- block->dbuAreaToMicrons (whiteSpaceArea_),
1009- block->dbuAreaToMicrons (expected_white_space),
1010- block->dbuAreaToMicrons (pb_->getDie ().coreArea ()),
1011- block->dbuAreaToMicrons (pb_->nonPlaceInstsArea ()));
1012+ log_->report (
1013+ " whiteSpaceArea_: {} (expected:{}) | coreArea: {}, "
1014+ " nonPlaceInstsArea: {}" ,
1015+ block->dbuAreaToMicrons (whiteSpaceArea_),
1016+ block->dbuAreaToMicrons (expected_white_space),
1017+ block->dbuAreaToMicrons (pb_->getDie ().coreArea ()),
1018+ block->dbuAreaToMicrons (pb_->nonPlaceInstsArea ()));
10121019 }
10131020
10141021 int64_t expected_movable_area = whiteSpaceArea_ * targetDensity_;
1015- if (std::abs (movableArea_ - expected_movable_area) > tolerance) {
1022+ if (std::abs (movableArea_ - expected_movable_area) > tolerance) {
10161023 log_->warn (utl::GPL, 320 , " Inconsistent movable area 1" );
1017- log_->report (" movableArea_: {} (expected:{}) | whiteSpaceArea_: {}, targetDensity_: {}" ,
1018- block->dbuAreaToMicrons (movableArea_),
1019- block->dbuAreaToMicrons (expected_movable_area),
1020- block->dbuAreaToMicrons (whiteSpaceArea_),
1021- targetDensity_);
1024+ log_->report (
1025+ " movableArea_: {} (expected:{}) | whiteSpaceArea_: {}, "
1026+ " targetDensity_: {}" ,
1027+ block->dbuAreaToMicrons (movableArea_),
1028+ block->dbuAreaToMicrons (expected_movable_area),
1029+ block->dbuAreaToMicrons (whiteSpaceArea_),
1030+ targetDensity_);
10221031 }
10231032
10241033 int64_t expected_filler_area = movableArea_ - getNesterovInstsArea ();
1025- if (std::abs (totalFillerArea_ - expected_filler_area) > tolerance) {
1026- log_->warn (utl::GPL, 321 ," Inconsistent filler area" );
1027- log_->report (" totalFillerArea_: {} (expected:{}) | movableArea_: {}, getNesterovInstsArea_: {}" ,
1028- block->dbuAreaToMicrons (totalFillerArea_),
1029- block->dbuAreaToMicrons (expected_filler_area),
1030- block->dbuAreaToMicrons (movableArea_),
1031- block->dbuAreaToMicrons (getNesterovInstsArea ()));
1034+ if (std::abs (totalFillerArea_ - expected_filler_area) > tolerance) {
1035+ log_->warn (utl::GPL, 321 , " Inconsistent filler area" );
1036+ log_->report (
1037+ " totalFillerArea_: {} (expected:{}) | movableArea_: {}, "
1038+ " getNesterovInstsArea_: {}" ,
1039+ block->dbuAreaToMicrons (totalFillerArea_),
1040+ block->dbuAreaToMicrons (expected_filler_area),
1041+ block->dbuAreaToMicrons (movableArea_),
1042+ block->dbuAreaToMicrons (getNesterovInstsArea ()));
10321043 }
10331044
10341045 float expected_density = movableArea_ * 1.0 / whiteSpaceArea_;
10351046 float density_diff = std::abs (targetDensity_ - expected_density);
1036- if (density_diff > 1e-6 ) {
1037- log_->warn (utl::GPL, 322 ," Inconsistent target density" );
1038- log_->report (" targetDensity_: {} (expected:{}) | movableArea_: {}, whiteSpaceArea_: {}" ,
1039- targetDensity_,
1040- expected_density,
1041- block->dbuAreaToMicrons (movableArea_),
1042- block->dbuAreaToMicrons (whiteSpaceArea_));
1047+ if (density_diff > 1e-6 ) {
1048+ log_->warn (utl::GPL, 322 , " Inconsistent target density" );
1049+ log_->report (
1050+ " targetDensity_: {} (expected:{}) | movableArea_: {}, "
1051+ " whiteSpaceArea_: {}" ,
1052+ targetDensity_,
1053+ expected_density,
1054+ block->dbuAreaToMicrons (movableArea_),
1055+ block->dbuAreaToMicrons (whiteSpaceArea_));
10431056 }
10441057 }
10451058
0 commit comments