Skip to content

Commit 4782af8

Browse files
committed
scripts: DRY
reduce copy & paste for upcoming changes by extending the use of synth_preamble.tcl Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 9070633 commit 4782af8

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

flow/scripts/synth.tcl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ if {[info exist ::env(DFF_LIB_FILE)]} {
5757
}
5858
opt
5959

60-
61-
set constr [open $::env(OBJECTS_DIR)/abc.constr w]
62-
puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)"
63-
puts $constr "set_load $::env(ABC_LOAD_IN_FF)"
64-
close $constr
65-
6660
puts "abc [join $abc_args " "]"
6761
abc {*}$abc_args
6862

@@ -86,11 +80,6 @@ insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS)
8680
# Reports
8781
tee -o $::env(REPORTS_DIR)/synth_check.txt check
8882

89-
# Create argument list for stat
90-
set stat_libs ""
91-
foreach lib $::env(DONT_USE_LIBS) {
92-
append stat_libs "-liberty $lib "
93-
}
9483
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$stat_libs
9584

9685
# Write synthesized design

flow/scripts/synth_hier_report.tcl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
source $::env(SCRIPTS_DIR)/synth_preamble.tcl
22

3-
set constr [open $::env(OBJECTS_DIR)/abc.constr w]
4-
puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)"
5-
puts $constr "set_load $::env(ABC_LOAD_IN_FF)"
6-
close $constr
7-
83
# Hierarchical synthesis
94
synth -top $::env(DESIGN_NAME)
105
if { [info exist ::env(ADDER_MAP_FILE)] && [file isfile $::env(ADDER_MAP_FILE)] } {
@@ -19,11 +14,6 @@ if {[info exist ::env(DFF_LIB_FILE)]} {
1914
puts "abc [join $abc_args " "]"
2015
abc {*}$abc_args
2116

22-
# Create argument list for stat
23-
set stat_libs ""
24-
foreach lib $::env(DONT_USE_LIBS) {
25-
append stat_libs "-liberty $lib "
26-
}
2717
tee -o $::env(REPORTS_DIR)/synth_hier_stat.txt stat {*}$stat_libs
2818

2919
if { [info exist ::env(REPORTS_DIR)] && [file isfile $::env(REPORTS_DIR)/synth_hier_stat.txt] } {

flow/scripts/synth_preamble.tcl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,14 @@ if {[info exist ::env(SDC_FILE_CLOCK_PERIOD)] && [file isfile $::env(SDC_FILE_CL
8787
}
8888
close $fp
8989
}
90+
91+
# Create argument list for stat
92+
set stat_libs ""
93+
foreach lib $::env(DONT_USE_LIBS) {
94+
append stat_libs "-liberty $lib "
95+
}
96+
97+
set constr [open $::env(OBJECTS_DIR)/abc.constr w]
98+
puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)"
99+
puts $constr "set_load $::env(ABC_LOAD_IN_FF)"
100+
close $constr

0 commit comments

Comments
 (0)