-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
- Loading branch information
Showing
1 changed file
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
source util.tcl | ||
|
||
set_io_pin_constraint -region left:* -pin_names [match_pins {(R|W)[0-9]+_.*}] | ||
# By placing the pins at the left edge, then by mirroring on | ||
# X and Y, it is possible to place the pins in 4 significantly | ||
# different orientations. In lieu of being able to rotate a | ||
# macro 90 degrees, this is a good compromise. | ||
set db [::ord::get_db] | ||
set block [[$db getChip] getBlock] | ||
set die_bbox [$block getCoreArea] | ||
set dbu_per_uu [expr double([[$db getTech] getDbUnitsPerMicron])] | ||
set scale [expr 1 / $dbu_per_uu] | ||
#puts $f "width: [expr [$die_bbox xMax] * $scale]" | ||
#puts $f "height: [expr [$die_bbox yMax] * $scale]" | ||
set height [expr [$die_bbox yMax] * $scale] | ||
set width [expr [$die_bbox xMax] * $scale] | ||
|
||
set tech [$block getTech] | ||
if {$height > $width} { | ||
set layer [$tech findLayer $::env(IO_PLACER_V)] | ||
set pitch [expr [$layer getPitchX] * $scale] | ||
set edge_length $height | ||
set edge left | ||
} else { | ||
set layer [$tech findLayer $::env(IO_PLACER_H)] | ||
set pitch [expr [$layer getPitchY] * $scale] | ||
set edge_length $width | ||
set edge top | ||
} | ||
set pin_names [match_pins {(R|W)[0-9]+_.*}] | ||
|
||
set_io_pin_constraint -region $edge:0-[expr min($edge_length, $pitch * ([llength $pin_names] + 4) * 1.3)] -pin_names $pin_names |