Skip to content

Commit

Permalink
Enforce bender directory to avoid extra checkout (#82)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
micprog authored Sep 28, 2023
1 parent cf6e8aa commit 2011a9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Christopher Reinwardt <[email protected]>
# Paul Scheffler <[email protected]>

CHS_ROOT ?= .
CHS_ROOT ?= $(shell pwd)
BENDER ?= bender -d $(CHS_ROOT)

include cheshire.mk

Expand Down
4 changes: 2 additions & 2 deletions cheshire.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@
Expand Down

0 comments on commit 2011a9c

Please sign in to comment.