odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the rule

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

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

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

2026年11月10日 から。

  • #12548 @chaitanya-bhardwaj による — オープン

評価

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

調査の方向性

src/odb/src/lefin/MinCutParser.cpp、特に MinCutParser::addCutClass を読み、ルールのカットクラスごとのフラグとクラスマップがどのように設定されるかを追跡してください。src/odb/test の下に、LEF58 プロパティを読み込み、isPerCutClass() とクラスマップを確認する焦点を絞ったテストを追加してください。テストがカットクラスごとの形式でフラグが設定されていることを確認できれば完了です。

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

説明

bug drt odb
Describe the bug

A LEF58 minimum-cut rule written in its per-cut-class form is read into odb, but its per-cut-class flag is never set. As a result the detailed router drops the rule without a message.

LAYER M2
  ...
  PROPERTY LEF58_MINIMUMCUT "
    MINIMUMCUT CUTCLASS VA 2 WIDTH 0.2 ;
  " ;
END M2

What happens:

  1. MinCutParser (src/odb/src/lefin/MinCutParser.cpp, addCutClass) records the class count with setCutsPerCutClass(className, numCuts). It never calls setPerCutClass(true), so isPerCutClass() stays false for every rule read from LEF, and getNumCuts() stays at its default.
  2. In drt (src/drt/src/io/io_parser_helper.cpp, the LEF58 minimum-cut conversion), the isPerCutClass() branch that looks up the cut class of the default vias is never taken. num_cuts is the default, and the rule is skipped by the num_cuts <= 1 early continue. No warning is printed.

So no rule written as MINIMUMCUT CUTCLASS <class> <n> ... is ever enforced by detailed routing. The plain MINIMUMCUT <n> ... form works as expected.

Seen at 4155ac31014 and on current master.

Expected Behavior

isPerCutClass() returns true for a rule read with CUTCLASS, and drt converts it using the class count, as the existing branch in io_parser_helper.cpp already intends.

To Reproduce
  1. Add the property above to a routing layer of any tech LEF whose cut layer above or below defines a cut class VA used by that layer's default via.
  2. read_lef, then in Tcl walk [$layer getTechLayerMinCutRules]: isPerCutClass returns 0, and getCutClassCutsMap holds VA 2.
  3. Run detailed_route with debug output: no minimum-cut constraint is created for the layer.
Suggested fix

In MinCutParser::addCutClass, also call rule_->setPerCutClass(true). A unit test in src/odb/test that reads the property above and checks isPerCutClass() and the class map would cover it.

Relevant log output

No response

Additional Context

Found while comparing rule coverage between LEF readers. Happy to send a PR with the one-line fix and the test if that would help.

主要言語
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

DevTools の issue をもっと見る

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

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