Skip to content

Commit

Permalink
Port features from OL1 (#354)
Browse files Browse the repository at this point in the history
* `OpenROAD.*`
  * Added regex matching check for patterns inside `PDN_MACRO_CONNECTIONS`
    * Updated `PDN_MACRO_CONNECTIONS` documentation to highlight the fact the instance name is actually a regex
    * Fix a bug in `PDN_MACRO_CONNECTION` related to double escaping of special characters. 
* `OpenROAD.GlobalPlacement`
  * Added new variable `PL_WIRE_LENGTH_COEF` passed as `-init_wirelength_coef` to OpenROAD
  • Loading branch information
kareefardi authored Jan 23, 2024
1 parent 20b06be commit a569b20
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
13 changes: 13 additions & 0 deletions openlane/scripts/openroad/common/set_global_connections.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ proc set_global_connections {} {
if { $::env(PDN_CONNECT_MACROS_TO_GRID) == 1 &&
[info exists ::env(PDN_MACRO_CONNECTIONS)]} {
foreach pdn_hook $::env(PDN_MACRO_CONNECTIONS) {
set pdn_hook [regexp -all -inline {\S+} $pdn_hook]
set instance_name [lindex $pdn_hook 0]
set power_net [lindex $pdn_hook 1]
set ground_net [lindex $pdn_hook 2]
Expand All @@ -47,6 +48,18 @@ proc set_global_connections {} {
exit -1
}

set matched 0
foreach cell [[ord::get_db_block] getInsts] {
if { [regexp "\^$instance_name" [$cell getName]] } {
set matched 1
puts "$instance_name matched with [$cell getName]"
}
}
if { $matched != 1 } {
puts "No regex match found for $instance_name defined in PDN_MACRO_CONNECTIONS"
exit 1
}

add_global_connection \
-net $power_net \
-inst_pattern $instance_name \
Expand Down
3 changes: 3 additions & 0 deletions openlane/scripts/openroad/gpl.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ set cell_pad_side [expr $::env(GPL_CELL_PADDING) / 2]

lappend arg_list -pad_right $cell_pad_side
lappend arg_list -pad_left $cell_pad_side
lappend arg_list -init_wirelength_coef $::env(PL_WIRELENGTH_COEF)

puts "{*}$arg_list"
global_placement {*}$arg_list


source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
estimate_parasitics -placement

Expand Down
10 changes: 9 additions & 1 deletion openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class OpenROADStep(TclStep):
Variable(
"PDN_MACRO_CONNECTIONS",
Optional[List[str]],
"Specifies explicit power connections of internal macros to the top level power grid, in the format: macro instance names, power domain vdd and ground net names, and macro vdd and ground pin names `<instance_name> <vdd_net> <gnd_net> <vdd_pin> <gnd_pin>`.",
"Specifies explicit power connections of internal macros to the top level power grid, in the format: regex matching macro instance names, power domain vdd and ground net names, and macro vdd and ground pin names `<instance_name_rx> <vdd_net> <gnd_net> <vdd_pin> <gnd_pin>`.",
deprecated_names=[("FP_PDN_MACRO_HOOKS", pdn_macro_migrator)],
),
Variable(
Expand Down Expand Up @@ -925,6 +925,14 @@ class GlobalPlacement(OpenROADStep):
"Specifies whether the placer should use routability driven placement.",
default=True,
),
Variable(
"PL_WIRE_LENGTH_COEF",
Decimal,
"Global placement initial wirelength coefficient."
+ " Decreasing the variable will modify the initial placement of the standard cells to reduce the wirelengths",
default=0.25,
deprecated_names=["PL_WIRELENGTH_COEF"],
),
Variable(
"FP_CORE_UTIL",
Decimal,
Expand Down

0 comments on commit a569b20

Please sign in to comment.