rsz: no regression test reaches hierarchicalConnect through gate cloning (moved loads in another module) — would a test PR be welcome?

Abierto
#11,626 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cmake, cpp
Área
testing-qa

Línea de trabajo

Start from src/rsz/test/clone_hier.tcl and the other _hier tests for harness style, then read CloneCandidate::moveLoads() in src/rsz and dbNetwork::hierarchicalConnect() in src/dbSta. Reproduce by adding a top-level BUF_X1 between r1/Q and u1's loads in a copy of repair_setup4_hier.v/.def, link with -hier, and run repair_timing -setup -sequence clone -skip_last_gasp at debug level ORD hierarchicalConnect 1. Done means clone_hier_cross.tcl/.v/.def give write_verilog output matching clone_hier_cross_out.vok plus the .ok log, registered in CMakeLists.txt and the Bazel list.

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

Descripción

While reading CloneCandidate::moveLoads() we noticed that the branch for a moved load in a different module than the driver — load_parent != parent_ → dbNetwork::hierarchicalConnect() — does not seem to be reached by any test in src/rsz/test.

What we measured on a recent master, running each test with set_debug_level ORD hierarchicalConnect 1:

  • The gate-cloning tests (clone_flat, clone_hier, repair_setup_clone_high_fanout, repair_setup_clone_legacy_flat) all build a flat database — clone_hier.tcl reads its design from clone_hier.def without link_design -hier — so getOwningInstanceParent() is always the top and the cross-module branch is never taken.
  • None of the 25 tests linked with -hier accepts a CloneMove. hierarchicalConnect() is called only in repair_tie10_hier … repair_tie13_hier (through repair_tie_fanout).
  • dbSta/test/cpp/TestHconn.cpp exercises hierarchicalConnect() directly, not through a repair.

A small case does reach it: repair_setup4_hier.v/.def with one extra top-level BUF_X1 (b0) between r1/Q and the eleven loads inside u1, linked with -hier, slow library, then repair_timing -setup -sequence clone -skip_last_gasp. b0/Z is cloned to clone1 at the top and hierarchicalConnect() runs five times: the first builds the destination side (ModBTerm/ModNet net_i in submodule, the u1/net_i ModITerm, a top ModNet, cleanup), the other four reuse it through connectionToModuleExists(); the flat net ends up renamed net1 → net1_2 by renameWithModNetInHighestHier().

The test we have in mind, in the style of the existing _hier tests:

  • src/rsz/test/clone_hier_cross.tcl + clone_hier_cross.v + clone_hier_cross.def (the case above)
  • write_verilog + diff_files against clone_hier_cross_out.vok, which records the new port on submodule, the u1 instance's connection through it and clone1 at the top — so a regression in the cross-module path changes the netlist; plus the .ok log
  • registered in src/rsz/test/CMakeLists.txt and the Bazel test list next to the other _hier tests

Two questions:

  • Is the cross-module branch of moveLoads() meant to be covered by a regression test, or is TestHconn considered sufficient for it?
  • If a test like the one above would be useful, would you be interested in a PR adding it?
Lenguaje dominante
Verilog
Estrellas
3.2k
Forks
1.1k
Merge medio
2 d 7 h
PR fusionados (30 d)
270

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 Testing & QA

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.