提交 453f2124 编写于 作者: 梁森 Liang Sen

Update makefile

上级 d602ca4d
...@@ -32,7 +32,6 @@ ABS_WORK_DIR := $(shell pwd) ...@@ -32,7 +32,6 @@ ABS_WORK_DIR := $(shell pwd)
RUN_BIN_DIR ?= $(ABS_WORK_DIR)/ready-to-run RUN_BIN_DIR ?= $(ABS_WORK_DIR)/ready-to-run
RUN_BIN ?= coremark-2-iteration RUN_BIN ?= coremark-2-iteration
CONSIDER_FSDB ?= 1 CONSIDER_FSDB ?= 1
MFC ?= 0
ifdef FLASH ifdef FLASH
RUN_OPTS := +flash=$(RUN_BIN_DIR)/$(RUN_BIN).bin RUN_OPTS := +flash=$(RUN_BIN_DIR)/$(RUN_BIN).bin
...@@ -62,13 +61,8 @@ endif ...@@ -62,13 +61,8 @@ endif
RELEASE_ARGS = --disable-all --remove-assert --fpga-platform RELEASE_ARGS = --disable-all --remove-assert --fpga-platform
DEBUG_ARGS = --enable-difftest DEBUG_ARGS = --enable-difftest
ifeq ($(MFC),1) RELEASE_ARGS += --emission-options disableRegisterRandomization -E verilog
RELEASE_ARGS += -X none -E chirrtl --output-file $(TOP).chirrtl.fir DEBUG_ARGS += --emission-options disableRegisterRandomization -E verilog
DEBUG_ARGS += -X none -E chirrtl --output-file $(SIM_TOP).chirrtl.fir
else
RELEASE_ARGS += --emission-options disableRegisterRandomization -E verilog --output-file $(TOP).v
DEBUG_ARGS += --emission-options disableRegisterRandomization -E verilog --output-file $(SIM_TOP).v
endif
ifeq ($(RELEASE),1) ifeq ($(RELEASE),1)
override SIM_ARGS += $(RELEASE_ARGS) override SIM_ARGS += $(RELEASE_ARGS)
...@@ -85,13 +79,7 @@ $(TOP_V): $(SCALA_FILE) ...@@ -85,13 +79,7 @@ $(TOP_V): $(SCALA_FILE)
mkdir -p $(@D) mkdir -p $(@D)
time -o $(@D)/time.log mill -i XiangShan.runMain $(FPGATOP) -td $(@D) \ time -o $(@D)/time.log mill -i XiangShan.runMain $(FPGATOP) -td $(@D) \
--config $(CONFIG) --full-stacktrace --num-cores $(NUM_CORES) \ --config $(CONFIG) --full-stacktrace --num-cores $(NUM_CORES) \
$(RELEASE_ARGS) $(RELEASE_ARGS) --output-file $(TOP_V)
ifeq ($(MFC),1)
time -a -o $(@D)/time.log firtool --disable-all-randomization --disable-annotation-unknown \
--annotation-file=$(BUILD_DIR)/$(TOP).anno.json --format=fir \
--lowering-options=noAlwaysComb,disallowExpressionInliningInPorts,explicitBitcast \
--verilog --dedup -o $(TOP_V) $(BUILD_DIR)/$(TOP).chirrtl.fir
endif
sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g' \ sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g' \
-e 's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g' $@ > $(BUILD_DIR)/tmp.v -e 's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g' $@ > $(BUILD_DIR)/tmp.v
sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g' \ sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g' \
...@@ -120,17 +108,7 @@ $(SIM_TOP_V): $(SCALA_FILE) $(TEST_FILE) ...@@ -120,17 +108,7 @@ $(SIM_TOP_V): $(SCALA_FILE) $(TEST_FILE)
@date -R | tee -a $(@D)/time.log @date -R | tee -a $(@D)/time.log
time -o $(@D)/time.log mill -i XiangShan.test.runMain $(SIMTOP) -td $(@D) \ time -o $(@D)/time.log mill -i XiangShan.test.runMain $(SIMTOP) -td $(@D) \
--config $(CONFIG) --full-stacktrace --num-cores $(NUM_CORES) \ --config $(CONFIG) --full-stacktrace --num-cores $(NUM_CORES) \
$(SIM_ARGS) $(SIM_ARGS) --output-file $(SIM_TOP_V)
ifeq ($(MFC),1)
time -a -o $(@D)/time.log firtool --disable-all-randomization --disable-annotation-unknown \
--annotation-file=$(BUILD_DIR)/$(SIM_TOP).anno.json --format=fir \
--lowering-options=noAlwaysComb,disallowExpressionInliningInPorts,explicitBitcast \
--verilog --dedup -o $(SIM_TOP_V) $(BUILD_DIR)/$(SIM_TOP).chirrtl.fir
sed '/\/\/ ----- 8< ----- .*----- 8< -----/,$d' $(SIM_TOP_V) > res.v
rm $(SIM_TOP_V)
mv res.v $(SIM_TOP_V)
endif
sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g' \ sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g' \
-e 's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g' $@ > $(BUILD_DIR)/tmp.v -e 's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g' $@ > $(BUILD_DIR)/tmp.v
sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g' \ sed -e 's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g' \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册