Remove SFC_LEVEL
This commit is contained in:
15
common.mk
15
common.mk
@@ -203,8 +203,7 @@ MFC_BASE_LOWERING_OPTIONS ?= emittedLineLength=2048,noAlwaysComb,disallowLocalVa
|
|||||||
# hack: when using dontTouch, io.cpu annotations are not removed by SFC,
|
# hack: when using dontTouch, io.cpu annotations are not removed by SFC,
|
||||||
# hence we remove them manually by using jq before passing them to firtool
|
# hence we remove them manually by using jq before passing them to firtool
|
||||||
|
|
||||||
$(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) &: $(FIRRTL_FILE)
|
$(EXTRA_FIRRTL_OPTIONS) &: $(FIRRTL_FILE)
|
||||||
echo none > $(SFC_LEVEL)
|
|
||||||
echo "$(EXTRA_BASE_FIRRTL_OPTIONS)" > $(EXTRA_FIRRTL_OPTIONS)
|
echo "$(EXTRA_BASE_FIRRTL_OPTIONS)" > $(EXTRA_FIRRTL_OPTIONS)
|
||||||
|
|
||||||
$(MFC_LOWERING_OPTIONS):
|
$(MFC_LOWERING_OPTIONS):
|
||||||
@@ -215,13 +214,11 @@ else
|
|||||||
echo "$(MFC_BASE_LOWERING_OPTIONS),disallowPackedArrays" > $@
|
echo "$(MFC_BASE_LOWERING_OPTIONS),disallowPackedArrays" > $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(FINAL_ANNO_FILE): $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) $(SFC_LEVEL)
|
$(FINAL_ANNO_FILE): $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE)
|
||||||
if [ $(shell cat $(SFC_LEVEL)) = low ]; then jq -s '[.[][]]' $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) > $@; fi
|
cat $(EXTRA_ANNO_FILE) > $@
|
||||||
if [ $(shell cat $(SFC_LEVEL)) = none ]; then cat $(EXTRA_ANNO_FILE) > $@; fi
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(SFC_MFC_TARGETS) &: private TMP_DIR := $(shell mktemp -d -t cy-XXXXXXXX)
|
$(SFC_MFC_TARGETS) &: $(TAPEOUT_CLASSPATH_TARGETS) $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(EXTRA_FIRRTL_OPTIONS) $(MFC_LOWERING_OPTIONS)
|
||||||
$(SFC_MFC_TARGETS) &: $(TAPEOUT_CLASSPATH_TARGETS) $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) $(MFC_LOWERING_OPTIONS)
|
|
||||||
rm -rf $(GEN_COLLATERAL_DIR)
|
rm -rf $(GEN_COLLATERAL_DIR)
|
||||||
$(call run_jar_scala_main,$(TAPEOUT_CLASSPATH),tapeout.transforms.GenerateModelStageMain,\
|
$(call run_jar_scala_main,$(TAPEOUT_CLASSPATH),tapeout.transforms.GenerateModelStageMain,\
|
||||||
--no-dedup \
|
--no-dedup \
|
||||||
@@ -232,12 +229,8 @@ $(SFC_MFC_TARGETS) &: $(TAPEOUT_CLASSPATH_TARGETS) $(FIRRTL_FILE) $(FINAL_ANNO_F
|
|||||||
--annotation-file $(FINAL_ANNO_FILE) \
|
--annotation-file $(FINAL_ANNO_FILE) \
|
||||||
--log-level $(FIRRTL_LOGLEVEL) \
|
--log-level $(FIRRTL_LOGLEVEL) \
|
||||||
--allow-unrecognized-annotations \
|
--allow-unrecognized-annotations \
|
||||||
-X $(shell cat $(SFC_LEVEL)) \
|
|
||||||
$(shell cat $(EXTRA_FIRRTL_OPTIONS)))
|
$(shell cat $(EXTRA_FIRRTL_OPTIONS)))
|
||||||
-mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) 2> /dev/null # Optionally change file type when SFC generates LowFIRRTL
|
-mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) 2> /dev/null # Optionally change file type when SFC generates LowFIRRTL
|
||||||
@if [ $(shell cat $(SFC_LEVEL)) = low ]; then cat $(SFC_ANNO_FILE) | jq 'del(.[] | select(.target | test("io.cpu"))?)' > $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json; fi
|
|
||||||
@if [ $(shell cat $(SFC_LEVEL)) = low ]; then cat $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json | jq 'del(.[] | select(.class | test("SRAMAnnotation"))?)' > $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json; fi
|
|
||||||
@if [ $(shell cat $(SFC_LEVEL)) = low ]; then cat $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json > $(SFC_ANNO_FILE) && rm $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json && rm $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json; fi
|
|
||||||
firtool \
|
firtool \
|
||||||
--format=fir \
|
--format=fir \
|
||||||
--export-module-hierarchy \
|
--export-module-hierarchy \
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ sim_files ?= $(build_dir)/sim_files.f
|
|||||||
# single file that contains all files needed for VCS or Verilator simulation (unique and without .h's)
|
# single file that contains all files needed for VCS or Verilator simulation (unique and without .h's)
|
||||||
sim_common_files ?= $(build_dir)/sim_files.common.f
|
sim_common_files ?= $(build_dir)/sim_files.common.f
|
||||||
|
|
||||||
SFC_LEVEL ?= $(build_dir)/.sfc_level
|
|
||||||
EXTRA_FIRRTL_OPTIONS ?= $(build_dir)/.extra_firrtl_options
|
EXTRA_FIRRTL_OPTIONS ?= $(build_dir)/.extra_firrtl_options
|
||||||
MFC_LOWERING_OPTIONS ?= $(build_dir)/.mfc_lowering_options
|
MFC_LOWERING_OPTIONS ?= $(build_dir)/.mfc_lowering_options
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user