From 39ac5acc4e91e345cd2a9e2a0314e74f6a76389a Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Thu, 12 Mar 2026 21:40:21 +0000 Subject: [PATCH 01/12] Fix for issue 9274 Lost parasitic annotations because of dbNetwork details Signed-off-by: dsengupta0628 --- src/dbSta/src/dbNetwork.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index d67341f2f2e..58a06ec1bb3 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -2018,6 +2018,15 @@ void dbNetwork::visitConnectedPins(const Net* net, const Net* dbNetwork::highestConnectedNet(Net* net) const { + dbNet* db_net = nullptr; + odb::dbModNet* db_modnet = nullptr; + staToDb(net, db_net, db_modnet); + if (db_modnet) { + dbNet* flat_net = db_modnet->findRelatedNet(); + if (flat_net) { + return dbToSta(flat_net); + } + } return net; } From 35f274e906f6bba6fc56d93d5734fcd8a1242478 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 13 Mar 2026 16:10:47 +0000 Subject: [PATCH 02/12] simplfy logic per feedback Signed-off-by: dsengupta0628 --- src/dbSta/src/dbNetwork.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index 58a06ec1bb3..2d83f6bcff1 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -2018,16 +2018,8 @@ void dbNetwork::visitConnectedPins(const Net* net, const Net* dbNetwork::highestConnectedNet(Net* net) const { - dbNet* db_net = nullptr; - odb::dbModNet* db_modnet = nullptr; - staToDb(net, db_net, db_modnet); - if (db_modnet) { - dbNet* flat_net = db_modnet->findRelatedNet(); - if (flat_net) { - return dbToSta(flat_net); - } - } - return net; + const Net* flat = findFlatNet(net); + return flat ? flat : net; } //////////////////////////////////////////////////////////////// From 09730f15ebb2e86274c1ad25dfa1a1bb3031c72c Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 13 Mar 2026 16:20:56 +0000 Subject: [PATCH 03/12] Added comments for caution Signed-off-by: dsengupta0628 --- src/dbSta/src/dbNetwork.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index 2d83f6bcff1..f1612c894b3 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -2016,6 +2016,14 @@ void dbNetwork::visitConnectedPins(const Net* net, } } +// Caution: +// - Network::highestConnectedNet(Net *net) retrieves the highest hierarchical +// net connected to the given net. +// - But `dbNetwork::highestConnectedNet(Net* net)` retrieves the corresponding +// flat net for the given net. +// - It behaves differently to cope with the issue 9724. +// - This redefinition may cause another issue later when +// `Network::highestConnectedNet(Net *net)` is used elsewhere. const Net* dbNetwork::highestConnectedNet(Net* net) const { const Net* flat = findFlatNet(net); From 46be33bde81ee8de4f5f40d3108dd5db1d6d9487 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Thu, 19 Mar 2026 14:12:01 +0000 Subject: [PATCH 04/12] updated sta to latest on 3/19 Signed-off-by: dsengupta0628 --- src/sta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sta b/src/sta index d213f0fa711..69e11bbd0d4 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit d213f0fa711cad444e8ef82ee395dc03b6e94510 +Subproject commit 69e11bbd0d4659730c0ef95d92c653a0c72b975f From 683200730b557570f685d8a452889f019eb980e5 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 20 Mar 2026 00:16:07 +0000 Subject: [PATCH 05/12] isExternal issue fix to resolve crash in PRIMA delay calc Signed-off-by: dsengupta0628 --- src/dbSta/include/db_sta/dbNetwork.hh | 5 ++++- src/dbSta/src/dbNetwork.cc | 11 +++++++---- src/dbSta/test/cpp/TestDbSta.cc | 4 +++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/dbSta/include/db_sta/dbNetwork.hh b/src/dbSta/include/db_sta/dbNetwork.hh index 9d2fbf19b26..cc09d703570 100644 --- a/src/dbSta/include/db_sta/dbNetwork.hh +++ b/src/dbSta/include/db_sta/dbNetwork.hh @@ -360,7 +360,10 @@ class dbNetwork : public ConcreteNetwork // Return the highest net above the given net. // - If the net is a flat net, return it. - // - If the net is a hier net, return the modnet in the highest hierarchy. + // - If the net is a hier net (dbModNet), return the associated flat dbNet. + // This ensures parasitic externality checks in ensureParasiticNode work + // correctly: net_ is always a flat net, so the comparison net != net_ + // must also operate on flat nets. Net* highestNetAbove(Net* net) const override; //////////////////////////////////////////////////////////////// diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index 55515d6c1fc..c0ce698c351 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -5205,11 +5205,14 @@ Net* dbNetwork::highestNetAbove(Net* net) const } if (modnet) { + // Return the flat net associated with this mod net. + // Parasitic externality checks in ConcreteParasiticNetwork::ensureParasiticNode + // compare against net_ which is always a flat net (set via makeParasiticNetwork). + // Returning the highest mod net causes all pin nodes on hierarchically-connected + // nets to compare unequal to net_ and be incorrectly marked as external, + // making node_count_ = 0 and crashing PRIMA in measureThresholds. if (dbNet* related_dbnet = modnet->findRelatedNet()) { - if (odb::dbModNet* highest_modnet - = related_dbnet->findModNetInHighestHier()) { - return dbToSta(highest_modnet); // Found the highest modnet - } + return dbToSta(related_dbnet); } } diff --git a/src/dbSta/test/cpp/TestDbSta.cc b/src/dbSta/test/cpp/TestDbSta.cc index d752d0421b1..7f664c709c9 100644 --- a/src/dbSta/test/cpp/TestDbSta.cc +++ b/src/dbSta/test/cpp/TestDbSta.cc @@ -77,9 +77,11 @@ TEST_F(TestDbSta, TestHierarchyConnectivity) ASSERT_NE(modnet_out2, nullptr); Net* sta_modnet_out2 = db_network_->dbToSta(modnet_out2); ASSERT_NE(sta_modnet_out2, nullptr); + // highestNetAbove on a mod net now returns the associated flat dbNet, + // not the highest mod net, so that parasitic externality checks work correctly. Net* sta_highest_modnet_out = db_network_->highestNetAbove(sta_modnet_mod_out); - ASSERT_EQ(sta_highest_modnet_out, sta_modnet_out2); + ASSERT_EQ(sta_highest_modnet_out, sta_dbnet_out2); // Check get_ports -of_object Net* NetTermIterator* term_iter = db_network_->termIterator(sta_dbnet_out2); From 73558abfb6c4d8d99d31fb151d63845c9545b990 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 20 Mar 2026 00:36:05 +0000 Subject: [PATCH 06/12] reformatted clang Signed-off-by: dsengupta0628 --- src/dbSta/include/db_sta/dbNetwork.hh | 6 +++--- src/dbSta/src/dbNetwork.cc | 13 +++++++------ src/dbSta/test/cpp/TestDbSta.cc | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/dbSta/include/db_sta/dbNetwork.hh b/src/dbSta/include/db_sta/dbNetwork.hh index cc09d703570..9c1998c938c 100644 --- a/src/dbSta/include/db_sta/dbNetwork.hh +++ b/src/dbSta/include/db_sta/dbNetwork.hh @@ -361,9 +361,9 @@ class dbNetwork : public ConcreteNetwork // Return the highest net above the given net. // - If the net is a flat net, return it. // - If the net is a hier net (dbModNet), return the associated flat dbNet. - // This ensures parasitic externality checks in ensureParasiticNode work - // correctly: net_ is always a flat net, so the comparison net != net_ - // must also operate on flat nets. + // This ensures parasitic externality checks in ensureParasiticNode work + // correctly: net_ is always a flat net, so the comparison net != net_ + // must also operate on flat nets. Net* highestNetAbove(Net* net) const override; //////////////////////////////////////////////////////////////// diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index c0ce698c351..5707ca78fa6 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -2017,7 +2017,7 @@ void dbNetwork::visitConnectedPins(const Net* net, } // Caution: -// - Network::highestConnectedNet(Net *net) retrieves the highest hierarchical +//- Network::highestConnectedNet(Net *net) retrieves the highest hierarchical // net connected to the given net. // - But `dbNetwork::highestConnectedNet(Net* net)` retrieves the corresponding // flat net for the given net. @@ -5206,11 +5206,12 @@ Net* dbNetwork::highestNetAbove(Net* net) const if (modnet) { // Return the flat net associated with this mod net. - // Parasitic externality checks in ConcreteParasiticNetwork::ensureParasiticNode - // compare against net_ which is always a flat net (set via makeParasiticNetwork). - // Returning the highest mod net causes all pin nodes on hierarchically-connected - // nets to compare unequal to net_ and be incorrectly marked as external, - // making node_count_ = 0 and crashing PRIMA in measureThresholds. + // Parasitic externality checks in + // ConcreteParasiticNetwork::ensureParasiticNode compare against net_ which + // is always a flat net (set via makeParasiticNetwork). Returning the + // highest mod net causes all pin nodes on hierarchically-connected nets to + // compare unequal to net_ and be incorrectly marked as external, making + // node_count_ = 0 and crashing PRIMA in measureThresholds. if (dbNet* related_dbnet = modnet->findRelatedNet()) { return dbToSta(related_dbnet); } diff --git a/src/dbSta/test/cpp/TestDbSta.cc b/src/dbSta/test/cpp/TestDbSta.cc index 7f664c709c9..f1c9c549d34 100644 --- a/src/dbSta/test/cpp/TestDbSta.cc +++ b/src/dbSta/test/cpp/TestDbSta.cc @@ -77,8 +77,8 @@ TEST_F(TestDbSta, TestHierarchyConnectivity) ASSERT_NE(modnet_out2, nullptr); Net* sta_modnet_out2 = db_network_->dbToSta(modnet_out2); ASSERT_NE(sta_modnet_out2, nullptr); - // highestNetAbove on a mod net now returns the associated flat dbNet, - // not the highest mod net, so that parasitic externality checks work correctly. + // highestNetAbove on a mod net now returns the associated flat dbNet, not the + // highest mod net, so that parasitic externality checks work correctly. Net* sta_highest_modnet_out = db_network_->highestNetAbove(sta_modnet_mod_out); ASSERT_EQ(sta_highest_modnet_out, sta_dbnet_out2); From 51a1bb59697acd55b75fef1cb21717bcaeeb22b2 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 23 Mar 2026 19:46:09 +0000 Subject: [PATCH 07/12] update latest src/sta Signed-off-by: dsengupta0628 --- src/sta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sta b/src/sta index 69e11bbd0d4..2e6dd048370 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit 69e11bbd0d4659730c0ef95d92c653a0c72b975f +Subproject commit 2e6dd04837035b68592eee7b5f83c6e80593c3f3 From 62d242f29d9f3482a742d298355d27e6bb0ea1c3 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 23 Mar 2026 23:26:50 +0000 Subject: [PATCH 08/12] Force-align STA submodule to master (d213f0f) --- src/sta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sta b/src/sta index 2e6dd048370..d213f0fa711 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit 2e6dd04837035b68592eee7b5f83c6e80593c3f3 +Subproject commit d213f0fa711cad444e8ef82ee395dc03b6e94510 From 1623227e762c35e25debe4e4bd941d1d9807763f Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 30 Mar 2026 14:27:21 +0000 Subject: [PATCH 09/12] updated with latest sta and OR master Signed-off-by: dsengupta0628 --- src/sta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sta b/src/sta index ffda41536fe..41ad5c62b8f 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit ffda41536fe1cff4a3a9eed7caf9f810f63234e0 +Subproject commit 41ad5c62b8f6f2596d9b1983255c0928537bdd31 From 757e8a01b99bd029b587119607bfcffa9218bf32 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 18 May 2026 14:16:55 +0000 Subject: [PATCH 10/12] enhanced cpp test and one tcl test to explicitly show the fix Signed-off-by: dsengupta0628 --- src/dbSta/test/BUILD | 1 + src/dbSta/test/CMakeLists.txt | 1 + src/dbSta/test/cpp/TestDbSta.cc | 15 +++ src/dbSta/test/hier_highest_connected_net.ok | 5 + .../test/hier_highest_connected_net.spef | 97 +++++++++++++++++++ src/dbSta/test/hier_highest_connected_net.tcl | 68 +++++++++++++ src/dbSta/test/hier_highest_connected_net.v | 32 ++++++ 7 files changed, 219 insertions(+) create mode 100644 src/dbSta/test/hier_highest_connected_net.ok create mode 100644 src/dbSta/test/hier_highest_connected_net.spef create mode 100644 src/dbSta/test/hier_highest_connected_net.tcl create mode 100644 src/dbSta/test/hier_highest_connected_net.v diff --git a/src/dbSta/test/BUILD b/src/dbSta/test/BUILD index 7f92bb385fc..2777fa257e6 100644 --- a/src/dbSta/test/BUILD +++ b/src/dbSta/test/BUILD @@ -27,6 +27,7 @@ ALL_TESTS = [ "hierclock", "hierwrite", "hier_deep", + "hier_highest_connected_net", "hier_weird_port", "levelize_drvr_vertices1", "make_port", diff --git a/src/dbSta/test/CMakeLists.txt b/src/dbSta/test/CMakeLists.txt index b9d63de611b..66c31a6e138 100644 --- a/src/dbSta/test/CMakeLists.txt +++ b/src/dbSta/test/CMakeLists.txt @@ -17,6 +17,7 @@ or_integration_tests( hierclock hierwrite hier_deep + hier_highest_connected_net hier_weird_port levelize_drvr_vertices1 make_port diff --git a/src/dbSta/test/cpp/TestDbSta.cc b/src/dbSta/test/cpp/TestDbSta.cc index b05c61a017e..d51382780ea 100644 --- a/src/dbSta/test/cpp/TestDbSta.cc +++ b/src/dbSta/test/cpp/TestDbSta.cc @@ -88,6 +88,21 @@ TEST_F(TestDbSta, TestHierarchyConnectivity) = db_network_->highestNetAbove(sta_modnet_mod_out); ASSERT_EQ(sta_highest_modnet_out, sta_dbnet_out2); + // Regression for PR #3194: dbNetwork::highestConnectedNet on a hier + // dbModNet must return the associated flat dbNet, not the modnet wrapper + // itself. Parasitics::findParasiticNet uses this as the lookup key into + // the parasitic network map. SPEF is a flat format so parasitics are + // keyed by flat dbNet; returning the modnet wrapper caused a cache miss + // and silently degraded delay calculation to LumpedCap. + const Net* sta_highest_connected_modnet + = db_network_->highestConnectedNet(sta_modnet_mod_out); + ASSERT_EQ(sta_highest_connected_modnet, sta_dbnet_out2); + + // Flat dbNet input: highestConnectedNet is idempotent. + const Net* sta_highest_connected_flat + = db_network_->highestConnectedNet(sta_dbnet_out2); + ASSERT_EQ(sta_highest_connected_flat, sta_dbnet_out2); + // Check get_ports -of_object Net* NetTermIterator* term_iter = db_network_->termIterator(sta_dbnet_out2); while (term_iter->hasNext()) { diff --git a/src/dbSta/test/hier_highest_connected_net.ok b/src/dbSta/test/hier_highest_connected_net.ok new file mode 100644 index 00000000000..d1b7848c570 --- /dev/null +++ b/src/dbSta/test/hier_highest_connected_net.ok @@ -0,0 +1,5 @@ +Found 3 unannotated drivers. + ff_out/QN + ff_top/QN + sub_inst/ff_sub/QN +Found 0 partially unannotated drivers. diff --git a/src/dbSta/test/hier_highest_connected_net.spef b/src/dbSta/test/hier_highest_connected_net.spef new file mode 100644 index 00000000000..9f16f403b40 --- /dev/null +++ b/src/dbSta/test/hier_highest_connected_net.spef @@ -0,0 +1,97 @@ +*SPEF "IEEE 1481-1998" +*DESIGN "top" +*DATE "now" +*VENDOR "n/a" +*PROGRAM "n/a" +*VERSION "1.0" +*DESIGN_FLOW "" +*DIVIDER / +*DELIMITER : +*BUS_DELIMITER [ ] +*T_UNIT 1 NS +*C_UNIT 1 PF +*R_UNIT 1 OHM +*L_UNIT 1 HENRY + +*D_NET clk 0.001 +*CONN +*P clk I +*I ck_buf:A I +*CAP +1 clk 0.0005 +2 ck_buf:A 0.0005 +*RES +1 clk ck_buf:A 0.1 +*END + +*D_NET clk_int 0.002 +*CONN +*I ck_buf:Z O +*I ff_top:CK I +*I ff_out:CK I +*I sub_inst/ff_sub:CK I +*CAP +1 ck_buf:Z 0.0005 +2 ff_top:CK 0.0005 +3 ff_out:CK 0.0005 +4 sub_inst/ff_sub:CK 0.0005 +*RES +1 ck_buf:Z ff_top:CK 0.1 +2 ck_buf:Z ff_out:CK 0.1 +3 ck_buf:Z sub_inst/ff_sub:CK 0.1 +*END + +*D_NET in 0.001 +*CONN +*P in I +*I ff_top:D I +*CAP +1 in 0.0005 +2 ff_top:D 0.0005 +*RES +1 in ff_top:D 0.1 +*END + +*D_NET out 0.001 +*CONN +*I ff_out:Q O +*P out O +*CAP +1 ff_out:Q 0.0005 +2 out 0.0005 +*RES +1 ff_out:Q out 0.1 +*END + +*D_NET midnet 0.001 +*CONN +*I ff_top:Q O +*I sub_inst/ff_sub:D I +*CAP +1 ff_top:Q 0.0005 +2 sub_inst/ff_sub:D 0.0005 +*RES +1 ff_top:Q sub_inst/ff_sub:D 0.1 +*END + +*D_NET intermediate 0.001 +*CONN +*I sub_inst/buf_sub:Z O +*I ff_out:D I +*CAP +1 sub_inst/buf_sub:Z 0.0005 +2 ff_out:D 0.0005 +*RES +1 sub_inst/buf_sub:Z ff_out:D 0.1 +*END + +*D_NET sub_inst/q_int 0.001 +*CONN +*I sub_inst/ff_sub:Q O +*I sub_inst/buf_sub:A I +*CAP +1 sub_inst/ff_sub:Q 0.0005 +2 sub_inst/buf_sub:A 0.0005 +*RES +1 sub_inst/ff_sub:Q sub_inst/buf_sub:A 0.1 +*END diff --git a/src/dbSta/test/hier_highest_connected_net.tcl b/src/dbSta/test/hier_highest_connected_net.tcl new file mode 100644 index 00000000000..5d707347c5d --- /dev/null +++ b/src/dbSta/test/hier_highest_connected_net.tcl @@ -0,0 +1,68 @@ +# Regression for PR #3194: dbNetwork::highestConnectedNet on a hier +# dbModNet must resolve to the associated flat dbNet so that +# Parasitics::findParasiticNet hits the parasitic_network_map_ entry +# inserted under the flat dbNet key. +# +# Why this test uses read_spef rather than estimate_parasitics: +# estimate_parasitics keys parasitic_network_map_ via findParasiticNet +# for BOTH insert and lookup, so the bug is self-consistent and +# invisible (insert key == lookup key, both buggy or both fixed). +# SPEF read keys insertion by flat dbNet (parser -> findNet -> flat +# at top scope) while lookup still uses findParasiticNet -> +# dbNetwork::highestConnectedNet. Pre-fix override echoed the modnet +# wrapper -> modnet key != flat key -> cache miss -> driver +# classified unannotated. Fix returns the related flat dbNet -> hit. +# +# Design (hier_highest_connected_net.v): 2-level hier with reg-to-reg +# data path crossing sub_inst. Top clk is buffered by ck_buf so the +# clock-tree driver iterated is a leaf iterm, not the top BTerm; this +# avoids the top-port bypass branch in Parasitics::findParasiticNet +# (which returns network_->net(term) directly with no +# highestConnectedNet call and is independent of PR #3194) that would +# otherwise leave clk unannotated on the fixed binary too. +# +# Hier-crossing nets (carry both flat dbNet + dbModNet on their leaf +# iterms after link_design -hier): +# clk_int : ck_buf/Z -> ff_top/CK, ff_out/CK, sub_inst/ff_sub/CK +# midnet : ff_top/Q -> sub_inst/ff_sub/D +# intermediate : sub_inst/buf_sub/Z -> ff_out/D +# +# Expected outputs: +# +# Fixed binary: +# Found 3 unannotated drivers. +# ff_out/QN +# ff_top/QN +# sub_inst/ff_sub/QN +# Found 0 partially unannotated drivers. +# +# Bug binary: +# Found 6 unannotated drivers. +# ck_buf/Z +# ff_out/QN +# ff_top/Q +# ff_top/QN +# sub_inst/buf_sub/Z +# sub_inst/ff_sub/QN +# Found 0 partially unannotated drivers. +# +# The 3 baseline entries (ff_top/QN, ff_out/QN, sub_inst/ff_sub/QN) +# are dangling DFF QN outputs -- no loads, no wire, no parasitic +# possible. The 3 bug-extras (ck_buf/Z, ff_top/Q, sub_inst/buf_sub/Z) +# are the modnet-wrapped drivers on the hier-crossing nets above: +# findParasiticNet returns their dbModNet wrapper, SPEF-inserted +# entries are keyed by flat dbNet -> map miss on bug binary, hit on +# fixed binary. +source "helpers.tcl" +read_liberty Nangate45/Nangate45_typ.lib +read_lef Nangate45/Nangate45.lef +read_verilog hier_highest_connected_net.v +link_design top -hier + +create_clock -name clk -period 5 [get_ports clk] +set_input_delay -clock clk 0 [get_ports in] +set_output_delay -clock clk 0 [get_ports out] + +read_spef hier_highest_connected_net.spef + +report_parasitic_annotation -report_unannotated diff --git a/src/dbSta/test/hier_highest_connected_net.v b/src/dbSta/test/hier_highest_connected_net.v new file mode 100644 index 00000000000..53d71c9bef3 --- /dev/null +++ b/src/dbSta/test/hier_highest_connected_net.v @@ -0,0 +1,32 @@ +// 2-level hier reg-to-reg design. midnet/intermediate span sub_inst +// boundary so leaf iterms on those nets get both flat dbNet and +// dbModNet wrappers after link_design -hier. Clock buffer ck_buf +// isolates the top clk BTerm so driver iteration doesn't hit the +// top-BTerm bypass branch in Parasitics::findParasiticNet (which is +// independent of PR #3194 and would otherwise leave clk unannotated). + +module sub (din, sub_clk, dout); + input din; + input sub_clk; + output dout; + + wire q_int; + + DFF_X1 ff_sub (.D(din), .CK(sub_clk), .Q(q_int)); + BUF_X1 buf_sub (.A(q_int), .Z(dout)); +endmodule + +module top (in, clk, out); + input in; + input clk; + output out; + + wire clk_int; + wire midnet; + wire intermediate; + + BUF_X1 ck_buf (.A(clk), .Z(clk_int)); + DFF_X1 ff_top (.D(in), .CK(clk_int), .Q(midnet)); + sub sub_inst (.din(midnet), .sub_clk(clk_int), .dout(intermediate)); + DFF_X1 ff_out (.D(intermediate), .CK(clk_int), .Q(out)); +endmodule From 923a5eec6044309c8cb44f8a2ffc68e47f655635 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 18 May 2026 19:32:07 +0000 Subject: [PATCH 11/12] regolden regression Signed-off-by: dsengupta0628 --- src/dbSta/test/hier_highest_connected_net.ok | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dbSta/test/hier_highest_connected_net.ok b/src/dbSta/test/hier_highest_connected_net.ok index d1b7848c570..bc99f5fb785 100644 --- a/src/dbSta/test/hier_highest_connected_net.ok +++ b/src/dbSta/test/hier_highest_connected_net.ok @@ -1,3 +1,5 @@ +[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells +[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments. Found 3 unannotated drivers. ff_out/QN ff_top/QN From 32458ec66f3c31bfb9367cb30197ae19dfd6410b Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Mon, 18 May 2026 19:35:29 +0000 Subject: [PATCH 12/12] tclfmt Signed-off-by: dsengupta0628 --- src/dbSta/test/hier_highest_connected_net.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbSta/test/hier_highest_connected_net.tcl b/src/dbSta/test/hier_highest_connected_net.tcl index 5d707347c5d..3b3611a1e4e 100644 --- a/src/dbSta/test/hier_highest_connected_net.tcl +++ b/src/dbSta/test/hier_highest_connected_net.tcl @@ -60,7 +60,7 @@ read_verilog hier_highest_connected_net.v link_design top -hier create_clock -name clk -period 5 [get_ports clk] -set_input_delay -clock clk 0 [get_ports in] +set_input_delay -clock clk 0 [get_ports in] set_output_delay -clock clk 0 [get_ports out] read_spef hier_highest_connected_net.spef