Skip to content

Commit

Permalink
target/common: Allow overriding work-vsim directory
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Oct 24, 2023
1 parent 0e33a96 commit 5f29804
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions target/common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SED_SRCS := sed -e ${MATCH_END} -e ${MATCH_BGN}

VSIM_BENDER += -t test -t rtl -t simulation -t vsim
VSIM_SOURCES = $(shell ${BENDER} script flist ${VSIM_BENDER} | ${SED_SRCS})
VSIM_BUILDDIR := work-vsim
VSIM_BUILDDIR ?= work-vsim

# VCS_BUILDDIR should to be the same as the `DEFAULT : ./work-vcs`
# in target/snitch_cluster/synopsys_sim.setup
Expand Down Expand Up @@ -147,10 +147,13 @@ endef
# Modelsim #
############

$(VSIM_BUILDDIR):
mkdir -p $@

define QUESTASIM
${VSIM} -c -do "source $<; quit" | tee $(dir $<)vsim.log
@! grep -P "Errors: [1-9]*," $(dir $<)vsim.log
@mkdir -p bin
@mkdir -p $(dir $@)
@echo "#!/bin/bash" > $@
@echo 'binary=$$(realpath $$1)' >> $@
@echo 'mkdir -p $(LOGS_DIR)' >> $@
Expand Down

0 comments on commit 5f29804

Please sign in to comment.