diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md
index 4faa3cf80c..ad4c27dd67 100644
--- a/docs/user/FlowVariables.md
+++ b/docs/user/FlowVariables.md
@@ -161,6 +161,7 @@ configuration file.
| GLOBAL_ROUTE_USE_CUGR| Passed as -use_cugr to global_route. Uses CUGR as the global routing solver instead of the default FastRoute solver. NOTE: CUGR is not ready for production.| 0|
| GND_NETS_VOLTAGES| Used for IR Drop calculation.| |
| GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| |
+| GPL_PLACE_IOS| Place IO pins together with the cells in global placement (-place_ios).| 0|
| GPL_RANDOM_SEED| Specifies a random seed for global placement. Useful for perturbation studies.| |
| GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1|
| GPL_TIMING_DRIVEN| Specifies whether the placer should use timing driven placement.| 1|
@@ -484,6 +485,7 @@ configuration file.
- [FLOORPLAN_DEF](#FLOORPLAN_DEF)
- [GLOBAL_PLACEMENT_ARGS](#GLOBAL_PLACEMENT_ARGS)
- [GPL_KEEP_OVERFLOW](#GPL_KEEP_OVERFLOW)
+- [GPL_PLACE_IOS](#GPL_PLACE_IOS)
- [GPL_RANDOM_SEED](#GPL_RANDOM_SEED)
- [GPL_ROUTABILITY_DRIVEN](#GPL_ROUTABILITY_DRIVEN)
- [GPL_TIMING_DRIVEN](#GPL_TIMING_DRIVEN)
diff --git a/flow/scripts/global_place.tcl b/flow/scripts/global_place.tcl
index 5822ef47c2..6a2d583d26 100644
--- a/flow/scripts/global_place.tcl
+++ b/flow/scripts/global_place.tcl
@@ -51,6 +51,12 @@ lappend global_placement_args -force_center_initial_place
lappend global_placement_args -min_phi_coef $::env(MIN_PLACE_STEP_COEF)
lappend global_placement_args -max_phi_coef $::env(MAX_PLACE_STEP_COEF)
+set place_ios [expr { $::env(GPL_PLACE_IOS) && ![pins_fixed_in_floorplan] }]
+if { $place_ios } {
+ log_cmd set_place_config {*}[place_pins_args_to_place_config]
+ lappend global_placement_args -place_ios
+}
+
proc do_placement { global_placement_args } {
set all_args [concat [list -density [place_density_with_lb_addon] \
-pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \
@@ -63,6 +69,9 @@ proc do_placement { global_placement_args } {
}
set result [catch { do_placement $global_placement_args } errMsg]
+if { $place_ios } {
+ log_cmd reset_place_config
+}
if { $result != 0 } {
orfs_write_db $::env(RESULTS_DIR)/3_3_place_gp-failed.odb
error $errMsg
diff --git a/flow/scripts/global_place_skip_io.tcl b/flow/scripts/global_place_skip_io.tcl
index 38c58917d4..96195d486e 100644
--- a/flow/scripts/global_place_skip_io.tcl
+++ b/flow/scripts/global_place_skip_io.tcl
@@ -1,5 +1,10 @@
source $::env(SCRIPTS_DIR)/load.tcl
erase_non_stage_variables place
+if { $::env(GPL_PLACE_IOS) } {
+ orfs_copy_db $::env(RESULTS_DIR)/2_floorplan.odb \
+ $::env(RESULTS_DIR)/3_1_place_gp_skip_io.odb
+ return
+}
load_design 2_floorplan.odb 2_floorplan.sdc
source_step_tcl PRE GLOBAL_PLACE_SKIP_IO
diff --git a/flow/scripts/io_placement.tcl b/flow/scripts/io_placement.tcl
index 5ad95bad51..ad4d7809e2 100644
--- a/flow/scripts/io_placement.tcl
+++ b/flow/scripts/io_placement.tcl
@@ -1,11 +1,7 @@
source $::env(SCRIPTS_DIR)/load.tcl
erase_non_stage_variables place
-if {
- ![env_var_exists_and_non_empty FLOORPLAN_DEF] &&
- ![env_var_exists_and_non_empty FOOTPRINT] &&
- ![env_var_exists_and_non_empty FOOTPRINT_TCL]
-} {
+if { !$::env(GPL_PLACE_IOS) && ![pins_fixed_in_floorplan] } {
load_design 3_1_place_gp_skip_io.odb 2_floorplan.sdc
source_step_tcl PRE IO_PLACEMENT
log_cmd place_pins \
diff --git a/flow/scripts/util.tcl b/flow/scripts/util.tcl
index 49ab5fd80f..231a5b2c0e 100644
--- a/flow/scripts/util.tcl
+++ b/flow/scripts/util.tcl
@@ -152,6 +152,43 @@ proc env_var_or_empty { env_var } {
return ""
}
+proc pins_fixed_in_floorplan { } {
+ return [expr {
+ [env_var_exists_and_non_empty FLOORPLAN_DEF] ||
+ [env_var_exists_and_non_empty FOOTPRINT] ||
+ [env_var_exists_and_non_empty FOOTPRINT_TCL]
+ }]
+}
+
+# set_place_config arguments for global_placement -place_ios, from the
+# place_pins settings.
+proc place_pins_args_to_place_config { } {
+ set config_args [list \
+ -io_pin_hor_layers $::env(IO_PLACER_H) \
+ -io_pin_ver_layers $::env(IO_PLACER_V)]
+ set pins_args [env_var_or_empty PLACE_PINS_ARGS]
+ for { set i 0 } { $i < [llength $pins_args] } { incr i } {
+ set arg [lindex $pins_args $i]
+ switch -- $arg {
+ -corner_avoidance -
+ -min_distance {
+ lappend config_args -io_pin_[string range $arg 1 end] \
+ [lindex $pins_args [incr i]]
+ }
+ -min_distance_in_tracks {
+ lappend config_args -io_pin_min_distance_in_tracks
+ }
+ default {
+ utl::warn FLW 25 "PLACE_PINS_ARGS $arg is not used with GPL_PLACE_IOS."
+ if { ![string match -* [lindex $pins_args [expr { $i + 1 }]]] } {
+ incr i
+ }
+ }
+ }
+ }
+ return $config_args
+}
+
proc find_macros { } {
set macros ""
diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json
index c79940855c..fd9391ddf3 100644
--- a/flow/scripts/variables.json
+++ b/flow/scripts/variables.json
@@ -425,6 +425,13 @@
"place"
]
},
+ "GPL_PLACE_IOS": {
+ "default": 0,
+ "description": "Place IO pins together with the cells in global placement (-place_ios).\n",
+ "stages": [
+ "place"
+ ]
+ },
"GPL_RANDOM_SEED": {
"description": "Specifies a random seed for global placement. Useful for perturbation studies.\n",
"stages": [
diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml
index ac913b71ad..f5ad07cabb 100644
--- a/flow/scripts/variables.yaml
+++ b/flow/scripts/variables.yaml
@@ -719,6 +719,12 @@ GPL_ROUTABILITY_DRIVEN:
stages:
- place
default: 1
+GPL_PLACE_IOS:
+ description: |
+ Place IO pins together with the cells in global placement (-place_ios).
+ stages:
+ - place
+ default: 0
GPL_KEEP_OVERFLOW:
description: >
Passed as -keep_resize_below_overflow to global_placement.
diff --git a/tools/OpenROAD b/tools/OpenROAD
index 91e5f5ff2f..8da6ac250b 160000
--- a/tools/OpenROAD
+++ b/tools/OpenROAD
@@ -1 +1 @@
-Subproject commit 91e5f5ff2f198fd130e8915c8ad4408b56987fa4
+Subproject commit 8da6ac250b0349c346d1abed7c2c43107f4ff6f7