Skip to content

Commit d3473b1

Browse files
committed
Do not write physical-only cells on the output verilog file in the final stage.
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 33e29bf commit d3473b1

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

flow/scripts/final_report.tcl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ source $::env(SCRIPTS_DIR)/deleteRoutingObstructions.tcl
1515
deleteRoutingObstructions
1616

1717
write_def $::env(RESULTS_DIR)/6_final.def
18-
write_verilog $::env(RESULTS_DIR)/6_final.v
18+
#write_verilog $::env(RESULTS_DIR)/6_final.v
19+
write_verilog $::env(RESULTS_DIR)/6_final.v \
20+
-remove_cells [find_physical_only_masters]
1921

2022
# Run extraction and STA
2123
if {

flow/scripts/util.tcl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,39 @@ proc hier_options { } {
201201
return ""
202202
}
203203
}
204+
205+
proc is_physical_only_master { master } {
206+
set physical_only_type_patterns [list \
207+
"COVER" \
208+
"COVER_BUMP" \
209+
"RING" \
210+
"PAD_SPACER" \
211+
"CORE_FEEDTHROUGH" \
212+
"CORE_SPACER" \
213+
"CORE_ANTENNACELL" \
214+
"CORE_WELLTAP" \
215+
"ENDCAP*"]
216+
set master_type [$master getType]
217+
foreach pattern $physical_only_type_patterns {
218+
if {[string match $pattern $master_type]} {
219+
return 1
220+
}
221+
}
222+
return 0
223+
}
224+
225+
# Finds all physical-only masters in the current database and
226+
# returns their names.
227+
proc find_physical_only_masters {} {
228+
set db [::ord::get_db]
229+
set libs [$db getLibs]
230+
set physical_only_masters [list]
231+
foreach lib $libs {
232+
foreach master [$lib getMasters] {
233+
if {[is_physical_only_master $master]} {
234+
lappend physical_only_masters [$master getName]
235+
}
236+
}
237+
}
238+
return $physical_only_masters
239+
}

0 commit comments

Comments
 (0)