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

Abierto
#11,840 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@arthurjolo ya está trabajando en esto.

Desde el 22/10/2026.

  • #11842 de @DeepDataFlow — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Verilog
Estrellas
3.4k
Forks
1.1k
Merge medio
3 d 11 h
PR fusionados (30 d)
245

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de The-OpenROAD-Project/OpenROAD

Todos los issues de The-OpenROAD-Project/OpenROAD

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.