Skip to content

Commit 75f61e5

Browse files
authored
Merge pull request #1174 from Pinata-Consulting/mock-array-tighter-floorplan
Mock array tighter floorplan
2 parents 2eb182c + f6f100a commit 75f61e5

File tree

5 files changed

+179
-170
lines changed

5 files changed

+179
-170
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
# MOCK_ARRAY_TABLE (rows, cols, width, height, pitch_x, pitch_y)
1111
# rows, cols - number of Element in rows, cols
1212
# width, height - width and height of each Element
13+
#
14+
# When the pitch is equal to the width/height, we have routing by abutment
15+
# https://en.wikipedia.org/wiki/Pitch#Linear_measurement
16+
#
1317
# pitch_x, pitch_y - placement pitch for each Element, in x and y direction
1418
# specification are in unit of placement grid
1519
rows, cols, ce_x, ce_y, pitch_x, pitch_y = map(int, os.environ.get("MOCK_ARRAY_TABLE").split())
@@ -26,9 +30,16 @@
2630
ce_margin_x = placement_grid_x * 0.5
2731
ce_margin_y = placement_grid_y * 0.5
2832

33+
# PDN problems if it is smaller. Not investigated.
34+
array_spacing_x = margin_x * 2
35+
array_spacing_y = margin_y * 2
36+
37+
array_offset_x = array_spacing_x + margin_x
38+
array_offset_y = array_spacing_y + margin_y
39+
2940
# top level core and die size
30-
core_width = ((placement_grid_x * pitch_x) * (cols + 1)) + (ce_width * cols)
31-
core_height = ((placement_grid_y * pitch_y) * (rows + 1)) + (ce_height * rows)
41+
core_width = 2 * array_spacing_x + ((placement_grid_x * pitch_x) * (cols - 1)) + ce_width
42+
core_height = 2 * array_spacing_y + ((placement_grid_y * pitch_y) * (rows - 1)) + ce_height
3243

3344
die_width = core_width + (margin_x * 2)
3445
die_height = core_height + (margin_y * 2)

flow/designs/asap7/mock-array/defaults.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# current unit is configured as 2.16 which is on the routing grid for M5
44

55
# table of Elements - (rows cols width height pitch_x pitch_y)
6-
export MOCK_ARRAY_TABLE ?= 8 8 4 4 6 6
6+
export MOCK_ARRAY_TABLE ?= 8 8 4 4 5 5
77

88
# Element'd data width
99
export MOCK_ARRAY_DATAWIDTH ?= 8
1010

11+
# Must be zero for routing by abutment
12+
export MACRO_BLOCKAGE_HALO ?= 0.5

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)