CTS: dummy loads are created in the top module, so write_verilog splits clock nets inside sub-modules (hierarchical db)

Đang mở
#11,840 0 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

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

Từ ngày 22/10/2026.

  • #11842 của @DeepDataFlow — đã đóng, không merge

Đá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
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start with CTS's placeDummyCell and connectDummyCell, then compare them with createClockBuffers and the sink connection path that uses hierarchicalConnect. Reproduce the issue with src/cts/test/hier_dummy_load.v and hier_dummy_load.tcl, and inspect the generated Verilog for duplicate clock nets. Done means dummy loads share the driving buffer's module and the written Verilog has one net per clock net; the open linked PR indicates work is already underway.

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

Mô tả

cts
Describe the bug

In a hierarchical design (link_design -hier), CTS builds a clock tree in the module that drives the clock net. createClockBuffers creates the buffers with that module as parent, and sink connections go through hierarchicalConnect.

Dummy loads (clkload*) do not follow this:

  • placeDummyCell creates them with dbInst::create(block_, master, name), so they are always in the top module;
  • connectDummyCell connects them with only a flat connect.

When the clock tree is inside a sub-module, write_verilog writes each such net twice, with the same name and no port between the copies:

  • inside the sub-module, with the driver and the sinks;
  • in the top module, with only the dummy load.

The flat db still has one net, so OpenROAD's own timing is fine. A signoff STA on the written Verilog plus SPEF sees two nets. It attaches the parasitics to the undriven top-level copy, and the real clock net, with its driver, gets no wire load.

The existing golden src/cts/test/gated_clock4.vok shows the same split: 18 dummy loads of the h1 clock trees, and 18 stray wires such as \clknet_2_0__leaf_h1/gclk2, are in multi_sink instead of hier_block.

On an OpenTitan earlgrey chip (sky130), all 14,348 dummy loads were in the top module and 13,566 clock nets were split. Standalone OpenSTA reported 142,733 "pin not connected to net" warnings, and 13,531 clock buffers had no parasitics.

Expected Behavior

A dummy load is created in the same module as the buffer whose net it loads, and connected through the hierarchy like the clock sinks. The written Verilog then has one net per clock net.

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

Run in src/cts/test (Nangate45). The design has a clock root buffer and 40 flops in module sub, placed in two uneven clusters (32 + 8), so CTS adds dummy loads. The files are hier_dummy_load.v and hier_dummy_load.tcl, attached; they are also the regression test in the PR. The relevant part:

read_verilog hier_dummy_load.v
link_design top -hier
# ... floorplan, hand placement of u_sub/ff_* in two clusters ...
create_clock -period 5 clk
set_wire_rc -clock -layer metal5
set_cts_config -wire_unit 20 -sink_clustering_size 10 \
  -sink_clustering_max_diameter 60 -root_buf CLKBUF_X3 -buf_list CLKBUF_X3
clock_tree_synthesis -sink_clustering_enable
# print the module of each clkload* and of the buffer driving its input
write_verilog out.v
Relevant log output
[INFO CTS-0207]  Dummy loads inserted 3
clkload0 module=top driver=clkbuf_2_0__f_u_sub\/gclk driver_module=sub
clkload1 module=top driver=clkbuf_2_2__f_u_sub\/gclk driver_module=sub
clkload2 module=top driver=clkbuf_2_3__f_u_sub\/gclk driver_module=sub

out.v: module top declares its own copy of each net, only for the dummy loads:

module top (clk, d, q);
 ...
 wire \clknet_2_0__leaf_u_sub/gclk ;
 wire \clknet_2_2__leaf_u_sub/gclk ;
 wire \clknet_2_3__leaf_u_sub/gclk ;

 INV_X2 clkload0 (.A(\clknet_2_0__leaf_u_sub/gclk ));
 INV_X4 clkload1 (.A(\clknet_2_2__leaf_u_sub/gclk ));
 INV_X4 clkload2 (.A(\clknet_2_3__leaf_u_sub/gclk ));
 sub u_sub (.clk_in(clk), .d(d), .q(q));
endmodule

while module sub declares wire \clknet_2_0__leaf_u_sub/gclk ; again, with the driving buffer and the flops on it.

Additional Context
  • The fix creates the dummy load with the driver's module as parent, as createClockBuffers does, and calls hierarchicalConnect when the design has hierarchy, as for the sinks. A PR follows.
  • Workaround: clock_tree_synthesis -dont_use_dummy_load.
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)
245

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ề Backend & API Design

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.