From 2011a9ce7711e715451f803fe485dacb770ad8f3 Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Thu, 28 Sep 2023 23:18:37 +0200 Subject: [PATCH] Enforce bender directory to avoid extra checkout (#82) * Enforce bender directory to avoid extra checkout To avoid a checkout of dependencies within the serial_link, setting the bender directory with -d allows for re-use of available dependencies. * Fix elfloader path --- Makefile | 3 ++- cheshire.mk | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 74e80849..963d40c3 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ # Christopher Reinwardt # Paul Scheffler -CHS_ROOT ?= . +CHS_ROOT ?= $(shell pwd) +BENDER ?= bender -d $(CHS_ROOT) include cheshire.mk diff --git a/cheshire.mk b/cheshire.mk index 8dbbe10f..77663395 100644 --- a/cheshire.mk +++ b/cheshire.mk @@ -101,7 +101,7 @@ $(AXI_VGA_ROOT)/.generated: # Custom serial link $(CHS_SLINK_DIR)/.generated: $(CHS_ROOT)/hw/serial_link.hjson cp $< $(dir $@)/src/regs/serial_link_single_channel.hjson - flock -x $@ $(MAKE) -C $(CHS_SLINK_DIR) update-regs && touch $@ + flock -x $@ $(MAKE) -C $(CHS_SLINK_DIR) update-regs BENDER="$(BENDER)" && touch $@ CHS_HW_ALL += $(CHS_ROOT)/hw/regs/cheshire_reg_pkg.sv $(CHS_ROOT)/hw/regs/cheshire_reg_top.sv CHS_HW_ALL += $(CLINTROOT)/.generated @@ -134,7 +134,7 @@ CHS_BOOTROM_ALL += $(CHS_ROOT)/hw/bootrom/cheshire_bootrom.sv $(CHS_ROOT)/hw/boo $(CHS_ROOT)/target/sim/vsim/compile.cheshire_soc.tcl: Bender.yml $(BENDER) script vsim -t sim -t cv64a6_imafdcsclic_sv39 -t test -t cva6 -t rtl --vlog-arg="$(VLOG_ARGS)" > $@ - echo 'vlog "$(CURDIR)/$(CHS_ROOT)/target/sim/src/elfloader.cpp" -ccflags "-std=c++11"' >> $@ + echo 'vlog "$(realpath $(CHS_ROOT))/target/sim/src/elfloader.cpp" -ccflags "-std=c++11"' >> $@ $(CHS_ROOT)/target/sim/models: mkdir -p $@