@@ -423,7 +423,7 @@ int NegotiationLegalizer::negotiationIter(std::vector<int>& activeCells,
423423 sortByNegotiationOrder (activeCells);
424424 }
425425
426- if (logger_->debugCheck (utl::DPL , " negotiation_runtime" , 1 )) {
426+ if (logger_->debugCheck (utl::DPL , " negotiation_runtime" , 2 )) {
427427 const double total_ms = total_iter_timer.elapsed () * 1e3 ;
428428 auto pct = [total_ms](double ms_val) {
429429 return total_ms > 0 ? 100.0 * ms_val / total_ms : 0.0 ;
@@ -659,9 +659,13 @@ std::pair<int, int> NegotiationLegalizer::findBestLocation(int cell_idx,
659659 const std::vector<int > extended_search_rows = collectNearestValidRows (
660660 cell, cell.init_y , cell.init_x , row_search_window_, row_search_cap);
661661
662- static int neg_search_print_count = 0 ;
663- if (neg_search_print_count < 50 ) {
664- ++neg_search_print_count;
662+ // Print diagnostics for the first 2 cells of each distinct height, so we
663+ // get coverage across all row heights rather than just the first 50 cells
664+ // (which tend to share one height).
665+ static std::unordered_map<int , int > neg_search_print_count_by_height;
666+ int & height_print_count = neg_search_print_count_by_height[cell.height ];
667+ if (height_print_count < 2 ) {
668+ ++height_print_count;
665669 auto rail = [](NLPowerRailType r) {
666670 return r == NLPowerRailType::kVss ? " kVss" : " kVdd" ;
667671 };
@@ -726,7 +730,7 @@ std::pair<int, int> NegotiationLegalizer::findBestLocation(int cell_idx,
726730 const int win_xhi = cell.init_x + extended_site_window + 1 ;
727731
728732 logger_->report (
729- " [neg-search {}/50 ] {} master={} site={} "
733+ " [neg-search h={} {}/2 ] {} master={} site={} "
730734 " extended_search_rows.size={} seed_valid={} "
731735 " nearest_below_step={} nearest_above_step={} "
732736 " rej_oob={} rej_dead={} rej_site={} rej_rail={} "
@@ -736,7 +740,8 @@ std::pair<int, int> NegotiationLegalizer::findBestLocation(int cell_idx,
736740 " cell.height={} cell.width={} max_disp_y={} "
737741 " rail_type={} rail_type_flipped={} flippable={} "
738742 " fence_id={} init_y={} init_x={} cur_y={} cur_x={}" ,
739- neg_search_print_count,
743+ cell.height ,
744+ height_print_count,
740745 cell.db_inst ->getName (),
741746 master ? master->getName ().c_str () : " ?" ,
742747 site ? site->getName ().c_str () : " ?" ,
0 commit comments