mpl: MPL-0045 on a flat cluster of one macro and a few thousand std cells

Aperta
#11,820 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AcKoucher ci sta già lavorando.

Dal 19/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend, design

Direzione di ricerca

Start with src/mpl/src/clusterEngine.cpp, especially ClusteringEngine::breakLargeFlatCluster, and reproduce with the supplied macro_place_mpl0045.tar.gz using echo exit | ./run-me.sh. The report describes a specific failure and offers a retry weighted by instance count, but says that approach may not be right; compare it with the suggested alternatives and check whether the change preserves partitioning behavior. Done when this case no longer fails on MPL-0045 and cases that cannot split still report the error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

mpl

rtl_macro_placer stops on MPL-0045 when breakLargeFlatCluster meets a flat cluster of one macro and a few thousand std cells: weighted by area, no balance constraint up to its limit splits it.

Download macro_place_mpl0045.tar.gz, then untar and run (openroad on PATH; reproduced with bfac0546a502f30db57e92d801f1eecea86e38ab, and src/mpl's clusterEngine.cpp is unchanged at 3cc34a657d42b68f18fffb26235e9598e33f7899):

tar xf macro_place_mpl0045.tar.gz
cd macro_place_mpl0045
echo exit | ./run-me.sh

Reproduces in about 2 min. You'll see:

[ERROR MPL-0045] Cannot find a balanced partitioning for the clusters.

The design is asap7, four hardened blocks of 39 000 um2 each and 8 704 std cells of the top module on a 1.2 mm die, with the ports constrained to stretches of the die's edges. With set_debug_level MPL multilevel_autoclustering 1 the root is one flat cluster, (root)_glue_logic, 4 macros and 8 704 std cells, split three times down to (root)_glue_logic_0_0_0: 1 macro and 5 276 std cells. TritonPart gets vertex weights of area, so the macro outweighs everything else in the cluster about nine to one, and every attempt, balance 1 to 81, puts all vertices in one part; at 91 the loop stops on MPL-0045.

One way to fix it, carried in bazel-orfs and not sure it is the right one: before giving up, retry once from the default balance with every instance weighted 1, so the macro goes with the part it is most connected to (MPL-0082 says when); MPL-0045 stays for a cluster that splits by neither. It only changes runs that stopped on MPL-0045. Alternatives: split the macros off the std cells directly, or do not break a flat cluster whose size is mostly one macro.

diff --git a/src/mpl/src/clusterEngine.cpp b/src/mpl/src/clusterEngine.cpp
index 26b9e980f8..4a23662697 100644
--- a/src/mpl/src/clusterEngine.cpp
+++ b/src/mpl/src/clusterEngine.cpp
@@ -1192,6 +1192,7 @@ void ClusteringEngine::breakLargeFlatCluster(Cluster* parent)
   // the constraint until we find a reasonable split.
   constexpr float balance_constraint_relaxation_factor = 10.0f;
   std::vector<int> solution;
+  bool by_count = false;
   do {
     debugPrint(
         logger_,
@@ -1203,8 +1204,24 @@ void ClusteringEngine::breakLargeFlatCluster(Cluster* parent)
         balance_constraint);
 
     if (balance_constraint >= 90) {
-      logger_->error(
-          MPL, 45, "Cannot find a balanced partitioning for the clusters.");
+      if (by_count) {
+        logger_->error(
+            MPL, 45, "Cannot find a balanced partitioning for the clusters.");
+      }
+      // One vertex can outweigh the rest of its cluster by area, a macro
+      // among a few thousand std cells, and then no balance short of
+      // giving up splits the cluster. Split it by instance count instead:
+      // the macro goes with the part it is most connected to.
+      logger_->info(MPL,
+                    82,
+                    "Cluster {} cannot be split by area; split by instance "
+                    "count.",
+                    parent->getName());
+      std::fill(vertex_weight.begin() + num_other_cluster_vertices,
+                vertex_weight.end(),
+                1.0f);
+      by_count = true;
+      balance_constraint = default_balance_constraint;
     }
 
     solution = triton_part_->PartitionKWaySimpleMode(num_parts,

This comes from a synthetic test parent (The-OpenROAD-Project/bazel-orfs#1294, test/pin_traps); no real design is known to hit it yet.

Lingua principale
Verilog
Stelle
3.4k
Fork
1.1k
Merge medio
3g 11h
PR unite (30g)
245

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di The-OpenROAD-Project/OpenROAD

Tutte le issue di The-OpenROAD-Project/OpenROAD

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.