|
| 1 | +# Regression for PR #3194: dbNetwork::highestConnectedNet on a hier |
| 2 | +# dbModNet must resolve to the associated flat dbNet so that |
| 3 | +# Parasitics::findParasiticNet hits the parasitic_network_map_ entry |
| 4 | +# inserted under the flat dbNet key. |
| 5 | +# |
| 6 | +# Why this test uses read_spef rather than estimate_parasitics: |
| 7 | +# estimate_parasitics keys parasitic_network_map_ via findParasiticNet |
| 8 | +# for BOTH insert and lookup, so the bug is self-consistent and |
| 9 | +# invisible (insert key == lookup key, both buggy or both fixed). |
| 10 | +# SPEF read keys insertion by flat dbNet (parser -> findNet -> flat |
| 11 | +# at top scope) while lookup still uses findParasiticNet -> |
| 12 | +# dbNetwork::highestConnectedNet. Pre-fix override echoed the modnet |
| 13 | +# wrapper -> modnet key != flat key -> cache miss -> driver |
| 14 | +# classified unannotated. Fix returns the related flat dbNet -> hit. |
| 15 | +# |
| 16 | +# Design (hier_highest_connected_net.v): 2-level hier with reg-to-reg |
| 17 | +# data path crossing sub_inst. Top clk is buffered by ck_buf so the |
| 18 | +# clock-tree driver iterated is a leaf iterm, not the top BTerm; this |
| 19 | +# avoids the top-port bypass branch in Parasitics::findParasiticNet |
| 20 | +# (which returns network_->net(term) directly with no |
| 21 | +# highestConnectedNet call and is independent of PR #3194) that would |
| 22 | +# otherwise leave clk unannotated on the fixed binary too. |
| 23 | +# |
| 24 | +# Hier-crossing nets (carry both flat dbNet + dbModNet on their leaf |
| 25 | +# iterms after link_design -hier): |
| 26 | +# clk_int : ck_buf/Z -> ff_top/CK, ff_out/CK, sub_inst/ff_sub/CK |
| 27 | +# midnet : ff_top/Q -> sub_inst/ff_sub/D |
| 28 | +# intermediate : sub_inst/buf_sub/Z -> ff_out/D |
| 29 | +# |
| 30 | +# Expected outputs: |
| 31 | +# |
| 32 | +# Fixed binary: |
| 33 | +# Found 3 unannotated drivers. |
| 34 | +# ff_out/QN |
| 35 | +# ff_top/QN |
| 36 | +# sub_inst/ff_sub/QN |
| 37 | +# Found 0 partially unannotated drivers. |
| 38 | +# |
| 39 | +# Bug binary: |
| 40 | +# Found 6 unannotated drivers. |
| 41 | +# ck_buf/Z |
| 42 | +# ff_out/QN |
| 43 | +# ff_top/Q |
| 44 | +# ff_top/QN |
| 45 | +# sub_inst/buf_sub/Z |
| 46 | +# sub_inst/ff_sub/QN |
| 47 | +# Found 0 partially unannotated drivers. |
| 48 | +# |
| 49 | +# The 3 baseline entries (ff_top/QN, ff_out/QN, sub_inst/ff_sub/QN) |
| 50 | +# are dangling DFF QN outputs -- no loads, no wire, no parasitic |
| 51 | +# possible. The 3 bug-extras (ck_buf/Z, ff_top/Q, sub_inst/buf_sub/Z) |
| 52 | +# are the modnet-wrapped drivers on the hier-crossing nets above: |
| 53 | +# findParasiticNet returns their dbModNet wrapper, SPEF-inserted |
| 54 | +# entries are keyed by flat dbNet -> map miss on bug binary, hit on |
| 55 | +# fixed binary. |
| 56 | +source "helpers.tcl" |
| 57 | +read_liberty Nangate45/Nangate45_typ.lib |
| 58 | +read_lef Nangate45/Nangate45.lef |
| 59 | +read_verilog hier_highest_connected_net.v |
| 60 | +link_design top -hier |
| 61 | + |
| 62 | +create_clock -name clk -period 5 [get_ports clk] |
| 63 | +set_input_delay -clock clk 0 [get_ports in] |
| 64 | +set_output_delay -clock clk 0 [get_ports out] |
| 65 | + |
| 66 | +read_spef hier_highest_connected_net.spef |
| 67 | + |
| 68 | +report_parasitic_annotation -report_unannotated |
0 commit comments