rcx: wrong OVER/UNDER table used when the rules LayerCount exceeds the routing layer count
I maintainer di solito rispondono entro 1 giorno
@AcKoucher ci sta già lavorando.
Dal 4/11/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Verilog
- Stelle
- 3.3k
- Fork
- 1.1k
- Merge medio
- 3g 11h
- PR unite (30g)
- 247
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di The-OpenROAD-Project/OpenROAD
-
drt: min-area patch owner search compares the origin-relative patch box with absolute shapes, so patches are droppedForse già presa @bnmfw l’ha presa 11 giorni fa. Apertabug drt
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
The-OpenROAD-Project/OpenROAD#12191 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the ruleForse già presa @LucasYuki l’ha presa 25 giorni fa. Apertabug drt odb
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
The-OpenROAD-Project/OpenROAD#12176 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)Forse già presa @osamahammad21 l’ha presa 25 giorni fa. Apertabug drt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
The-OpenROAD-Project/OpenROAD#12173 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabazel enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
The-OpenROAD-Project/OpenROAD#12160 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexersForse già presa @shivarammysore l’ha presa 32 giorni fa. Apertabazel bug odb
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
The-OpenROAD-Project/OpenROAD#12095 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di The-OpenROAD-Project/OpenROAD
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
superfly/contextwindow#18 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Lincoln-cn/JAiRouter#1452 ·
I maintainer di solito rispondono entro 1 giorno
-
accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
future-agi/future-agi#6351 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno