allowed option for tests to make without spike simulation. added postverify back in for outputs

This commit is contained in:
Kip Macsai-Goren 2022-01-05 21:17:54 +00:00
parent 1db58744b0
commit 706c95a383
4 changed files with 1384 additions and 5 deletions

View File

@ -59,7 +59,7 @@ endif
default: $(DEFAULT_TARGET)
variant: simulate verify
variant: compile simulate verify
all_variant:
@for isa in $(RISCV_ISA_ALL); do \
@ -87,7 +87,7 @@ simulate:
run -C $(SUITEDIR)
verify: simulate
# riscv-test-env/verify.sh # dmh 1 November 2021 removed because these tests don't have expected values
riscv-test-env/verify.sh # dmh 1 November 2021 removed because these tests don't have expected values
postverify:
ifeq ($(wildcard $(TARGETDIR)/$(RISCV_TARGET)/postverify.sh),)

View File

@ -4,12 +4,14 @@
act_dir := .
src_dir := $(act_dir)/src
ref_dir := $(act_dir)/references
work_dir := $(WORK)
work_dir_isa := $(work_dir)/rv$(XLEN)i_m/$(RISCV_DEVICE)
include $(act_dir)/Makefrag
ifneq ($(RISCV_TEST),)
target_tests = $(RISCV_TEST).elf
target_tests_nosim = $(empty)
endif
default: all
@ -46,10 +48,27 @@ $(work_dir_isa)/%.elf: $(src_dir)/%.S
endef
target_elf = $(foreach e,$(target_tests),$(work_dir_isa)/$(e))
target_elf_nosim = $(foreach e,$(addsuffix .elf, $(target_tests_nosim)),$(work_dir_isa)/$(e))
combined_elf = $(target_elf_nosim) $(target_elf)
target_log = $(patsubst %.elf,%.log,$(target_elf))
compile: $(target_elf)
run: $(target_log)
ifdef target_tests_nosim
compile: copy
# now copy must be performed before compile,
# allowing us to copy over outputs if they won't simulate on spike correctly.
endif
copy:
@mkdir -p $(work_dir_isa)
$(info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
$(info <<<<<<<<<<<<<<<<<<<<<<<<<<<< COPYING REFERENCES WITHOUT SIMULATING >>>>>>>>>>>>>>>>>>>>>>>>>>>>)
$(info !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
$(V) echo "Copying References without simulating"
$(V) for test in $(target_tests_nosim); do cp $(ref_dir)/$$test.reference_output $(work_dir_isa)/$$test.signature.output; done
compile: $(combined_elf)
run: $(target_log)
# note that run doesnt use the combined elf so it doesnt run the nosim tests.
#------------------------------------------------------------
# Clean up

View File

@ -31,8 +31,8 @@ rv64i_sc_tests = \
WALLY-MMU-SV39 \
WALLY-MMU-SV48 \
WALLY-PMP
# WALLY-PMA \
target_tests_nosim = WALLY-PMA \
rv64i_tests = $(addsuffix .elf, $(rv64i_sc_tests))