Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/grt/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ TESTS = [
"gcd_cugr",
"gcd_flute",
"increase_capacity1",
"incremental_restore_vias",
"incremental_update_net",
"infinite_cap",
"inst_pin_out_of_die",
Expand Down
1 change: 1 addition & 0 deletions src/grt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ or_integration_tests(
gcd_cugr
gcd_flute
increase_capacity1
incremental_restore_vias
incremental_update_net
infinite_cap
inst_pin_out_of_die
Expand Down
8 changes: 8 additions & 0 deletions src/grt/test/incremental_restore_vias.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
[INFO ODB-0128] Design: gcd
[INFO ODB-0130] Created 54 pins.
[INFO ODB-0131] Created 676 components and 2850 component-terminals.
[INFO ODB-0133] Created 579 nets and 1498 connections.
[WARNING GRT-0008] The read_guides command does not allow parasitics estimation from the guides file.
Summary 1 / 1 (100% pass)
pass
46 changes: 46 additions & 0 deletions src/grt/test/incremental_restore_vias.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Routes restored from DB guides during an incremental ECO must be
# electrically connected by construction (GlobalRouter::addImplicitVias).
#
# When guides do not carry explicit via info, boxToGlobalRouting leaves layer
# transitions implicit, so the per-net parasitic network splits into
# disconnected islands. The driver-reduced wire capacitance then collapses to
# zero (the orphaned cap is unreachable from the driver), even though the SPEF
# still dumps every node. addImplicitVias bridges the coincident adjacent-layer
# points so the restored route is a single connected network.
#
# This test forces the incremental single-net guide-restore path
# (loadRoutingFromDBGuides) via the ODB journal: deleting a net's guides inside
# an ECO and undoing it recreates the guides and fires the
# inDbNetPostGuideRestore callback, marking the net for route restoration.
source "helpers.tcl"
read_lef Nangate45/Nangate45.lef
read_liberty Nangate45/Nangate45_typ.lib
read_def gcd.def
read_guides est_rc3.guide
set_routing_layers -signal metal2-metal10

set block [ord::get_db_block]
set clk_net [$block findNet "clk"]

# Trigger the journal-driven guide restore for clk.
global_route -start_incremental
odb::dbDatabase_beginEco $block
foreach guide [$clk_net getGuides] {
odb::dbGuide_destroy $guide
}
odb::dbDatabase_undoEco $block
global_route -end_incremental

# Estimate parasitics from the restored route and read the driver-reduced wire
# capacitance (this is what collapses to 0 when the network is fragmented).
estimate_parasitics -global_routing
with_output_to_variable report { report_net -digits 5 clk }
regexp {Wire capacitance:\s+([0-9.]+)} $report -> wire_cap

# Without addImplicitVias the restored clk network is fragmented and this is
# 0.0; with the fix the driver reaches the whole net (~17.3).
check "restored clk route is connected (non-zero wire capacitance)" {
expr {$wire_cap > 1.0}
} 1

exit_summary
Loading