Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#4735 from arthurjolo/add_cell…
Browse files Browse the repository at this point in the history
…_count_report

Report total usage of cells on report_cell_usage
  • Loading branch information
maliberty authored Mar 6, 2024
2 parents c13d491 + f3b202e commit 223f01d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/dbSta/src/dbSta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ std::string dbSta::getInstanceTypeText(InstType type)
case STD_PHYSICAL:
return "Generic Physical";
case STD_COMBINATIONAL:
return "Complex combinational cell";
return "Multi-Input combinational cell";
case STD_OTHER:
return "Other";
}
Expand Down Expand Up @@ -448,12 +448,14 @@ std::map<dbSta::InstType, int> dbSta::countInstancesByType()
void dbSta::report_cell_usage()
{
std::map<InstType, int> instances_types = countInstancesByType();
int total_usage = db_->getChip()->getBlock()->getInsts().size();

logger_->report("Cell usage report:");
for (auto [type, count] : instances_types) {
std::string type_name = getInstanceTypeText(type);
logger_->report(" {}s: {}", type_name, count);
}
logger_->report(" Total: {}", total_usage);
}

////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion src/dbSta/test/report_cell_usage.ok
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Cell usage report:
Fill cells: 168
Buffer/inverters: 232
Sequential cells: 35
Complex combinational cells: 241
Multi-Input combinational cells: 241
Total: 676

0 comments on commit 223f01d

Please sign in to comment.