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

Đang mở Phù hợp với người mới
#12,176 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@LucasYuki đang làm issue này rồi.

Từ ngày 10/11/2026.

  • #12548 của @chaitanya-bhardwaj — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
tooling

Hướng nghiên cứu

Đọc src/odb/src/lefin/MinCutParser.cpp, đặc biệt là MinCutParser::addCutClass, và theo dõi cách cờ theo cut class của quy tắc cùng bản đồ lớp được thiết lập. Thêm một kiểm thử tập trung trong src/odb/test để đọc thuộc tính LEF58 và kiểm tra isPerCutClass() cùng bản đồ lớp. Công việc hoàn thành khi kiểm thử xác nhận cờ được bật cho dạng theo cut class.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Verilog
Star
3.4k
Fork
1.1k
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
247

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của The-OpenROAD-Project/OpenROAD

Tất cả issue của The-OpenROAD-Project/OpenROAD

Issue tương tự

Thêm issue về DevTools

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.