diff --git a/common.mk b/common.mk index 76705a7fdc..6e47e39374 100644 --- a/common.mk +++ b/common.mk @@ -57,6 +57,7 @@ HELP_COMMANDS += \ # see HELP_COMPILATION_VARIABLES ######################################################################################### include $(base_dir)/generators/cva6/cva6.mk +include $(base_dir)/generators/ibex/ibex.mk include $(base_dir)/generators/tracegen/tracegen.mk include $(base_dir)/generators/nvdla/nvdla.mk include $(base_dir)/tools/dromajo/dromajo.mk @@ -174,7 +175,7 @@ MFC_BASE_LOWERING_OPTIONS = emittedLineLength=2048,noAlwaysComb,disallowLocalVar # hack: lower to low firrtl if Fixed types are found # 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 -$(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) $(FINAL_ANNO_FILE) $(MFC_LOWERING_OPTIONS) &: $(FIRRTL_FILE) $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) +$(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) $(FINAL_ANNO_FILE) $(MFC_LOWERING_OPTIONS) &: $(FIRRTL_FILE) $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) $(VLOG_SOURCES) ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS)) $(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),)) @@ -191,7 +192,7 @@ endif if [ $(SFC_LEVEL) = none ]; then cat $(EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE); fi $(SFC_MFC_TARGETS) &: private TMP_DIR := $(shell mktemp -d -t cy-XXXXXXXX) -$(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) +$(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) rm -rf $(GEN_COLLATERAL_DIR) $(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateModelStageMain,\ --no-dedup \ @@ -204,7 +205,7 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE --allow-unrecognized-annotations \ -X $(SFC_LEVEL) \ $(EXTRA_FIRRTL_OPTIONS)) - -mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) # 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 [ $(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 [ $(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 [ $(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 @@ -226,7 +227,7 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE --split-verilog \ -o $(GEN_COLLATERAL_DIR) \ $(SFC_FIRRTL_FILE) - -mv $(SFC_SMEMS_CONF) $(MFC_SMEMS_CONF) + -mv $(SFC_SMEMS_CONF) $(MFC_SMEMS_CONF) 2> /dev/null $(SED) -i 's/.*/& /' $(MFC_SMEMS_CONF) # need trailing space for SFC macrocompiler # DOC include end: FirrtlCompiler diff --git a/generators/chipyard/src/main/resources/csrc/cospike.cc b/generators/chipyard/src/main/resources/csrc/cospike.cc index 6b1e9c3b05..fa0513d7c4 100644 --- a/generators/chipyard/src/main/resources/csrc/cospike.cc +++ b/generators/chipyard/src/main/resources/csrc/cospike.cc @@ -70,7 +70,7 @@ extern "C" void cospike_cosim(long long int cycle, if (!sim) { printf("Configuring spike cosim\n"); std::vector mem_cfg; - std::vector hartids; + std::vector hartids; mem_cfg.push_back(mem_cfg_t(info->mem0_base, info->mem0_size)); for (int i = 0; i < info->nharts; i++) hartids.push_back(i); diff --git a/generators/chipyard/src/main/resources/csrc/spiketile.cc b/generators/chipyard/src/main/resources/csrc/spiketile.cc index bedc41f346..4d2bb8a566 100644 --- a/generators/chipyard/src/main/resources/csrc/spiketile.cc +++ b/generators/chipyard/src/main/resources/csrc/spiketile.cc @@ -75,7 +75,7 @@ class chipyard_simif_t : public simif_t void dcache_d(uint64_t sourceid, uint64_t data[8], unsigned char has_data, unsigned char grantack); void drain_stq(); bool stq_empty() { return st_q.size() == 0; }; - + ~chipyard_simif_t() { }; chipyard_simif_t(size_t icache_ways, size_t icache_sets, @@ -262,7 +262,7 @@ extern "C" void spike_tile(int hartid, char* isa, endianness_little, pmpregions, std::vector(), - std::vector(), + std::vector(), false, 0); processor_t* p = new processor_t(isa_parser, @@ -488,7 +488,7 @@ bool chipyard_simif_t::mmio_load(reg_t addr, size_t len, uint8_t* bytes) { } } } - + if (!found) { return false; } @@ -576,7 +576,7 @@ bool chipyard_simif_t::handle_cache_access(reg_t addr, size_t len, } } } - + #define SETIDX(ADDR) ((ADDR >> 6) & (n_sets - 1)) uint64_t setidx = SETIDX(addr); uint64_t offset = addr & (64 - 1); diff --git a/generators/ibex b/generators/ibex index 5a512227d8..626127f229 160000 --- a/generators/ibex +++ b/generators/ibex @@ -1 +1 @@ -Subproject commit 5a512227d8f6d2929cc354c02d40200002e661e5 +Subproject commit 626127f229dd6dc926b7670eb4dd138f32a7940a diff --git a/scripts/build-toolchain-extra.sh b/scripts/build-toolchain-extra.sh index 0914f23afa..049e342489 100755 --- a/scripts/build-toolchain-extra.sh +++ b/scripts/build-toolchain-extra.sh @@ -113,6 +113,7 @@ fi echo '==> Installing DRAMSim2 Shared Library' cd $RDIR +git submodule update --init tools/DRAMSim2 cd tools/DRAMSim2 make libdramsim.so cp libdramsim.so $RISCV/lib/