Skip to content

Commit 6582e79

Browse files
flow: add RTLMP_KEEP_CLUSTERING to store the MPL clustering tree
Set it to 1 and the macro placer runs with -keep_clustering_data, which keeps the physical hierarchy its clustering engine builds in the ODB as nested dbGroups. That is what makes the partitioning inspectable after the run: the web viewer's Clusters panel lists it, and `save_image -web -display_option {cluster_view true}` plots it headless. Off by default, for two reasons. It is an inspection aid that most runs do not need, and the clusters take ownership of the instances they hold -- an instance belongs to a single dbGroup -- so on a design with power domains or region groups it would take them away from those. OpenROAD leaves such instances alone and reports them (MPL-0078), but there is no reason to spend the ODB on a tree nobody asked for. The clustering itself runs either way, so the only cost of turning it on is storing the result: measured on nangate45/bp_quad (220 macros, 1.18M instances, 98 clusters over 3 levels -- the largest cluster tree among the ORFS designs) the macro placer goes from 137.8s to 139.9s, inside the annealer's own run-to-run spread, and the ODB grows ~22KB on 90MB. Note that RTLMP_ARGS still replaces the whole argument list, so flows setting it must pass -keep_clustering_data themselves. Part of The-OpenROAD-Project/OpenROAD#7959 Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
1 parent ab244fc commit 6582e79

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ configuration file.
255255
| <a name="RTLMP_FENCE_LY"></a>RTLMP_FENCE_LY| Defines the lower left Y coordinate for the global fence bounding box in microns.| 0.0|
256256
| <a name="RTLMP_FENCE_UX"></a>RTLMP_FENCE_UX| Defines the upper right X coordinate for the global fence bounding box in microns.| 0.0|
257257
| <a name="RTLMP_FENCE_UY"></a>RTLMP_FENCE_UY| Defines the upper right Y coordinate for the global fence bounding box in microns.| 0.0|
258+
| <a name="RTLMP_KEEP_CLUSTERING"></a>RTLMP_KEEP_CLUSTERING| Set to 1 to store the RTL macro placer's clustering hierarchy in the ODB as nested dbGroups.| 0|
258259
| <a name="RTLMP_MAX_INST"></a>RTLMP_MAX_INST| Maximum number of standard cells in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes.| |
259260
| <a name="RTLMP_MAX_LEVEL"></a>RTLMP_MAX_LEVEL| Maximum depth of the physical hierarchy tree.| 2|
260261
| <a name="RTLMP_MAX_MACRO"></a>RTLMP_MAX_MACRO| Maximum number of macros in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes.| |
@@ -429,6 +430,7 @@ configuration file.
429430
- [RTLMP_FENCE_LY](#RTLMP_FENCE_LY)
430431
- [RTLMP_FENCE_UX](#RTLMP_FENCE_UX)
431432
- [RTLMP_FENCE_UY](#RTLMP_FENCE_UY)
433+
- [RTLMP_KEEP_CLUSTERING](#RTLMP_KEEP_CLUSTERING)
432434
- [RTLMP_MAX_INST](#RTLMP_MAX_INST)
433435
- [RTLMP_MAX_LEVEL](#RTLMP_MAX_LEVEL)
434436
- [RTLMP_MAX_MACRO](#RTLMP_MAX_MACRO)

‎flow/scripts/macro_place_util.tcl‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ if { [find_macros] != "" } {
5353
append_env_var additional_rtlmp_args RTLMP_BOUNDARY_WT -boundary_weight 1
5454
append_env_var additional_rtlmp_args RTLMP_NOTCH_WT -notch_weight 1
5555
append_env_var additional_rtlmp_args RTLMP_RPT_DIR -report_directory 1
56+
append_env_var additional_rtlmp_args RTLMP_KEEP_CLUSTERING \
57+
-keep_clustering_data 0
5658
append_env_var additional_rtlmp_args RTLMP_FENCE_LX -fence_lx 1
5759
append_env_var additional_rtlmp_args RTLMP_FENCE_LY -fence_ly 1
5860
append_env_var additional_rtlmp_args RTLMP_FENCE_UX -fence_ux 1

‎flow/scripts/variables.json‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flow/scripts/variables.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,13 @@ RTLMP_ARGS:
14481448
Overrides all other RTL macro placer arguments.
14491449
stages:
14501450
- floorplan
1451+
RTLMP_KEEP_CLUSTERING:
1452+
description: >
1453+
Set to 1 to store the RTL macro placer's clustering hierarchy in the ODB as
1454+
nested dbGroups.
1455+
default: 0
1456+
stages:
1457+
- floorplan
14511458
GDS_ALLOW_EMPTY:
14521459
description: >
14531460
Single regular expression of module names of macros that have no .gds file

0 commit comments

Comments
 (0)