From 3c7c5a48a4000ef5202ca1746cf95d9660d7e255 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Thu, 12 Nov 2026 14:25:46 +0000 Subject: [PATCH] grt: prefix incremental global route metrics with their step Each global_route -end_incremental reports the same global_route__* and dpl__* metrics as the initial route, so 5_1_grt.json held up to four copies of each key and only the last survived a JSON parse. Scope the incremental block after repair_design, repair_timing and recover_power with a nested metrics stage, giving keys such as globalroute__repair_timing__global_route__vias. The unprefixed globalroute__global_route__* keys now describe the initial route. Signed-off-by: Matt Liberty --- flow/scripts/global_route.tcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 93213b19a5..bdc4487110 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -81,12 +81,14 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } { # Running DPL to fix overlapped instances # Run to get modified net by DPL + utl::push_metrics_stage "globalroute__repair_design__{}" log_cmd global_route -start_incremental {*}$allow_congestion detailed_placement_helper -quiet # Route only the modified net by DPL run_global_route_and_catch_failures -end_incremental {*}$res_aware \ {*}$allow_congestion \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt + utl::pop_metrics_stage # Repair timing using global route parasitics puts "Repair setup and hold violations..." @@ -98,6 +100,7 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } { report_metrics 5 "global route post repair timing" } + utl::push_metrics_stage "globalroute__repair_timing__{}" log_cmd global_route -start_incremental {*}$allow_congestion detailed_placement_helper -quiet log_cmd check_placement -placeable -verbose @@ -105,6 +108,7 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } { run_global_route_and_catch_failures -end_incremental {*}$res_aware \ {*}$allow_congestion \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt + utl::pop_metrics_stage log_cmd estimate_parasitics @@ -126,12 +130,14 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } { } if { !$::env(OPT_POST_GRT_WNS) } { + utl::push_metrics_stage "globalroute__recover_power__{}" log_cmd global_route -start_incremental {*}$allow_congestion recover_power_helper # Route the modified nets by rsz journal restore run_global_route_and_catch_failures -end_incremental {*}$res_aware \ {*}$allow_congestion \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt + utl::pop_metrics_stage } if {