Skip to content

Commit 8cb073c

Browse files
committed
mock-array: better seperation of element pitch and spacing around array
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 301ee03 commit 8cb073c

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

flow/designs/asap7/mock-array/config.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@
3030
ce_margin_x = placement_grid_x * 0.5
3131
ce_margin_y = placement_grid_y * 0.5
3232

33+
array_spacing_x = margin_x * 3
34+
array_spacing_y = margin_y * 3
35+
36+
array_offset_x = array_spacing_x + margin_x
37+
array_offset_y = array_spacing_y + margin_y
38+
3339
# top level core and die size
34-
core_width = ((placement_grid_x * pitch_x) * (cols + 1)) + (ce_width * cols)
35-
core_height = ((placement_grid_y * pitch_y) * (rows + 1)) + (ce_height * rows)
40+
core_width = 2 * array_spacing_x + ((placement_grid_x * pitch_x) * (cols - 1)) + ce_width
41+
core_height = 2 * array_spacing_y + ((placement_grid_y * pitch_y) * (rows - 1)) + ce_height
3642

3743
die_width = core_width + (margin_x * 2)
3844
die_height = core_height + (margin_y * 2)

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
# fish out values from single source of truth: config.py
2-
set vals [regexp -all -inline {\S+} [exec sh -c {cd designs/asap7/mock-array && python3 -c "import config;print(f'{config.rows} {config.cols} {config.pitch_x} {config.pitch_y} {config.margin_x} {config.margin_y} {config.placement_grid_x} {config.placement_grid_y}')"}]]
3-
lassign $vals rows cols pitch_x pitch_y margin_x margin_y placement_grid_x placement_grid_y
2+
set vals [regexp -all -inline {\S+} [exec sh -c {cd designs/asap7/mock-array && python3 -c "import config;print(f'{config.rows} {config.cols} {config.pitch_x} {config.pitch_y} {config.array_offset_x} {config.array_offset_y} {config.placement_grid_x} {config.placement_grid_y}')"}]]
3+
lassign $vals rows cols pitch_x pitch_y array_offset_x array_offset_y placement_grid_x placement_grid_y
44

55
set block [ord::get_db_block]
66
set units [$block getDefUnits]
77

88
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]]
11-
set bbox [$inst getBBox]
1211

13-
set w [$bbox getDX]
14-
set h [$bbox getDY]
15-
16-
set x [expr int((($margin_x + (($placement_grid_x * $pitch_x) * ($col + 1.0))) * $units) + ($w * $col))]
17-
set y [expr int((($margin_y + (($placement_grid_y * $pitch_y) * ($row + 1.0))) * $units) + ($h * $row))]
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))]
1814

1915
$inst setOrient R0
2016
$inst setOrigin $x $y

0 commit comments

Comments
 (0)