Move sim_files creation after FIRTOOL | Have FIRTOOL delete collateral dir
This commit is contained in:
@@ -91,7 +91,7 @@ endif
|
|||||||
#########################################################################################
|
#########################################################################################
|
||||||
# copy over bootrom files
|
# copy over bootrom files
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
$(build_dir) $(GEN_COLLATERAL_DIR):
|
$(build_dir):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
$(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip/bootrom/bootrom.%.img | $(build_dir)
|
$(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip/bootrom/bootrom.%.img | $(build_dir)
|
||||||
@@ -101,7 +101,7 @@ $(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip
|
|||||||
# create firrtl file rule and variables
|
# create firrtl file rule and variables
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# AG: must re-elaborate if cva6 sources have changed... otherwise just run firrtl compile
|
# AG: must re-elaborate if cva6 sources have changed... otherwise just run firrtl compile
|
||||||
$(FIRRTL_FILE) $(ANNO_FILE) &: $(SCALA_SOURCES) $(sim_files) $(SCALA_BUILDTOOL_DEPS) $(EXTRA_GENERATOR_REQS)
|
$(FIRRTL_FILE) $(ANNO_FILE) &: $(SCALA_SOURCES) $(SCALA_BUILDTOOL_DEPS) $(EXTRA_GENERATOR_REQS)
|
||||||
mkdir -p $(build_dir)
|
mkdir -p $(build_dir)
|
||||||
$(call run_scala_main,$(SBT_PROJECT),$(GENERATOR_PACKAGE).Generator,\
|
$(call run_scala_main,$(SBT_PROJECT),$(GENERATOR_PACKAGE).Generator,\
|
||||||
--target-dir $(build_dir) \
|
--target-dir $(build_dir) \
|
||||||
@@ -144,7 +144,8 @@ SFC_MFC_TARGETS = \
|
|||||||
$(MFC_MODEL_HRCHY_JSON) \
|
$(MFC_MODEL_HRCHY_JSON) \
|
||||||
$(MFC_MODEL_SMEMS_JSON) \
|
$(MFC_MODEL_SMEMS_JSON) \
|
||||||
$(MFC_FILELIST) \
|
$(MFC_FILELIST) \
|
||||||
$(MFC_BB_MODS_FILELIST)
|
$(MFC_BB_MODS_FILELIST) \
|
||||||
|
$(GEN_COLLATERAL_DIR)
|
||||||
|
|
||||||
SFC_REPL_SEQ_MEM = --infer-rw --repl-seq-mem -c:$(MODEL):-o:$(SFC_SMEMS_CONF)
|
SFC_REPL_SEQ_MEM = --infer-rw --repl-seq-mem -c:$(MODEL):-o:$(SFC_SMEMS_CONF)
|
||||||
|
|
||||||
@@ -161,6 +162,7 @@ SFC_REPL_SEQ_MEM = --infer-rw --repl-seq-mem -c:$(MODEL):-o:$(SFC_SMEMS_CONF)
|
|||||||
# 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_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES)
|
$(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES)
|
||||||
|
rm -rf $(GEN_COLLATERAL_DIR)
|
||||||
ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS))
|
ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS))
|
||||||
$(eval SFC_LEVEL := $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), low, none))
|
$(eval SFC_LEVEL := $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), low, none))
|
||||||
$(eval EXTRA_FIRRTL_OPTIONS += $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), $(SFC_REPL_SEQ_MEM),))
|
$(eval EXTRA_FIRRTL_OPTIONS += $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), $(SFC_REPL_SEQ_MEM),))
|
||||||
|
|||||||
@@ -94,11 +94,10 @@ SIM_FILE_REQS += \
|
|||||||
$(ROCKETCHIP_RSRCS_DIR)/vsrc/EICG_wrapper.v
|
$(ROCKETCHIP_RSRCS_DIR)/vsrc/EICG_wrapper.v
|
||||||
|
|
||||||
# copy files but ignore *.h files in *.f (match vcs)
|
# copy files but ignore *.h files in *.f (match vcs)
|
||||||
$(sim_files): $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
|
||||||
rm -rf $(GEN_COLLATERAL_DIR)/*
|
cp -f $^ $(GEN_COLLATERAL_DIR)
|
||||||
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
|
||||||
$(foreach file,\
|
$(foreach file,\
|
||||||
$(SIM_FILE_REQS),\
|
$^,\
|
||||||
$(if $(filter %.h,$(file)),\
|
$(if $(filter %.h,$(file)),\
|
||||||
,\
|
,\
|
||||||
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
||||||
|
|||||||
@@ -38,11 +38,10 @@ SIM_FILE_REQS += \
|
|||||||
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v
|
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v
|
||||||
|
|
||||||
# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
|
# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
|
||||||
$(sim_files): $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
|
||||||
rm -rf $(GEN_COLLATERAL_DIR)/*
|
cp -f $^ $(GEN_COLLATERAL_DIR)
|
||||||
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
|
||||||
$(foreach file,\
|
$(foreach file,\
|
||||||
$(SIM_FILE_REQS),\
|
$^,\
|
||||||
$(if $(filter %.h,$(file)),\
|
$(if $(filter %.h,$(file)),\
|
||||||
,\
|
,\
|
||||||
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
||||||
|
|||||||
@@ -66,11 +66,10 @@ SIM_FILE_REQS += \
|
|||||||
$(ROCKETCHIP_RSRCS_DIR)/csrc/remote_bitbang.cc
|
$(ROCKETCHIP_RSRCS_DIR)/csrc/remote_bitbang.cc
|
||||||
|
|
||||||
# copy files and add -FI for *.h files in *.f
|
# copy files and add -FI for *.h files in *.f
|
||||||
$(sim_files): $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
|
||||||
rm -rf $(GEN_COLLATERAL_DIR)/*
|
cp -f $^ $(GEN_COLLATERAL_DIR)
|
||||||
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
|
||||||
$(foreach file,\
|
$(foreach file,\
|
||||||
$(SIM_FILE_REQS),\
|
$^,\
|
||||||
$(if $(filter %.h,$(file)),\
|
$(if $(filter %.h,$(file)),\
|
||||||
echo "-FI $(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;,\
|
echo "-FI $(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;,\
|
||||||
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
||||||
|
|||||||
@@ -108,11 +108,10 @@ SIM_FILE_REQS += \
|
|||||||
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v
|
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v
|
||||||
|
|
||||||
# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
|
# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
|
||||||
$(sim_files): $(SIM_FILE_REQS) $(build_dir)
|
$(sim_files): $(SIM_FILE_REQS) | $(build_dir)
|
||||||
rm -rf $(build_dir)/*
|
cp -f $^ $(build_dir)
|
||||||
cp -f $(SIM_FILE_REQS) $(build_dir)
|
|
||||||
$(foreach file,\
|
$(foreach file,\
|
||||||
$(SIM_FILE_REQS),\
|
$^,\
|
||||||
$(if $(filter %.h,$(file)),\
|
$(if $(filter %.h,$(file)),\
|
||||||
,\
|
,\
|
||||||
echo "$(addprefix $(build_dir)/, $(notdir $(file)))" >> $@;))
|
echo "$(addprefix $(build_dir)/, $(notdir $(file)))" >> $@;))
|
||||||
|
|||||||
Reference in New Issue
Block a user