From b726b05d61203ded136260d6847a63dea5d4c0ec Mon Sep 17 00:00:00 2001 From: Daniel Torres Date: Fri, 22 Jul 2022 17:09:46 -0700 Subject: [PATCH] fixed wally rv32e tests, updated regression makefile to new testflow --- .gitignore | 1 + pipelined/regression/Makefile | 17 +++++---------- tests/riscof/Makefile | 21 +++++++++++++----- tests/riscof/spike/spike_rv32e_isa.yaml | 29 +++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 tests/riscof/spike/spike_rv32e_isa.yaml diff --git a/.gitignore b/.gitignore index 0c8a1655a..49d1e1603 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ testsBP/*/*.a tests/wally-riscv-arch-test/riscv-test-suite/*/I/*/* tests/riscof/riscof_work/ tests/riscof/config32.ini +tests/riscof/config32e.ini tests/riscof/config64.ini tests/linux-testgen/linux-testvectors/* !tests/linux-testgen/linux-testvectors/tvCopier.py diff --git a/pipelined/regression/Makefile b/pipelined/regression/Makefile index 5ad721722..6174464e4 100644 --- a/pipelined/regression/Makefile +++ b/pipelined/regression/Makefile @@ -1,4 +1,4 @@ -all: archtests wallytests memfiles +all: riscoftests memfiles # *** Build old tests/imperas-riscv-tests for now; # Delete this part when the privileged tests transition over to tests/wally-riscv-arch-test # DH: 2/27/22 temporarily commented out imperas-riscv-tests because license expired @@ -19,18 +19,13 @@ allclean: clean all clean: make clean -C ../../tests/riscof - make clean -C ../../tests/wally-riscv-arch-test +# make clean -C ../../tests/wally-riscv-arch-test # make allclean -C ../../tests/imperas-riscv-tests -archtests: - # Build riscv-arch-test 64 and 32-bit versions - make -C ../../tests/riscof/ --jobs - make -C ../../tests/riscof/ XLEN=32 --jobs - -wallytests: - # Build wally-riscv-arch-test - make -C ../../tests/wally-riscv-arch-test/ --jobs - make -C ../../tests/wally-riscv-arch-test/ XLEN=32 --jobs +riscoftests: +# Builds riscv-arch-test 64 and 32-bit versions and builds wally-riscv-arch-test 64 and 32-bit versions + make -C ../../tests/riscof/ + make -C ../../tests/riscof/ XLEN=32 memfiles: make -f makefile-memfile wally-sim-files --jobs diff --git a/tests/riscof/Makefile b/tests/riscof/Makefile index fffa0e454..e343d8354 100644 --- a/tests/riscof/Makefile +++ b/tests/riscof/Makefile @@ -8,7 +8,7 @@ wally_workdir = $(work)/wally-riscv-arch-test current_dir = $(shell pwd) XLEN ?= 64 -all: root build_arch #build_wally memfile +all: root build_rv32e build_wally build_arch root: mkdir -p $(work_dir) @@ -25,14 +25,24 @@ fsd_fld_tempfix: build_arch: fsd_fld_tempfix riscof run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(arch_dir)/riscv-test-suite/ --env=$(arch_dir)/riscv-test-suite/env --no-browser - rm -rf $(arch_workdir)/rv$(XLEN)i_m +# rm -rf $(arch_workdir)/rv$(XLEN)i_m rsync -a $(work_dir)/rv32i_m/ $(arch_workdir)/rv$(XLEN)i_m/ || echo "error suppressed" rsync -a $(work_dir)/rv64i_m/ $(arch_workdir)/rv$(XLEN)i_m/ || echo "error suppressed" build_wally: - riscof --verbose debug run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(wally_dir)/riscv-test-suite/ --env=$(wally_dir)/riscv-test-suite/env --no-browser --no-dut-run 2>&1 | tee log.txt - rm -rf $(wally_workdir)/rv$(XLEN)i_m - mv -f $(work_dir)/rv$(XLEN)i_m $(wally_workdir)/ + riscof run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(wally_dir)/riscv-test-suite/ --env=$(wally_dir)/riscv-test-suite/env --no-browser --no-dut-run +# riscof --verbose debug run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(wally_dir)/riscv-test-suite/ --env=$(wally_dir)/riscv-test-suite/env --no-browser --no-dut-run 2>&1 | tee log.txt +# rm -rf $(wally_workdir)/rv$(XLEN)i_m +# mv -f $(work_dir)/rv$(XLEN)i_m $(wally_workdir)/ + rsync -a $(work_dir)/rv32i_m/ $(wally_workdir)/rv$(XLEN)i_m/ || echo "error suppressed" + rsync -a $(work_dir)/rv64i_m/ $(wally_workdir)/rv$(XLEN)i_m/ || echo "error suppressed" + +build_rv32e: + sed 's,{0},$(current_dir),g;s,{1},32e,g' config.ini > config32e.ini + riscof run --work-dir=$(work_dir) --config=config32e.ini --suite=$(wally_dir)/riscv-test-suite/ --env=$(wally_dir)/riscv-test-suite/env --no-browser --no-dut-run +# riscof --verbose debug run --work-dir=$(work_dir) --config=config32e.ini --suite=$(wally_dir)/riscv-test-suite/ --env=$(wally_dir)/riscv-test-suite/env --no-browser --no-dut-run 2>&1 | tee log.txt + rsync -a $(work_dir)/rv32i_m/ $(wally_workdir)/rv32i_m/ || echo "error suppressed" + rsync -a $(work_dir)/rv32e_unratified/ $(wally_workdir)/rv32e_unratified/ || echo "error suppressed" memfile: find $(work) -type f -name "*.elf" | grep "rv64i_m" | while read f; do riscv64-unknown-elf-elf2hex --bit-width 64 --input "$$f" --output "$$f.memfile"; done @@ -42,6 +52,7 @@ memfile: clean: rm -f config64.ini rm -f config32.ini + rm -f config32e.ini rm -rf $(work_dir) rm -rf $(wally_workdir) rm -rf $(arch_workdir) \ No newline at end of file diff --git a/tests/riscof/spike/spike_rv32e_isa.yaml b/tests/riscof/spike/spike_rv32e_isa.yaml new file mode 100644 index 000000000..7ae54347a --- /dev/null +++ b/tests/riscof/spike/spike_rv32e_isa.yaml @@ -0,0 +1,29 @@ +hart_ids: [0] +hart0: + ISA: RV32EMFCZicsr_Zifencei + physical_addr_sz: 32 + User_Spec_Version: '2.3' + supported_xlen: [32] + misa: + reset-val: 0x40001034 + rv32: + accessible: true + mxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - mxl[1:0] in [0x1] + wr_illegal: + - Unchanged + extensions: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - extensions[25:0] bitmask [0x0001034, 0x0000000] + wr_illegal: + - Unchanged +