Skip to content

Commit a1facf1

Browse files
committed
makefile: move stuff from make to .tcl
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 7735228 commit a1facf1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

flow/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ include $(PLATFORM_DIR)/config.mk
180180
# is no way to escape space in defaults.py and get "foreach" to work.
181181
$(foreach line,$(shell $(SCRIPTS_DIR)/defaults.py),$(eval export $(subst __SPACE__, ,$(line))))
182182

183-
# Not normally adjusted by user
184-
export SYNTH_OPERATIONS_ARGS ?= -extra-map $(FLOW_HOME)/platforms/common/lcu_kogge_stone.v
185-
export SYNTH_FULL_ARGS ?= $(SYNTH_ARGS) $(SYNTH_OPERATIONS_ARGS)
186-
187183
export DESIGN_CONFIG
188184
export DESIGN_DIR = $(dir $(DESIGN_CONFIG))
189185
export LOG_DIR = $(WORK_HOME)/logs/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_VARIANT)

flow/scripts/synth.tcl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,17 @@ if {[env_var_exists_and_non_empty SYNTH_KEEP_MODULES]} {
1818
}
1919
}
2020

21+
set synth_full_args $::env(SYNTH_ARGS)
22+
if {[env_var_exists_and_non_empty SYNTH_OPERATIONS_ARGS]} {
23+
set synth_full_args [concat $synth_full_args $::env(SYNTH_OPERATIONS_ARGS)]
24+
} else {
25+
set synth_full_args [concat $synth_full_args "-extra-map $::env(FLOW_HOME)/platforms/common/lcu_kogge_stone.v"]
26+
}
27+
2128
if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
2229
# Perform standard coarse-level synthesis script, flatten right away
2330
# (-flatten part of $synth_args per default)
24-
synth -run :fine {*}$::env(SYNTH_FULL_ARGS)
31+
synth -run :fine {*}$synth_full_args
2532
} else {
2633
# Perform standard coarse-level synthesis script,
2734
# defer flattening until we have decided what hierarchy to keep
@@ -38,15 +45,15 @@ if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
3845
}
3946

4047
# Re-run coarse-level script, this time do pass -flatten
41-
synth -run coarse:fine {*}$::env(SYNTH_FULL_ARGS)
48+
synth -run coarse:fine {*}$synth_full_args
4249
}
4350

4451
json -o $::env(RESULTS_DIR)/mem.json
4552
# Run report and check here so as to fail early if this synthesis run is doomed
4653
exec -- python3 $::env(SCRIPTS_DIR)/mem_dump.py --max-bits $::env(SYNTH_MEMORY_MAX_BITS) $::env(RESULTS_DIR)/mem.json
4754

4855
if {![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS]} {
49-
synth -top $::env(DESIGN_NAME) -run fine: {*}$::env(SYNTH_FULL_ARGS)
56+
synth -top $::env(DESIGN_NAME) -run fine: {*}$synth_full_args
5057
} else {
5158
source $::env(SCRIPTS_DIR)/synth_wrap_operators.tcl
5259
}

0 commit comments

Comments
 (0)