dbSta/mpl: report_qor + report_macro_placement (read-only QoR reports)#10855
dbSta/mpl: report_qor + report_macro_placement (read-only QoR reports)#10855saurav-fermions wants to merge 2 commits into
Conversation
Add a read-only, additive report_qor command to dbSta that aggregates metrics OpenROAD already computes (design size, area/utilization, setup/hold timing, power, clock skew, DRC marker counts) into one concise sign-off summary. Supports text and -json output and a -digits option. The command recomputes nothing and changes no design or timing state: every value is the read side of an existing command/API. Sections whose prerequisites are missing (no clock, no liberty, no parasitics/routing) degrade gracefully to n/a (text) / null (JSON) and never error on a partially set-up design. Adds two integration tests with dual CMake+Bazel registration: - report_qor1: full flow (liberty+LEF+DEF+SDC+estimate_parasitics), asserts expected sections and plausible values, and verifies timing / report_checks are byte-identical before and after report_qor. - report_qor_graceful: LEF+DEF only, verifies no error and n/a/null degradation for timing/power/clock/DRC. All 75 dbSta tests pass. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
There was a problem hiding this comment.
Code Review
This pull request introduces two new read-only QoR reporting commands: report_qor in dbSta (aggregating design size, area, timing, power, clock skew, and DRC violations in text or JSON format) and report_macro_placement in mpl (reporting post-placement metrics for macros such as area, packing efficiency, HPWL, boundary spacing, and channel gaps). The review feedback highlights a precision loss issue in src/mpl/src/report.cpp due to integer division in the average boundary spacing calculation, which should be performed in double precision after converting to microns.
| const double avg_boundary_spacing | ||
| = block->dbuToMicrons(sum_boundary_dbu / static_cast<int>(macros.size())); |
There was a problem hiding this comment.
The average boundary spacing calculation performs integer division (sum_boundary_dbu / static_cast<int>(macros.size())), which discards the fractional part in DBUs before converting to microns [11.1.1]. To preserve precision and avoid integer truncation, perform the division in double precision after converting the sum to microns.
| const double avg_boundary_spacing | |
| = block->dbuToMicrons(sum_boundary_dbu / static_cast<int>(macros.size())); | |
| const double avg_boundary_spacing | |
| = block->dbuToMicrons(sum_boundary_dbu) / macros.size(); |
353eaed to
71d57b4
Compare
Adds an additive, read-only analysis command that reports post-placement macro QoR from the final ODB: placed-macro count and area, bounding-box dead space / packing efficiency, total and macro-net HPWL, min/avg boundary spacing, min macro-to-macro channel gap (and overlap count), and a per-macro location/orientation/area table. Also emits machine-readable macro_place__* metrics. The command never mutates the database, so default macro placement is unchanged (verified byte-identical on the macro_only test). Documented in the mpl README and covered by a new regression test (report_macro_placement1) registered in both CMake and Bazel; the full '^mpl' ctest suite (35/35) and the mpl doc-parity checks pass. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
71d57b4 to
ac752a3
Compare
|
Thanks — this is a draft (the
|
Summary
Two read-only, additive QoR reporting commands.
report_qor(dbSta) — aggregates metrics OpenROAD already computes (design size, area/utilization, setup/hold timing, power, clock skew, DRC marker counts) into one concise sign-off summary. Text and-jsonoutput,-digitsoption. Sections whose prerequisites are missing (no clock/liberty/parasitics) degrade gracefully ton/a(text) /null(JSON) and never error.report_macro_placement(mpl) — read-only macro-placement QoR command.Both recompute nothing and mutate no design/timing state; every reported value is the read side of an existing command/API.
Testing
Built
openroad;report_qor1,report_qor_graceful, andreport_macro_placement1pass. (Updated the mpl golden for aMacros to be placed:info line added upstream since the bundle base.)Notes
report_qorregressions reuse theaocv_derate.def/aocv_derate.sdcdesign fixtures introduced by the dbSta timing-accuracy PR dbSta: timing-accuracy report commands (AOCV/SI/PBA/CPPR/MCMM/crosstalk/noise/incremental-STA) #10846. Those two files must be present forreport_qor1/report_qor_gracefulto run. Marked draft until that fixture lands (or I can repoint the tests to an existing design fixture if preferred).report_signoff_timing, is intentionally not included here: it consolidates the advanced-timing features (SI Miller / SI-window / noise->delay / AOCV / POCV) and therefore depends on dbSta: timing-accuracy report commands (AOCV/SI/PBA/CPPR/MCMM/crosstalk/noise/incremental-STA) #10846 and dbSta: POCV / LVF parametric statistical-OCV timing (draft) #10853; it will follow as a stacked PR once those land.