Skip to content

Commit

Permalink
bugfix: OpenROAD.Floorplan core area calculation
Browse files Browse the repository at this point in the history
* `OpenROAD.Floorplan`

  * Fixed an issue in `FP_SIZING`: `absolute` mode where if the die area's
    x0 > x1 or y0 > y1, the computed core area would no longer fit in the die
    area. Not that we recommend you ever do that, but technically OpenROAD
    allows it.
  • Loading branch information
donn committed Jan 27, 2025
1 parent f34d37d commit e0d2b44
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
## Documentation
-->

# 2.3.3

## Steps

* `OpenROAD.Floorplan`

* Fixed an issue in `FP_SIZING`: `absolute` mode where if the die area's
x0 > x1 or y0 > y1, the computed core area would no longer fit in the die
area. Not that we recommend you ever do that, but technically OpenROAD
allows it.

# 2.3.2

## Steps
Expand Down
21 changes: 12 additions & 9 deletions openlane/scripts/openroad/floorplan.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,20 @@ if {$::env(FP_SIZING) == "absolute"} {
exit -1
}
if { ! [info exists ::env(CORE_AREA)] } {
set die_ll_x [lindex $::env(DIE_AREA) 0]
set die_ll_y [lindex $::env(DIE_AREA) 1]
set die_ur_x [lindex $::env(DIE_AREA) 2]
set die_ur_y [lindex $::env(DIE_AREA) 3]
set die_x0 [lindex $::env(DIE_AREA) 0]
set die_y0 [lindex $::env(DIE_AREA) 1]
set die_x1 [lindex $::env(DIE_AREA) 2]
set die_y1 [lindex $::env(DIE_AREA) 3]

set core_ll_x [expr {$die_ll_x + $left_margin}]
set core_ll_y [expr {$die_ll_y + $bottom_margin}]
set core_ur_x [expr {$die_ur_x - $right_margin}]
set core_ur_y [expr {$die_ur_y - $top_margin}]
set x_dir [expr $die_x1 < $die_x0]
set y_dir [expr $die_y1 < $die_y0]

set ::env(CORE_AREA) [list $core_ll_x $core_ll_y $core_ur_x $core_ur_y]
set core_x0 [expr {$die_x0 + (-1 ** $x_dir) * $left_margin}]
set core_y0 [expr {$die_y0 + (-1 ** $y_dir) * $bottom_margin}]
set core_x1 [expr {$die_x1 - (-1 ** $x_dir) * $right_margin}]
set core_y1 [expr {$die_y1 - (-1 ** $y_dir) * $top_margin}]

set ::env(CORE_AREA) [list $core_x0 $core_y0 $core_x1 $core_y1]
} else {
if { [llength $::env(CORE_AREA)] != 4 } {
puts stderr "Invalid core area string '$::env(CORE_AREA)'."
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlane"
version = "2.3.2"
version = "2.3.3"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <[email protected]>"]
readme = "Readme.md"
Expand Down

0 comments on commit e0d2b44

Please sign in to comment.