drt: min-area patch owner search compares the origin-relative patch box with absolute shapes, so patches are dropped

Aperta Adatta ai principianti
#12,191 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@bnmfw ci sta già lavorando.

Dal 24/11/2026.

  • #12310 di @bandhambalaji — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

Inizia da checkMetalShape_patchOwner_helper in src/drt/src/gc/FlexGC_main.cpp, chiamato da checkMetalShape_addPatch vicino alla riga 2355. L'helper confronta patch->getOffsetBox() con il box del pin e i bbox delle figure di connessione di ogni drNet, ma il box di offset della patch è relativo all'origine. Passa il confronto a patch->getBBox(), che è assoluto. È completato quando le patch che si sovrappongono a un drNet ricevono un owner nella regressione nangate45 e il risultato instradato viene verificato rispetto alle 74 patch scartate segnalate.

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

Descrizione

bug drt
Describe the bug

When GC builds a min-area patch (checkMetalShape_addPatch, src/drt/src/gc/FlexGC_main.cpp around line 2355 on master) for a net that has more than one drNet in the worker, it calls checkMetalShape_patchOwner_helper to find the drNet whose shapes the patch touches. The helper compares patch->getOffsetBox() with each drNet's getPinBox() and its ext/route conn figs' getBBox().

The patch was just built with setOrigin(offset) and setOffsetBox(patchBx), so its offset box is relative to the patch origin (for example (-70,-300)-(70,0)), while the boxes it is compared with are absolute. drPatchWire::getBBox() applies the origin and gives the absolute box. As written, an owner is found only when some shape of a drNet reaches the region around the design origin; otherwise patch->hasNet() is false and the patch is dropped without a message.

Expected Behavior

The owner search uses the patch's absolute box (patch->getBBox()), so the patch is assigned to the drNet it overlaps.

To Reproduce
  1. gcd on nangate45 (the regression design), with a LEF58_AREA (or plain AREA) value large enough that detailed routing needs min-area patches, for example AREA 0.02 on every routing layer.
  2. Instrument the end of checkMetalShape_addPatch to log patches dropped after checkMetalShape_patchOwner_helper.
  3. On our run, 74 of 1234 patches were dropped this way. In one case the patch's absolute box was (87140,68020)-(87280,68320), and the net's second drNet had pin box (82650,58800)-(87210,88200), which overlaps it, yet no owner was found.
  4. Using getBBox() in the helper keeps those patches, and the routed result changes.
Suggested fix
odb::Rect patch_box = patch->getBBox();
Relevant log output

No response

Additional Context

Found while comparing min-area patching between router implementations. Related reports: #12187, #12188.

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

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.