Skip to content

Commit 98c233e

Browse files
authored
Merge pull request #2420 from Pinata-Consulting/pdn-simplified
Pdn simplified
2 parents dddca4a + 1922ece commit 98c233e

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

flow/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,6 @@ export OBJECTS_DIR = $(WORK_HOME)/objects/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_
218218
export REPORTS_DIR = $(WORK_HOME)/reports/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_VARIANT)
219219
export RESULTS_DIR = $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_VARIANT)
220220

221-
# BLOCKS is ORFS specific and is used to trigger hierarchical flow,
222-
# MACROS is a space separated list of macros used in the design,
223-
# but not necessarily built by ORFS using the BLOCKS mechanism.
224-
export MACROS ?= $(BLOCKS)
225-
226221
ifneq ($(BLOCKS),)
227222
$(foreach block,$(BLOCKS),$(eval BLOCK_LEFS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
228223
$(foreach block,$(BLOCKS),$(eval BLOCK_LIBS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lib))

flow/platforms/asap7/openRoad/pdn/BLOCKS_grid_strategy.tcl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Top level PDN for macros using BLOCK_grid_strategy.tcl
2+
source $::env(SCRIPTS_DIR)/util.tcl
23

34
####################################
45
# global connections
@@ -30,7 +31,16 @@ add_pdn_connect -grid {top} -layers {M5 M6}
3031
# Element grid
3132
####################################
3233
# The halo around the macro prevents pdn from blocking pin access
33-
define_pdn_grid -macro -cells $::env(MACROS) \
34+
35+
set macro_names {}
36+
37+
foreach macro [find_macros] {
38+
set macro_name [[$macro getMaster] getName]
39+
dict set macro_names $macro_name 1
40+
}
41+
set macro_names [dict keys $macro_names]
42+
43+
define_pdn_grid -macro -cells $macro_names \
3444
-halo "$::env(MACRO_HALO_X) $::env(MACRO_HALO_Y) $::env(MACRO_HALO_X) $::env(MACRO_HALO_Y)" \
3545
-voltage_domains {CORE} -name ElementGrid
3646

flow/scripts/macro_place_util.tcl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
proc find_macros {} {
2-
set macros ""
3-
4-
set db [ord::get_db]
5-
set block [[$db getChip] getBlock]
6-
foreach inst [$block getInsts] {
7-
set inst_master [$inst getMaster]
8-
9-
# BLOCK means MACRO cells
10-
if { [string match [$inst_master getType] "BLOCK"] } {
11-
append macros " " $inst
12-
}
13-
}
14-
return $macros
15-
}
16-
171
if {[find_macros] != ""} {
182
# If wrappers defined replace macros with their wrapped version
193
# # ----------------------------------------------------------------------------

flow/scripts/util.tcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,19 @@ proc append_env_var {list_name var_name prefix has_arg} {
8383
}
8484
}
8585
}
86+
87+
proc find_macros {} {
88+
set macros ""
89+
90+
set db [ord::get_db]
91+
set block [[$db getChip] getBlock]
92+
foreach inst [$block getInsts] {
93+
set inst_master [$inst getMaster]
94+
95+
# BLOCK means MACRO cells
96+
if { [string match [$inst_master getType] "BLOCK"] } {
97+
append macros " " $inst
98+
}
99+
}
100+
return $macros
101+
}

0 commit comments

Comments
 (0)