Skip to content

Commit 82bf459

Browse files
authored
Merge pull request #934 from Pinata-Consulting/fix-io-alignment-2
Fix io alignment for mock-array-big
2 parents d0de724 + 31b508c commit 82bf459

File tree

11 files changed

+216
-252
lines changed

11 files changed

+216
-252
lines changed

flow/designs/asap7/mock-array-big/Element/config.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export SDC_FILE = designs/asap7/mock-array-big/constraints.sdc
66

77
export PLATFORM = asap7
88

9-
export PLACE_DENSITY = 0.40
9+
export PLACE_DENSITY = 0.50
1010
export CORE_AREA = $(shell python3 designs/asap7/mock-array-big/ce_core_area.py)
1111
export DIE_AREA = $(shell python3 designs/asap7/mock-array-big/ce_die_area.py)
1212

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import config
22

3-
print(f'1 1 {config.element_width - 1} {config.element_height - 1}')
3+
margin = config.routing_pitch * 10
4+
5+
print(f'{margin} {margin} {config.pitch - margin} {config.pitch - margin}')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import config
22

3-
print(f'0 0 {config.element_width} {config.element_height}')
3+
print(f'0 0 {config.pitch} {config.pitch}')

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

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@
33

44
rows = int(os.environ.get("MOCK_ARRAY_HEIGHT", "8"))
55
cols = int(os.environ.get("MOCK_ARRAY_WIDTH", "8"))
6-
pitch_scale = int(os.environ.get("MOCK_ARRAY_PITCH_SCALE", "10"))
6+
pitch_scale = int(os.environ.get("MOCK_ARRAY_PITCH_SCALE", "2"))
77

8+
# Routing pitches for relevant metal layers.
9+
# For x, this is M5; for y, this is M4.
10+
# Pitches are specified in OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7_tech_1x_201209.lef.
11+
# For asap7, x and y pitch is the same.
12+
routing_pitch = 0.048
813

9-
# from platforms/asap7/openRoad/make_tracks.tcl, smallest common x_pitch and y_pitch
10-
# denominator
11-
lowest_common_grid_denominator = 0.576
14+
# 0.048 * 125 = 6, which is a nice round number to work with
15+
pitch = routing_pitch * 125 * pitch_scale
16+
margin = routing_pitch * 125 * 2
17+
core_offset_x = margin
18+
core_offset_y = margin
19+
die_offset_x = core_offset_x + margin
20+
die_offset_y = core_offset_y + margin
1221

13-
power_x_pitch = 4 * lowest_common_grid_denominator
14-
power_y_pitch = 4 * lowest_common_grid_denominator
15-
y_pitch = (power_y_pitch * pitch_scale)
16-
x_pitch = (power_x_pitch * pitch_scale)
17-
offset_x = power_x_pitch * 4
18-
offset_y = power_y_pitch * 4
19-
margin = 4 * lowest_common_grid_denominator
22+
pitch_and_margin = pitch + margin
2023

21-
element_width = x_pitch - power_x_pitch * 4
22-
element_height = y_pitch - power_y_pitch * 4
23-
24-
height = rows * y_pitch + offset_y
25-
width = cols * x_pitch + offset_x
24+
core_width = cols * pitch_and_margin + core_offset_x
25+
core_height = rows * pitch_and_margin + core_offset_y
26+
die_width = core_width + margin * 2
27+
die_height = core_height + margin * 2
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import config
22

3-
x = config.margin
4-
y = config.margin
3+
x = config.core_offset_x
4+
y = config.core_offset_y
55

6-
print(f'{y} {x} {x+config.width} {y+config.height}')
6+
print(f'{x} {y} {x+config.core_width} {y+config.core_height}')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import config
22

3-
print(f'0 0 {config.width + 2*config.margin} {config.height + 2*config.margin}')
3+
print(f'0 0 {config.die_width} {config.die_height}')
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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-big && python3 -c "import config;print(f'{config.rows} {config.cols} {config.x_pitch} {config.offset_x} {config.y_pitch} {config.offset_y}')"}]]
3-
lassign $vals rows cols x_pitch offset_x y_pitch offset_y
2+
set vals [regexp -all -inline {\S+} [exec sh -c {cd designs/asap7/mock-array-big && python3 -c "import config;print(f'{config.rows} {config.cols} {config.pitch_and_margin} {config.die_offset_x} {config.die_offset_y}')"}]]
3+
lassign $vals rows cols pitch_and_margin die_offset_x die_offset_y
44

55
set block [ord::get_db_block]
66
set units [$block getDefUnits]
@@ -9,10 +9,10 @@ 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
$inst setOrient R0
12-
set x [expr round([expr {$offset_x + $col * $x_pitch}] * $units)]
13-
set y [expr round([expr {$offset_y + $row * $y_pitch}] * $units)]
12+
set x [expr round([expr {$die_offset_x + $col * $pitch_and_margin}] * $units)]
13+
set y [expr round([expr {$die_offset_y + $row * $pitch_and_margin}] * $units)]
1414

15-
$inst setOrigin $x $y
15+
$inst setOrigin $x $y
1616
$inst setPlacementStatus FIRM
1717
}
1818
}

0 commit comments

Comments
 (0)