Skip to content

Commit 89c8cdc

Browse files
committed
dpl: more info for debugging window range, and reduce runtiume debug verbosity
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
1 parent 5e46aa2 commit 89c8cdc

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/dpl/src/NegotiationLegalizerPass.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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() : "?",

src/dpl/src/infrastructure/network.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,6 @@ std::pair<int, int> getMasterPwrs(odb::dbMaster* master)
310310
}
311311
return Architecture::Row::Power_UNK;
312312
};
313-
std::cout << "master:" << master->getName()
314-
<< " height:" << master->getHeight()
315-
<< " top_has_pwr:" << top_has_pwr
316-
<< " top_has_gnd:" << top_has_gnd
317-
<< " bot_has_pwr:" << bot_has_pwr
318-
<< " bot_has_gnd:" << bot_has_gnd << std::endl;
319313

320314
return {resolve(top_has_pwr, top_has_gnd), resolve(bot_has_pwr, bot_has_gnd)};
321315
}

0 commit comments

Comments
 (0)