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

オープン 初心者向け
#12,191 コメント 5 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@bnmfw がすでに取り組んでいます。

2026年11月24日 から。

  • #12310 @bandhambalaji による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

src/drt/src/gc/FlexGC_main.cpp の checkMetalShape_patchOwner_helper から始めてください。2355行目付近で checkMetalShape_addPatch から呼び出されています。このヘルパーは patch->getOffsetBox() を各 drNet のピン箱および接続フィギュアの bbox と比較していますが、パッチのオフセット箱は原点基準です。比較を絶対座標である patch->getBBox() に変更してください。drNet と重なるパッチが nangate45 のリグレッションで owner を取得し、配線結果が報告された74個の破棄パッチと照合されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Verilog
スター
3.4k
フォーク
1.1k
平均マージ
3日 11時間
マージ済み PR(30日)
247

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

The-OpenROAD-Project/OpenROAD のほかの issue

The-OpenROAD-Project/OpenROAD の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。