Skip to content

Commit 22e68ef

Browse files
committed
place: configure IO pins with set_place_config, GPL_PLACE_IOS off by default
Pin settings now go through set_place_config, which place_pins and global_placement -place_ios both read: IO_PLACER_H/V plus the new SET_PLACE_CONFIG_ARGS. PLACE_PINS_ARGS stays for place_pins-only options such as -annealing. The min_distance settings in the design configs move to SET_PLACE_CONFIG_ARGS; the placed pins are unchanged. GPL_PLACE_IOS is now a 0/1 switch, default 0, so GPL_PLACE_IOS=0 no longer turns it on. flow.tcl skips the IO-less placement and place_pins under it too. Point tools/OpenROAD at 8da6ac250b. Signed-off-by: Minju Kim <mkim@precisioninno.com>
1 parent 8c8cc43 commit 22e68ef

14 files changed

Lines changed: 57 additions & 74 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ configuration file.
161161
| <a name="GLOBAL_ROUTE_USE_CUGR"></a>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|
162162
| <a name="GND_NETS_VOLTAGES"></a>GND_NETS_VOLTAGES| Used for IR Drop calculation.| |
163163
| <a name="GPL_KEEP_OVERFLOW"></a>GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| |
164-
| <a name="GPL_PLACE_IOS"></a>GPL_PLACE_IOS| Place the IO pins together with the cells in one global_placement -place_ios run, which then legalizes the pins with the pin placer. The IO-less global placement and the separate place_pins step are skipped; IO_PLACER_H, IO_PLACER_V and PLACE_PINS_ARGS still apply. Set it empty to run the sequential flow.| 1|
164+
| <a name="GPL_PLACE_IOS"></a>GPL_PLACE_IOS| Set to 1 to place the IO pins together with the cells in one global_placement -place_ios run, which legalizes the pins with the pin placer. The IO-less global placement and place_pins steps are skipped. Pin settings come from IO_PLACER_H, IO_PLACER_V and SET_PLACE_CONFIG_ARGS; PLACE_PINS_ARGS is not used.| 0|
165165
| <a name="GPL_RANDOM_SEED"></a>GPL_RANDOM_SEED| Specifies a random seed for global placement. Useful for perturbation studies.| |
166166
| <a name="GPL_ROUTABILITY_DRIVEN"></a>GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1|
167167
| <a name="GPL_TIMING_DRIVEN"></a>GPL_TIMING_DRIVEN| Specifies whether the placer should use timing driven placement.| 1|
@@ -279,6 +279,7 @@ configuration file.
279279
| <a name="SEC_CHECK"></a>SEC_CHECK| Perform a sequential equivalence check between the initial synthesis netlist and final netlist with the Kepler Formal PDR engine. If this fails, report an issue to OpenROAD.| 0|
280280
| <a name="SETUP_MOVE_SEQUENCE"></a>SETUP_MOVE_SEQUENCE| Passed as -sequence to repair_timing. This should be a string of move keywords separated by commas.| |
281281
| <a name="SETUP_SLACK_MARGIN"></a>SETUP_SLACK_MARGIN| Specifies a time margin for the slack when fixing setup violations. This option allows you to overfix or underfix(negative value, terminate retiming before 0 or positive slack). See HOLD_SLACK_MARGIN for more details.| 0|
282+
| <a name="SET_PLACE_CONFIG_ARGS"></a>SET_PLACE_CONFIG_ARGS| Arguments to set_place_config, such as -io_pin_min_distance. Read by place_pins and by global_placement -place_ios (GPL_PLACE_IOS).| |
282283
| <a name="SKIP_ANTENNA_REPAIR"></a>SKIP_ANTENNA_REPAIR| Skips antenna repair entirely.| 0|
283284
| <a name="SKIP_ANTENNA_REPAIR_POST_DRT"></a>SKIP_ANTENNA_REPAIR_POST_DRT| Skips antenna repair post-detailed routing.| 0|
284285
| <a name="SKIP_BUFFER_REMOVAL"></a>SKIP_BUFFER_REMOVAL| Passed as -skip_buffer_removal to repair_timing. Do not remove buffers as a transform to fix timing violations (default: allow buffer removal).| |
@@ -511,6 +512,7 @@ configuration file.
511512
- [PRE_RESIZE_TCL](#PRE_RESIZE_TCL)
512513
- [REPORT_ENDPOINT_SLACK](#REPORT_ENDPOINT_SLACK)
513514
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
515+
- [SET_PLACE_CONFIG_ARGS](#SET_PLACE_CONFIG_ARGS)
514516
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
515517
- [TNS_END_PERCENT](#TNS_END_PERCENT)
516518

‎flow/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ $(eval $(call do-step,3_2_place_iop,$(RESULTS_DIR)/3_1_place_gp_skip_io.odb,io_p
517517
#-------------------------------------------------------------------------------
518518
# global_placement -place_ios places the cells and the IO pins in one solve, so
519519
# it starts from the floorplan and the two steps above are not run at all.
520-
ifneq ($(GPL_PLACE_IOS),)
520+
ifeq ($(GPL_PLACE_IOS),1)
521521
GLOBAL_PLACE_INPUT_ODB = $(RESULTS_DIR)/2_floorplan.odb
522522
else
523523
GLOBAL_PLACE_INPUT_ODB = $(RESULTS_DIR)/3_2_place_iop.odb
@@ -545,7 +545,7 @@ $(RESULTS_DIR)/3_place.sdc: $(RESULTS_DIR)/3_5_place_dp.odb
545545

546546
.PHONY: do-place
547547
do-place:
548-
ifneq ($(GPL_PLACE_IOS),)
548+
ifeq ($(GPL_PLACE_IOS),1)
549549
$(UNSET_AND_MAKE) do-3_3_place_gp do-3_4_place_resized do-3_5_place_dp do-3_place
550550
else
551551
$(UNSET_AND_MAKE) do-3_1_place_gp_skip_io do-3_2_place_iop do-3_3_place_gp do-3_4_place_resized do-3_5_place_dp do-3_place

‎flow/designs/asap7/riscv32i-mock-sram/fakeram7_256x32/config.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export PLACE_DENSITY = 0.80
1313
export MAX_ROUTING_LAYER = M4
1414
export MIN_CLK_ROUTING_LAYER = M2
1515

16-
export PLACE_PINS_ARGS = -min_distance 6 -min_distance_in_tracks
16+
export SET_PLACE_CONFIG_ARGS = -io_pin_min_distance 6 -io_pin_min_distance_in_tracks
1717
export IO_CONSTRAINTS = $(DESIGN_HOME)/asap7/riscv32i-mock-sram/fakeram7_256x32/io.tcl
1818

1919
export PDN_TCL = $(PLATFORM_DIR)/openRoad/pdn/BLOCK_grid_strategy.tcl

‎flow/designs/gf180/riscv32i/config.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export CORE_UTILIZATION = 55
99
export PLACE_DENSITY_LB_ADDON = 0.2
1010
export TNS_END_PERCENT = 100
1111
export SKIP_GATE_CLONING = 1
12-
export PLACE_PINS_ARGS = -min_distance 5
12+
export SET_PLACE_CONFIG_ARGS = -io_pin_min_distance 5
1313
export IO_CONSTRAINTS = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/io.tcl
1414

1515
export SWAP_ARITH_OPERATORS = 1

‎flow/designs/sky130hd/aes/config.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export PLATFORM = sky130hd
55
export VERILOG_FILES = $(sort $(wildcard $(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/*.v))
66
export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc
77

8-
export PLACE_PINS_ARGS = -min_distance 4 -min_distance_in_tracks
8+
export SET_PLACE_CONFIG_ARGS = -io_pin_min_distance 4 -io_pin_min_distance_in_tracks
99

1010
export CORE_UTILIZATION = 35
1111
export CORE_ASPECT_RATIO = 1

‎flow/designs/sky130hs/riscv32i/config.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.
88
export CORE_UTILIZATION = 60
99
export PLACE_DENSITY_LB_ADDON = 0.1
1010
# many east pins cause global routing congestion
11-
export PLACE_PINS_ARGS=-min_distance 6 -min_distance_in_tracks
11+
export SET_PLACE_CONFIG_ARGS=-io_pin_min_distance 6 -io_pin_min_distance_in_tracks
1212
export TNS_END_PERCENT = 100
1313

1414
export FASTROUTE_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/fastroute.tcl

‎flow/scripts/flow.tcl‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ flow_write_db 2_floorplan.odb
5959
flow_write_sdc 2_floorplan.sdc
6060

6161
# Place
62-
flow_source global_place_skip_io.tcl
63-
flow_write_db 3_1_place_gp_skip_io.odb
64-
flow_source io_placement.tcl
65-
flow_write_db 3_2_place_iop.odb
62+
if { ![env_var_equals GPL_PLACE_IOS 1] } {
63+
flow_source global_place_skip_io.tcl
64+
flow_write_db 3_1_place_gp_skip_io.odb
65+
flow_source io_placement.tcl
66+
flow_write_db 3_2_place_iop.odb
67+
}
6668
flow_source global_place.tcl
6769
flow_write_db 3_3_place_gp.odb
6870
flow_source resize.tcl

‎flow/scripts/global_place.tcl‎

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
utl::set_metrics_stage "globalplace__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
33
erase_non_stage_variables place
4-
# -place_ios does the cells and the IO pins in one solve, so it starts from the
5-
# floorplan: the IO-less pass and the standalone place_pins are not run at all.
6-
# Pins from a floorplan DEF or a footprint stay where they are, as in
7-
# io_placement.tcl.
4+
# -place_ios starts from the floorplan; pins from a floorplan DEF or a
5+
# footprint stay where they are, as in io_placement.tcl.
86
set place_ios [expr {
9-
[env_var_exists_and_non_empty GPL_PLACE_IOS]
7+
[env_var_equals GPL_PLACE_IOS 1]
108
&& ![env_var_exists_and_non_empty FLOORPLAN_DEF]
119
&& ![env_var_exists_and_non_empty FOOTPRINT]
1210
&& ![env_var_exists_and_non_empty FOOTPRINT_TCL]
1311
}]
14-
if { [env_var_exists_and_non_empty GPL_PLACE_IOS] } {
12+
if { [env_var_equals GPL_PLACE_IOS 1] } {
1513
load_design 2_floorplan.odb 2_floorplan.sdc
1614
} else {
1715
load_design 3_2_place_iop.odb 2_floorplan.sdc
@@ -65,49 +63,13 @@ lappend global_placement_args -force_center_initial_place
6563
lappend global_placement_args -min_phi_coef $::env(MIN_PLACE_STEP_COEF)
6664
lappend global_placement_args -max_phi_coef $::env(MAX_PLACE_STEP_COEF)
6765

68-
# Concurrent IO placement: fold pin placement into global placement, on the
69-
# same routing layers the sequential place_pins flow uses (IO_PLACER_H/V).
7066
if { $place_ios } {
71-
lappend global_placement_args -place_ios
72-
# -place_ios reads the pin-placement settings from here and legalizes the
73-
# pins with the pin placer at the end of the solve, so PLACE_PINS_ARGS must
74-
# be applied before it: the slot spacing sets how many pins an edge holds.
75-
set ppl_args {}
76-
set place_pins_args [env_var_or_empty PLACE_PINS_ARGS]
77-
for { set i 0 } { $i < [llength $place_pins_args] } { incr i } {
78-
set arg [lindex $place_pins_args $i]
79-
switch -- $arg {
80-
-exclude {
81-
exclude_io_pin_region -region [lindex $place_pins_args [incr i]]
82-
}
83-
-group_pins {
84-
set pins [ppl::parse_pin_names "place_pins -group_pins" \
85-
[lindex $place_pins_args [incr i]]]
86-
if { [llength $pins] != 0 } {
87-
odb::add_pin_group $pins 0
88-
}
89-
}
90-
-corner_avoidance -
91-
-min_distance {
92-
lappend ppl_args -io_pin_[string range $arg 1 end] \
93-
[lindex $place_pins_args [incr i]]
94-
}
95-
-min_distance_in_tracks {
96-
lappend ppl_args -io_pin_min_distance_in_tracks
97-
}
98-
-annealing {
99-
utl::warn FLW 25 "PLACE_PINS_ARGS: -annealing is ignored with\
100-
GPL_PLACE_IOS, which legalizes the pins by displacement."
101-
}
102-
default {
103-
error "PLACE_PINS_ARGS: $arg is not supported with GPL_PLACE_IOS"
104-
}
105-
}
67+
if { [env_var_exists_and_non_empty PLACE_PINS_ARGS] } {
68+
utl::warn FLW 25 "PLACE_PINS_ARGS is not used with GPL_PLACE_IOS;\
69+
put set_place_config options in SET_PLACE_CONFIG_ARGS."
10670
}
107-
set_place_config \
108-
-io_pin_hor_layers $::env(IO_PLACER_H) \
109-
-io_pin_ver_layers $::env(IO_PLACER_V) \
110-
{*}$ppl_args
71+
set_io_place_config
72+
lappend global_placement_args -place_ios
11173
}
11274

11375
proc do_placement { global_placement_args } {
@@ -127,8 +89,7 @@ if { $result != 0 } {
12789
error $errMsg
12890
}
12991

130-
# -place_ios already legalized its pins with the pin placer.
131-
if { [env_var_exists_and_non_empty GPL_PLACE_IOS] } {
92+
if { $place_ios } {
13293
write_pin_placement $::env(RESULTS_DIR)/3_3_place_gp_pins.tcl
13394
}
13495

‎flow/scripts/io_placement.tcl‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ if {
88
} {
99
load_design 3_1_place_gp_skip_io.odb 2_floorplan.sdc
1010
source_step_tcl PRE IO_PLACEMENT
11-
log_cmd place_pins \
12-
-hor_layers $::env(IO_PLACER_H) \
13-
-ver_layers $::env(IO_PLACER_V) \
14-
{*}[env_var_or_empty PLACE_PINS_ARGS]
11+
set_io_place_config
12+
log_cmd place_pins {*}[env_var_or_empty PLACE_PINS_ARGS]
1513
report_design_area
1614

1715
orfs_write_db $::env(RESULTS_DIR)/3_2_place_iop.odb

‎flow/scripts/util.tcl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ proc env_var_or_empty { env_var } {
152152
return ""
153153
}
154154

155+
# place_pins and global_placement -place_ios both read these settings.
156+
proc set_io_place_config { } {
157+
set_place_config \
158+
-io_pin_hor_layers $::env(IO_PLACER_H) \
159+
-io_pin_ver_layers $::env(IO_PLACER_V) \
160+
{*}[env_var_or_empty SET_PLACE_CONFIG_ARGS]
161+
}
162+
155163
proc find_macros { } {
156164
set macros ""
157165

0 commit comments

Comments
 (0)