write_spef: tool-created objects inside a sub-module are written without their module path (hierarchical db)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
Start in extSpef, where the issue says instance and net names are written, and trace how module ownership is represented in dbNetwork. Reproduce the hierarchical case from src/rcx/test using hier.v and repro.tcl, then compare names in out.spef with the module placement in out.v. Done means standalone OpenSTA matches the inserted buffer and clock net names, with parasitics annotated; linked PR #11841 is already open.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In a hierarchical db (read_verilog + link_design -hier), read_verilog stores instance and net names as full paths, e.g. u_sub/n1. Objects that a tool creates later inside a sub-module, such as CTS clock buffers and clock nets, keep a plain db name and record their module through dbInst::getModule().
write_verilog places such an object in its module, so the netlist names it u_sub/clkbuf_0. write_spef writes the plain db name clkbuf_0. In the same SPEF, nets of the same module that came from read_verilog are written with their path (u_sub/n1), so the output is inconsistent.
A standalone STA that reads the written Verilog plus the SPEF, the usual signoff setup, cannot match these names. Every CTS buffer and clock net inside a sub-module ends up without parasitics. OpenROAD's own read_spef on the same db does not show the problem, because it looks names up in the db.
On an OpenTitan earlgrey chip (sky130, hierarchical flow), OpenSTA on the written .v + .spef reported 48,926 "instance not found" and 431,493 "net not found" warnings, and the clock tree was unannotated.
Expected Behavior
write_spef names every instance and net the way write_verilog places it. For an object owned by module instance u_sub, that is u_sub/clkbuf_0 and u_sub/clknet_0, like u_sub/n1.
Environment
Git commit: 99bd6268d82d13c42d430c6bf205c86e9172a8a3 (upstream master, 2026-10-20)
OpenSTA commit: 3ebab02e2e6572925962bb157f9a406e30a38c3a
Build: CMake, Release, GNU 11.4.0, in an ubuntu:22.04 container
(etc/DependencyInstaller.sh -all -cmake)
Run on: Ubuntu 25.04, Linux 6.14.0 x86_64
To Reproduce
Files from src/rcx/test (Nangate45). hier.v:
module sub (clk_in, d, q);
input clk_in;
input d;
output q;
wire n1;
BUF_X1 u_root (.A(clk_in), .Z(n1));
DFF_X1 ff (.CK(n1), .D(d), .Q(q));
endmodule
module top (clk, d, q);
input clk;
input d;
output q;
sub u_sub (.clk_in(clk), .d(d), .q(q));
endmodule
repro.tcl (run in src/rcx/test). It inserts a buffer the way CTS does: a plain name, owned by module sub.
source helpers.tcl
source Nangate45/Nangate45.vars
read_lef $tech_lef
read_lef $std_cell_lef
read_liberty $liberty_file
read_verilog hier.v
link_design top -hier
initialize_floorplan -site $site -utilization 10 -core_space 0.0
source $tracks_file
place_pins -hor_layers $io_placer_hor_layer -ver_layers $io_placer_ver_layer
set block [ord::get_db_block]
set buf [odb::dbInst_create $block [[ord::get_db] findMaster BUF_X1] clkbuf_0]
[$block findModule sub] addInst $buf
set clknet [odb::dbNet_create $block clknet_0]
set ck [[$block findInst u_sub/ff] findITerm CK]
$ck disconnect
$ck connect $clknet
[$buf findITerm A] connect [$block findNet u_sub/n1]
[$buf findITerm Z] connect $clknet
set x 0
foreach name {u_sub/u_root clkbuf_0 u_sub/ff} {
set i [$block findInst $name]
$i setLocation $x 0
$i setPlacementStatus PLACED
incr x 5700
}
detailed_placement
set_routing_layers -signal $global_routing_layers
global_route
detailed_route -verbose 0
define_process_corner -ext_model_index 0 X
set_extraction_rules_file $rcx_rules_file
extract_parasitics
write_spef out.spef
write_verilog out.v
Then in standalone OpenSTA:
read_liberty Nangate45/Nangate45_typ.lib
read_verilog out.v
link_design top
read_spef out.spef
report_parasitic_annotation
Relevant log output
SPEF name map: the synthesized net has its path, the inserted buffer and net do not.
*4 u_sub/n1
*5 clknet_0
*6 u_sub/ff
*7 u_sub/u_root
*8 clkbuf_0
out.v puts both inside module sub:
module sub (clk_in, ...
wire clknet_0;
BUF_X1 clkbuf_0 (.A(n1),
.Z(clknet_0));
OpenSTA:
Warning 1650: out.spef line 43, net clknet_0 not found.
Warning 1648: out.spef line 46, instance clkbuf_0:Z not found.
Warning 1648: out.spef line 81, instance clkbuf_0:A not found.
Found 2 unannotated drivers.
Found 1 partially unannotated drivers.
Additional Context
- The fix is in
extSpef(instance and net names); a PR follows. It adds a lookup fallback indbNetwork, so OpenROAD's ownread_spefstill matches the new names on the same db. - Related: CTS dummy loads in hierarchical designs (separate issue).
- 主要言語
- Verilog
- スター
- 3.4k
- フォーク
- 1.1k
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 245
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
The-OpenROAD-Project/OpenROAD のほかの issue
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the rule対応中かも @LucasYuki が 26 日前に担当しました。 オープンbug drt odb
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
The-OpenROAD-Project/OpenROAD#12176 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)対応中かも @osamahammad21 が 26 日前に担当しました。 オープンbug drt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
The-OpenROAD-Project/OpenROAD#12173 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbazel enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
The-OpenROAD-Project/OpenROAD#12160 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexers対応中かも @shivarammysore が 33 日前に担当しました。 オープンbazel bug odb
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
The-OpenROAD-Project/OpenROAD#12095 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
syn: acd_resynth -apply segfaults on a database resynthesized in an earlier process再び着手できるかも @povik が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug syn
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
The-OpenROAD-Project/OpenROAD#12046 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
The-OpenROAD-Project/OpenROAD の issue をすべて見る
似ている issue
-
v3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pluginkollektiv/antispam-bee#952 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
config: reject Proxy-Authorization and Proxy-Authenticate in server headers対応中かも @haseemajaz が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
rohitgollarahalli/mcpx#38 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: API good first issue size/xs
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
DahanItamar/DockNest#354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100