Skip to content

Commit 8f95106

Browse files
committed
mock-array: less magic numbers
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent c039f18 commit 8f95106

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ export GPL_ROUTABILITY_DRIVEN = 0
1414

1515
export CORE_AREA = $(shell \
1616
export MOCK_ARRAY_TABLE="$(MOCK_ARRAY_TABLE)" && \
17+
export MOCK_ARRAY_SCALE="$(MOCK_ARRAY_SCALE)" && \
1718
cd $(dir $(DESIGN_CONFIG))/../ && \
1819
python3 -c "import config; print(f'{config.ce_margin_x} {config.ce_margin_y} {config.ce_width - config.ce_margin_x} {config.ce_height - config.ce_margin_y}')")
1920

2021
export DIE_AREA = $(shell \
2122
export MOCK_ARRAY_TABLE="$(MOCK_ARRAY_TABLE)" && \
23+
export MOCK_ARRAY_SCALE="$(MOCK_ARRAY_SCALE)" && \
2224
cd $(dir $(DESIGN_CONFIG))/../ && \
2325
python3 -c "import config; print(f'0 0 {config.ce_width} {config.ce_height}')")
2426

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ export PLACE_DENSITY = 0.30
1414

1515
export CORE_AREA = $(shell \
1616
export MOCK_ARRAY_TABLE="$(MOCK_ARRAY_TABLE)" && \
17+
export MOCK_ARRAY_SCALE="$(MOCK_ARRAY_SCALE)" && \
1718
cd $(dir $(DESIGN_CONFIG)) && \
1819
python3 -c "import config ; print(f'{config.margin_x} {config.margin_y} {config.core_width + config.margin_x} {config.core_height + config.margin_y}')")
1920

2021
export DIE_AREA = $(shell \
2122
export MOCK_ARRAY_TABLE="$(MOCK_ARRAY_TABLE)" && \
23+
export MOCK_ARRAY_SCALE="$(MOCK_ARRAY_SCALE)" && \
2224
cd $(dir $(DESIGN_CONFIG)) && \
2325
python3 -c "import config; print(f'{0} {0} {config.die_width} {config.die_height}')")
2426

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import os
22

3-
# routing pitch for M4, M5 and M6 tied to placement grid at 2.16
4-
# therefore, the optimal placement and Element size should be multiple of 2.16
5-
# set grid x and y
6-
placement_grid_x = 2.16
7-
placement_grid_y = 2.16
3+
# Routing pitches for relevant metal layers.
4+
# For x, this is M5; for y, this is M4.
5+
# Pitches are specified in OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7_tech_1x_201209.lef.
6+
# For asap7, x and y pitch is the same.
7+
#
8+
# make_tracks M5 -x_offset 0.012 -x_pitch 0.048 -y_offset 0.012 -y_pitch 0.048
9+
#
10+
# the macro needs to be on a multiple of the track pattern
11+
placement_grid_x = 0.048 * int(os.environ.get("MOCK_ARRAY_SCALE"))
12+
placement_grid_y = 0.048 * int(os.environ.get("MOCK_ARRAY_SCALE"))
813

914
# number of Elements in row and column, can be control by user via environment variable
1015
# MOCK_ARRAY_TABLE (rows, cols, width, height, pitch_x, pitch_y)

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ export MOCK_ARRAY_TABLE ?= 8 8 20 20 25 25
99
export MOCK_ARRAY_DATAWIDTH ?= 64
1010

1111
# Must be zero for routing by abutment
12-
export MACRO_BLOCKAGE_HALO ?= 0.5
12+
export MACRO_BLOCKAGE_HALO ?= 0.5
13+
14+
export MOCK_ARRAY_SCALE ?= 45

0 commit comments

Comments
 (0)