rcx: wrong OVER/UNDER table used when the rules LayerCount exceeds the routing layer count
Maintainer thường phản hồi trong vòng 1 ngày
@AcKoucher đang làm issue này rồi.
Từ ngày 4/11/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Read src/rcx/src/extModelGen.cpp's getMetIndexOverUnder() alongside getOverUnderRC() and getOverUnderFringeRC() in src/rcx/src/extRCmodel.cpp; trace how the rules-file and technology layer counts reach the lookup. Run the public gist's run.sh testcase with the four rules files. Done means the mismatched-layer cases no longer silently use another table, with results matching the intended tables or an explicit warning/error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When the extraction rules file declares more layers than the technology has routing layers, OpenRCX stores the Metal m OVER u UNDER o tables with the layer count of the rules file and looks them up with the smaller of the two layer counts.
For u >= 2 the lookup silently returns another table.
This happens with IHP's sg13cmos5l, which has 5 routing layers (Metal1 to Metal4, TopMetal1).
Its LibreLane configuration points RCX_RULES at ihp-sg13cmos5l/libs.tech/librelane/IHP_rcx_patterns.rules, a symlink to the sg13g2 rules, which declare LayerCount 7.
Tables are stored with 8 levels and looked up with 6:
| wire | intended table | stored index | looked-up index | table actually read |
|---|---|---|---|---|
| Metal3 over Metal2, under Metal4 | Metal 3 OVER 2 UNDER 4 | 4 | 2 | Metal 3 OVER 1 UNDER 6 |
| Metal3 over Metal2, under layer 5 | Metal 3 OVER 2 UNDER 5 | 5 | 3 | Metal 3 OVER 1 UNDER 7 |
| Metal4 over Metal2, under layer 5 | Metal 4 OVER 2 UNDER 5 | 3 | 1 | Metal 4 OVER 1 UNDER 6 |
| Metal4 over Metal3, under layer 5 | Metal 4 OVER 3 UNDER 5 | 6 | 2 | Metal 4 OVER 1 UNDER 7 |
The tables actually read describe layers 6 and 7, which this technology does not have.
In the sg13g2 rules, the first and last rows of these tables hold 0.51 to 0.99 times the capacitance of the intended ones, so the affected wires are under-estimated.
For u = 1 both indices coincide, so OVER 1 UNDER o configurations are not affected.
Expected Behavior
The two canary rules files of the test case differ from the 7-layer rules only in one table that involves layer 6 or 7, so they should give exactly the same parasitics as the unmodified rules.
A Metal3 wire over Metal2 and under Metal4 should be extracted with Metal 3 OVER 2 UNDER 4, as it is when the same tables are written for 5 layers.
If a rules file with more layers than the technology is not supported, a warning or an error would be expected rather than a silent lookup of another table.
Environment
OpenROAD 26Q3-2676-g943a4d2c92 (openroad -version), commit 943a4d2c9284cce991a916b67937157d890fe133
kernel: Linux 7.2.9-100.fc43.x86_64
os: Fedora Linux 43 (Cloud Edition)
The code involved is unchanged on master at 85eb56c8d32a29e085cfb5ca6af660d5ef6e1a5e (2026-10-30)
IHP-Open-PDK files from commit cfc0e22b92306178ebb5a5bc4865afe3294654d0, identical on dev at 456dd2dc707331568cbff0dbc27a1a0c4d463cc2
To Reproduce
The test case is in this public gist: https://gist.github.com/jalcim/7a72e17ae39d4fc87baa109a51de216d
It contains:
sg13cmos5l_tech.lef:ihp-sg13cmos5l/libs.ref/sg13cmos5l_stdcell/lef/sg13cmos5l_tech.leffrom IHP-Open-PDK (md5 6de91dee01b042e594c47e667c62e584);IHP_rcx_patterns.rules:ihp-sg13g2/libs.tech/librelane/openrcx/IHP_rcx_patterns.rulesfrom IHP-Open-PDK (md5 bdc5a2bc1a3464df7295eb3ae3f69fb9), withLayerCount 7;canary_m3.rules: the same file with onlyMetal 3 OVER 1 UNDER 6multiplied by two;canary_m4.rules: the same file with onlyMetal 4 OVER 1 UNDER 7multiplied by two;rules_5layers.rules: the same tables written for 5 layers (LayerCount 5), each table kept under its own title;crossings.def: no cell, a 100 um Metal3 wire and a 100 um TopMetal1 wire on one horizontal track, crossed by 100 stacked Metal2 and Metal4 vertical columns at a 0.96 um pitch, so that the Metal3 wire is over Metal2 and under Metal4, and each Metal4 column is over Metal3 and under TopMetal1;make_testcase.py, which wrote the four files above fromIHP_rcx_patterns.rules;flow.tclandrun.sh.
git clone https://gist.github.com/jalcim/7a72e17ae39d4fc87baa109a51de216d openrcx-overunder-testcase
cd openrcx-overunder-testcase
sh run.sh openroad
run.sh runs flow.tcl once per rules file and prints the capacitance of the Metal3 wire, of the TopMetal1 wire, and summed over the Metal2 and Metal4 columns, in pF:
read_lef sg13cmos5l_tech.lef
read_def crossings.def
set_extraction_rules_file $::env(RULES)
define_process_corner -ext_model_index 0 CURRENT_CORNER
extract_parasitics -lef_res
write_spef $::env(SPEF)
Relevant log output
IHP_rcx_patterns n_m3 0.00869129 n_tm1 0.00935967 m2_columns 0.125531 m4_columns 0.130004
canary_m3 n_m3 0.0170547 n_tm1 0.00935967 m2_columns 0.125531 m4_columns 0.130004
canary_m4 n_m3 0.00869129 n_tm1 0.00935967 m2_columns 0.125531 m4_columns 0.141623
rules_5layers n_m3 0.015104 n_tm1 0.00935967 m2_columns 0.125531 m4_columns 0.134083
The same values in fF:
| rules | Metal3 wire | TopMetal1 wire | 100 Metal2 columns | 100 Metal4 columns |
|---|---|---|---|---|
| IHP_rcx_patterns.rules, 7 layers | 8.691 | 9.360 | 125.531 | 130.004 |
| canary_m3.rules | 17.055 | 9.360 | 125.531 | 130.004 |
| canary_m4.rules | 8.691 | 9.360 | 125.531 | 141.623 |
| rules_5layers.rules | 15.104 | 9.360 | 125.531 | 134.083 |
Doubling Metal 3 OVER 1 UNDER 6, a table of a layer that does not exist, takes the Metal3 wire from 8.691 to 17.055 fF.
Doubling Metal 4 OVER 1 UNDER 7 takes the Metal4 columns from 130.004 to 141.623 fF.
The log has no message about the layer count mismatch, only RCX-0114 for the nets of this test case, which have no pins.
extract_parasitics -ext_model_file <rules> -lef_res, as LibreLane calls it, gives the same values.
Additional Context
Links at 943a4d2c9284cce991a916b67937157d890fe133:
extRCModel::getMetIndexOverUnder()computes(layerCnt - met - 1) * (mUnder - 1) + (mOver - met - 1): https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/extModelGen.cpp#L369-L384- reading
LayerCount 7sets_layerCnt = 8: https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/extRCmodel.cpp#L3635 - the over/under tables are allocated and filled with that count, in
allocOverUnderTable()andreadRulesOverUnder(): https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/extRCmodel.cpp#L1615-L1633 and https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/extRCmodel.cpp#L1400-L1445 extMain::run()setsm._layerCntto the smaller ofgetExtLayerCnt(_tech) + 1, 6 here, and the model layer count, 8 here: https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/netRC.cpp#L1779-L1784extMeasure::getOverUnderFringeRC()andextMeasure::getOverUnderRC()pass that_layerCnttogetMetIndexOverUnder(): https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/src/extRCmodel.cpp#L1981-L2010- the only exception,
techLayerCnt == 5 && modelLayerCnt == 8, covers a technology with 4 routing layers and rules withLayerCount 7, and has been there without a comment since OpenRCX was imported into this repository in 1331f74dda: https://github.com/The-OpenROAD-Project/OpenROAD/commit/1331f74ddafde0f161e43980963bcfce5556173a
A possible fix is to compute the over/under index in getOverUnderRC() and getOverUnderFringeRC() with the layer count the tables were built with, rcModel->_layerCnt, a public member of extMetRCTable set from the rules file, which would make the special case unnecessary: https://github.com/The-OpenROAD-Project/OpenROAD/blob/943a4d2c9284cce991a916b67937157d890fe133/src/rcx/include/rcx/extRCap.h#L452
This change has not been built or tested.
A warning when the rules file declares more layers than the technology has routing layers would at least make the mismatch visible.
The sg13cmos5l rules proposed in IHP-Open-PDK PR #1237 declare LayerCount 5 and avoid this case: https://github.com/IHP-GmbH/IHP-Open-PDK/pull/1237#issuecomment-6511651800
- 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
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của The-OpenROAD-Project/OpenROAD
-
drt: min-area patch owner search compares the origin-relative patch box with absolute shapes, so patches are droppedCó thể đã có người làm @bnmfw đã nhận 11 ngày trước. Đang mởbug drt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
The-OpenROAD-Project/OpenROAD#12191 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the ruleCó thể đã có người làm @LucasYuki đã nhận 25 ngày trước. Đang mởbug drt odb
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
The-OpenROAD-Project/OpenROAD#12176 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)Có thể đã có người làm @osamahammad21 đã nhận 25 ngày trước. Đang mởbug drt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
The-OpenROAD-Project/OpenROAD#12173 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbazel enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
The-OpenROAD-Project/OpenROAD#12160 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexersCó thể đã có người làm @shivarammysore đã nhận 32 ngày trước. Đang mởbazel bug odb
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
The-OpenROAD-Project/OpenROAD#12095 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của The-OpenROAD-Project/OpenROAD
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
superfly/contextwindow#18 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Lincoln-cn/JAiRouter#1452 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
future-agi/future-agi#6351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày