Skip to content

Commit 08cc3a6

Browse files
committed
util: move find_macros to util.tcl
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 32154ff commit 08cc3a6

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

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

Lines changed: 1 addition & 0 deletions
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

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)