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

Abierto Apto para principiantes
#12,191 5 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@bnmfw ya está trabajando en esto.

Desde el 24/11/2026.

  • #12310 de @bandhambalaji — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp
Área
backend

Línea de trabajo

Empieza en checkMetalShape_patchOwner_helper en src/drt/src/gc/FlexGC_main.cpp, llamado desde checkMetalShape_addPatch cerca de la línea 2355. El helper compara patch->getOffsetBox() con la caja de pin y los bboxes de las figuras de conexión de cada drNet, pero la caja de desplazamiento del parche es relativa al origen. Cambia la comparación a patch->getBBox(), que es absoluta. Está terminado cuando los parches que se solapan con un drNet reciben un owner en la regresión nangate45 y el resultado enrutado se verifica contra los 74 parches descartados reportados.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Verilog
Estrellas
3.4k
Forks
1.1k
Merge medio
3 d 11 h
PR fusionados (30 d)
247

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de The-OpenROAD-Project/OpenROAD

Todos los issues de The-OpenROAD-Project/OpenROAD

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.