Skip to content

Commit f54ccfe

Browse files
oharboeclaude
andcommitted
flow: drop the per-call failure checkpoints, run_step.tcl writes them
global_place, detail_place, pdn, global_route and cts each wrapped a hand-picked call in a catch that wrote a checkpoint and raised the error again. run_step.tcl now writes <step>-failed.odb and .sdc for a failure anywhere in any step, so these wrappers go: - global_place, detail_place, pdn and global_route wrote the same name run_step.tcl writes, 3_3_place_gp-failed.odb and so on; - cts wrote 4_1_error.odb and prefixed the error with "Detailed placement failed in CTS:"; it now writes 4_1_cts-failed.odb and the step fails with detailed placement's own error. The Makefile's gui_5_1_grt-failed shortcut becomes one per step, gui_<step>-failed, with open_ and web_. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 76bf1b6 commit f54ccfe

7 files changed

Lines changed: 14 additions & 42 deletions

File tree

‎docs/contrib/EndpointSlackTracking.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Every step then writes `$(REPORTS_DIR)/<step>_endpoint_slack.json`, e.g.
2424
It works in the single-process `flow/scripts/flow.tcl` flow as well. Steps
2525
that just copy their input (`orfs_copy_db`, e.g. `5_3_fillcell` without fill
2626
cells) re-time the design if it is loaded, or else copy the previous step's
27-
snapshot. Intermediate `.odb` files written through `orfs_write_db` (e.g. CTS's
28-
`4_1_error.odb`) also get a snapshot; `*-failed` ones don't.
27+
snapshot. Intermediate `.odb` files written through `orfs_write_db` also get
28+
a snapshot; the `<step>-failed.odb` that `run_step.tcl` writes does not.
2929

3030
A placed step is timed with the parasitics OpenROAD has for it: a bare
3131
`estimate_parasitics` estimates from the global routes when there are any,

‎flow/Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ web_$(1):
387387
$(2)=$(RESULTS_DIR)/$(1) $(OPENROAD_WEB_CMD) $(SCRIPTS_DIR)/open.tcl
388388
endef
389389

390-
# Enables "make gui_5_1_grt-failed"
391-
$(eval $(call OPEN_GUI_SHORTCUT,5_1_grt-failed,5_1_grt-failed.odb))
392-
393390
# Separate dependency checking and doing a step. This can
394391
# be useful to retest a stage without having to delete the
395392
# target, or when building a wafer thin layer on top of
@@ -425,6 +422,9 @@ ifeq ($(if $(4),$(4),.odb),.odb)
425422
$(1): $(RESULTS_DIR)/$(1).odb
426423

427424
$(eval $(call OPEN_GUI_SHORTCUT,$(1),$(1).odb))
425+
# "make gui_<step>-failed" opens the checkpoint run_step.tcl writes when
426+
# the step fails
427+
$(eval $(call OPEN_GUI_SHORTCUT,$(1)-failed,$(1)-failed.odb))
428428
endif
429429

430430
.PHONY: do-$(1)

‎flow/scripts/cts.tcl‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ set_placement_padding -global \
4040
-left $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT) \
4141
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
4242

43-
set result [catch { detailed_placement_helper -quiet } msg]
44-
if { $result != 0 } {
45-
orfs_write_db $::env(RESULTS_DIR)/4_1_error.odb
46-
error "Detailed placement failed in CTS: $msg"
47-
}
43+
detailed_placement_helper -quiet
4844

4945
log_cmd estimate_parasitics
5046

@@ -61,11 +57,7 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
6157
run_lec_test 4_rsz 4_before_rsz_lec.v 4_after_rsz_lec.v
6258
}
6359

64-
set result [catch { detailed_placement_helper -quiet } msg]
65-
if { $result != 0 } {
66-
orfs_write_db $::env(RESULTS_DIR)/4_1_error.odb
67-
error "Detailed placement failed in CTS: $msg"
68-
}
60+
detailed_placement_helper -quiet
6961

7062
log_cmd check_placement -placeable -verbose
7163

‎flow/scripts/detail_place.tcl‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ proc do_dpl { } {
2929
log_cmd estimate_parasitics
3030
}
3131

