|
1 | | -# see flow/platforms/asap7/openRoad/pdn/grid_strategy-M2-M5-M7.tcl |
2 | 1 | import os |
3 | 2 |
|
| 3 | +# number of Elements in row and column, user can set via environment variable |
4 | 4 | rows = int(os.environ.get("MOCK_ARRAY_HEIGHT", "8")) |
5 | 5 | cols = int(os.environ.get("MOCK_ARRAY_WIDTH", "8")) |
| 6 | + |
| 7 | +# Element placement pitch can be control by user |
6 | 8 | pitch_scale = int(os.environ.get("MOCK_ARRAY_PITCH_SCALE", "2")) |
7 | 9 |
|
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 |
13 | | - |
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 |
21 | | - |
22 | | -pitch_and_margin = pitch + margin |
23 | | - |
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 |
| 10 | +if pitch_scale < 1: |
| 11 | + raise Exception("Element placement pitch must be greater than 1") |
| 12 | + |
| 13 | +# routing pitch for M4, M5 and M6 tied to placement grid at 2.16 |
| 14 | +# therefore, the Element size should be multiple of 2.16 and |
| 15 | +# placement of Element should be multiple of 2.16 |
| 16 | +placement_grid_x = 0.054 |
| 17 | +placement_grid_y = 0.27 |
| 18 | + |
| 19 | +# Element size is set to multiple of 2.16 |
| 20 | +ce_width = 12.96 |
| 21 | +ce_height = 12.96 |
| 22 | + |
| 23 | +# Element placement, can be controled by user |
| 24 | +ce_pitch_x = ce_width * pitch_scale |
| 25 | +ce_pitch_y = ce_height * pitch_scale |
| 26 | + |
| 27 | +# top level core offset |
| 28 | +margin_x = 2.16 |
| 29 | +margin_y = 2.16 |
| 30 | + |
| 31 | +# top level core size |
| 32 | +core_width = (ce_pitch_x * (cols + 0.5)) |
| 33 | +core_height = (ce_pitch_y * (rows + 0.5)) |
| 34 | + |
| 35 | +die_width = core_width + (2 * margin_x) |
| 36 | +die_height = core_height + (2 * margin_y) |
0 commit comments