ord: move report design metrics to c++#10051
ord: move report design metrics to c++#10051gadfort wants to merge 5 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the design area metrics reporting from Tcl to C++ by implementing a new designMetrics method in the OpenRoad class. Key feedback includes a critical fix for a unit mismatch in utilization calculations where DBUs were incorrectly compared with microns. It is also recommended to remove the design__nets metric for consistency with the original Tcl implementation and to optimize row and site counting by using site pointers as map keys instead of strings.
src/OpenRoad.cc
Outdated
| const double total_active_area = stdcell_area + macro_area; | ||
|
|
||
| logger_->metric("design__io", num_ios); | ||
| logger_->metric("design__nets", block->getNets().size()); |
There was a problem hiding this comment.
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
As it only depends on odb perhaps putting in src/odb/include/odb/util.h / src/odb/src/zutil/util.cpp would be a good scope. |
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
|
@maliberty I moved it, but left the swig stuff in openroad.i since it needs access to the logger and I couldn't see how to do that elsewhere. |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
Summary
Convert
report_design_area_metricsto C++ from tcl.I put it in openroad.cc, but open to suggestions if that isn't the right place for it.
Type of Change
Impact
No change, but on large design the call to
report_design_area_metricsgoes from 70s to 428ms.Verification
./etc/Build.sh).Related Issues
N/A