Skip to content

Commit 9dc2890

Browse files
committed
mock-array: fix unaligned mpins
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 252e3cc commit 9dc2890

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

flow/designs/asap7/mock-array/macro-placement.tcl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ for {set row 0} {$row < $rows} {incr row} {
99
for {set col 0} {$col < $cols} {incr col} {
1010
set inst [$block findInst [format "ces_%d_%d" $row $col]]
1111

12-
set x [expr int((($array_offset_x + (($placement_grid_x * $pitch_x) * $col)) * $units))]
13-
set y [expr int((($array_offset_y + (($placement_grid_y * $pitch_y) * $row)) * $units))]
12+
set x [expr round((($array_offset_x + (($placement_grid_x * $pitch_x) * $col)) * $units))]
13+
set y [expr round((($array_offset_y + (($placement_grid_y * $pitch_y) * $row)) * $units))]
14+
15+
# belt and suspenders check... ASAP7 macro placement must be aligned to 0.048um
16+
if {$x % 48 != 0} {
17+
error "x=$x is not divisible by 48"
18+
}
19+
if {$y % 48 != 0} {
20+
error "y=$y is not divisible by 48"
21+
}
1422

1523
$inst setOrient R0
1624
$inst setOrigin $x $y

0 commit comments

Comments
 (0)