Skip to content

Commit bacd074

Browse files
flow: add systematic PRE/POST step Tcl hooks
Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
1 parent 19e4246 commit bacd074

19 files changed

+187
-2
lines changed

flow/scripts/cts.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ source_step_tcl PRE CTS
44
source $::env(SCRIPTS_DIR)/lec_check.tcl
55
erase_non_stage_variables cts
66
load_design 3_place.odb 3_place.sdc
7+
source_step_tcl PRE CTS
78

89
# Clone clock tree inverters next to register loads
910
# so cts does not try to buffer the inverted clocks.

flow/scripts/density_fill.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
22
source_step_tcl PRE DENSITY_FILL
33
erase_non_stage_variables final
44
load_design 5_route.odb 5_route.sdc
5+
source_step_tcl PRE DENSITY_FILL
56

67
if { $::env(USE_FILL) } {
78
set_propagated_clock [all_clocks]

flow/scripts/detail_place.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
33
source_step_tcl PRE DETAIL_PLACE
44
erase_non_stage_variables place
55
load_design 3_4_place_resized.odb 2_floorplan.sdc
6+
source_step_tcl PRE DETAIL_PLACE
67

78
source $::env(PLATFORM_DIR)/setRC.tcl
89

flow/scripts/detail_route.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ utl::set_metrics_stage "detailedroute__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
33
source_step_tcl PRE DETAIL_ROUTE
44
load_design 5_1_grt.odb 5_1_grt.sdc
5+
source_step_tcl PRE DETAIL_ROUTE
56
if { ![grt::have_routes] } {
67
error "Global routing failed, run `make gui_grt` and load $::global_route_congestion_report \
78
in DRC viewer to view congestion"

flow/scripts/fillcell.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ source_step_tcl PRE FILLCELL
33
erase_non_stage_variables route
44
if { [env_var_exists_and_non_empty FILL_CELLS] } {
55
load_design 5_2_route.odb 5_1_grt.sdc
6+
source_step_tcl PRE FILLCELL
67

78
set_propagated_clock [all_clocks]
89

910
log_cmd filler_placement $::env(FILL_CELLS)
1011
check_placement
1112

13+
source_step_tcl POST FILLCELL
1214
orfs_write_db $::env(RESULTS_DIR)/5_3_fillcell.odb
1315
} else {
1416
log_cmd exec cp $::env(RESULTS_DIR)/5_2_route.odb $::env(RESULTS_DIR)/5_3_fillcell.odb

flow/scripts/final_report.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
33
source_step_tcl PRE FINAL_REPORT
44
erase_non_stage_variables final
55
load_design 6_1_fill.odb 6_1_fill.sdc
6+
source_step_tcl PRE FINAL_REPORT
67

78
set_propagated_clock [all_clocks]
89

@@ -64,6 +65,8 @@ report_cell_usage
6465

6566
report_metrics 6 "finish"
6667

68+
source_step_tcl POST FINAL_REPORT
69+
6770
# Save a final image if openroad is compiled with the gui
6871
# and a display is available (skip on headless machines)
6972
if { [ord::openroad_gui_compiled] && [env_var_exists_and_non_empty DISPLAY] } {

flow/scripts/floorplan.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
33
source_step_tcl PRE FLOORPLAN
44
erase_non_stage_variables floorplan
55
load_design 1_synth.odb 1_synth.sdc
6+
source_step_tcl PRE FLOORPLAN
67

78
proc report_unused_masters { } {
89
set db [ord::get_db]

flow/scripts/global_place.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
33
source_step_tcl PRE GLOBAL_PLACE
44
erase_non_stage_variables place
55
load_design 3_2_place_iop.odb 2_floorplan.sdc
6+
source_step_tcl PRE GLOBAL_PLACE
67

78
set_dont_use $::env(DONT_USE_CELLS)
89

flow/scripts/global_place_skip_io.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
22
source_step_tcl PRE GLOBAL_PLACE_SKIP_IO
33
erase_non_stage_variables place
44
load_design 2_floorplan.odb 2_floorplan.sdc
5+
source_step_tcl PRE GLOBAL_PLACE_SKIP_IO
56

67
if { [env_var_exists_and_non_empty FLOORPLAN_DEF] } {
78
puts "FLOORPLAN_DEF is set. Skipping global placement without IOs"

flow/scripts/global_route.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ proc global_route_helper { } {
112112
# Use make target update_sdc_clock to install the updated sdc.
113113
source [file join $::env(SCRIPTS_DIR) "write_ref_sdc.tcl"]
114114

115+
source_step_tcl POST GLOBAL_ROUTE
116+
115117
write_guides $::env(RESULTS_DIR)/route.guide
116118
source_step_tcl POST GLOBAL_ROUTE
117119
orfs_write_db $::env(RESULTS_DIR)/5_1_grt.odb

0 commit comments

Comments
 (0)