32-
set result [catch { do_dpl } errMsg]
33-
if { $result != 0 } {
34-
orfs_write_db $::env(RESULTS_DIR)/3_5_place_dp-failed.odb
35-
error $errMsg
36-
}
32+
do_dpl
3733

3834
report_metrics 3 "detailed place" true false
3935

‎flow/scripts/global_place.tcl‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ proc do_placement { global_placement_args } {
6868
log_cmd global_placement {*}$all_args
6969
}
7070

71-
set result [catch { do_placement $global_placement_args } errMsg]
71+
do_placement $global_placement_args
7272
if { $place_ios } {
7373
log_cmd reset_place_config
7474
}
75-
if { $result != 0 } {
76-
orfs_write_db $::env(RESULTS_DIR)/3_3_place_gp-failed.odb
77-
error $errMsg
78-
}
7975

8076
log_cmd estimate_parasitics
8177

‎flow/scripts/global_route.tcl‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ proc set_grt_seed { } {
2727
}
2828
}
2929

30-
proc run_global_route_and_catch_failures { args } {
31-
if { [catch { log_cmd global_route {*}$args } errMsg] } {
32-
log_cmd write_db $::env(RESULTS_DIR)/5_1_grt-failed.odb
33-
log_cmd write_sdc -no_timestamp $::env(RESULTS_DIR)/5_1_grt-failed.sdc
34-
error $errMsg
35-
}
36-
}
37-
3830
proc do_global_route { res_aware use_cugr } {
3931
set_grt_seed
4032
# CUGR runs a full 3D maze pass per iteration; use a tighter default.
@@ -46,7 +38,7 @@ proc do_global_route { res_aware use_cugr } {
4638
-congestion_report_file $::global_route_congestion_report] \
4739
$cong_iters $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr]
4840

49-
run_global_route_and_catch_failures {*}$all_args
41+
log_cmd global_route {*}$all_args
5042
}
5143
set additional_args ""
5244
append_env_var additional_args dbProcessNode -db_process_node 1
@@ -86,7 +78,7 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } {
8678
log_cmd global_route -start_incremental {*}$allow_congestion
8779
detailed_placement_helper -quiet
8880
# Route only the modified net by DPL
89-
run_global_route_and_catch_failures -end_incremental {*}$res_aware \
81+
log_cmd global_route -end_incremental {*}$res_aware \
9082
{*}$allow_congestion \
9183
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt
9284
utl::pop_metrics_stage
@@ -106,7 +98,7 @@ if { !$::env(SKIP_INCREMENTAL_REPAIR) } {
10698
detailed_placement_helper -quiet
10799
log_cmd check_placement -placeable -verbose
108100
# Route only the modified net by DPL
109-
run_global_route_and_catch_failures -end_incremental {*}$res_aware \
101+
log_cmd global_route -end_incremental {*}$res_aware \
110102
{*}$allow_congestion \
111103
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt
112104
utl::pop_metrics_stage
@@ -135,7 +127,7 @@ if { !$::env(OPT_POST_GRT_WNS) } {
135127
log_cmd global_route -start_incremental {*}$allow_congestion
136128
recover_power_helper
137129
# Route the modified nets by rsz journal restore
138-
run_global_route_and_catch_failures -end_incremental {*}$res_aware \
130+
log_cmd global_route -end_incremental {*}$res_aware \
139131
{*}$allow_congestion \
140132
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt
141133
utl::pop_metrics_stage

‎flow/scripts/pdn.tcl‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ source_step_tcl POST PDN
1515
set_placement_padding -global \
1616
-left $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT) \
1717
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
18-
set result [catch { log_cmd check_placement -fixed -verbose } errMsg]
18+
log_cmd check_placement -fixed -verbose
1919
set_placement_padding -global -left 0 -right 0
20-
if { $result != 0 } {
21-
orfs_write_db $::env(RESULTS_DIR)/2_4_floorplan_pdn-failed.odb
22-
error $errMsg
23-
}
2420

2521
# Check all supply nets
2622
set block [ord::get_db_block]

0 commit comments

Comments
 (0)