diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..670409b39 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +make all: submodules other +submodules: addins/riscv-isa-sim addins/riscv-arch-test + cd addins;git init; git submodule add https://github.com/riscv-non-isa/riscv-arch-test; git submodule add https://github.com/riscv-software-src/riscv-isa-sim + git submodule update --init --recursive + +other: + cp -r addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/I addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/F + cp -r addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/I addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/D + sed -i 's/--isa=rv32i /--isa=32if/' addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/F/Makefile.include + sed -i 's/--isa=rv32i /--isa=32if/' addins/riscv-isa-sim/arch_test_target/spike/device/rv32i_m/D/Makefile.include +ifneq ("$(wildcard $(addins/riscv-isa-sim/build/.*))",) +else + mkdir addins/riscv-isa-sim/build +endif + cd addins/riscv-isa-sim/build; ../configure --prefix=/cad/riscv/gcc/bin + make -C addins/riscv-isa-sim/ + sed -i '/export TARGETDIR ?=/c\export TARGETDIR ?= /home/harris/riscv-wally/addins/riscv-isa-sim/arch_test_target' tests/wally-riscv-arch-test/Makefile.include + echo export RISCV_PREFIX = riscv64-unknown-elf- >> tests/wally-riscv-arch-test/Makefile.include + make -C tests/wally-riscv-arch-test + make -C tests/wally-riscv-arch-test XLEN=32 + cd tests/wally-riscv-arch-test; exe2memfile.pl work/*/*/*.elf + make -C wally-pipelined/regression + + + + diff --git a/README.md b/README.md index b97a5efd3..bbde26148 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ cd ../wally-riscv-arch-test make make XLEN=32 exe2memfile.pl work/*/*/*.elf # converts ELF files to a format that can be read by Modelsim -cd ../../tests/linux-testgen/linux-testvectors +cd ../linux-testgen/linux-testvectors ./tvLinker.sh ``` diff --git a/tests/riscv-coremark/.gitignore b/benchmarks/riscv-coremark/.gitignore similarity index 100% rename from tests/riscv-coremark/.gitignore rename to benchmarks/riscv-coremark/.gitignore diff --git a/tests/riscv-coremark/.gitmodules b/benchmarks/riscv-coremark/.gitmodules similarity index 100% rename from tests/riscv-coremark/.gitmodules rename to benchmarks/riscv-coremark/.gitmodules diff --git a/tests/riscv-coremark/LICENSE b/benchmarks/riscv-coremark/LICENSE similarity index 100% rename from tests/riscv-coremark/LICENSE rename to benchmarks/riscv-coremark/LICENSE diff --git a/benchmarks/riscv-coremark/Makefile b/benchmarks/riscv-coremark/Makefile new file mode 100644 index 000000000..a6c819592 --- /dev/null +++ b/benchmarks/riscv-coremark/Makefile @@ -0,0 +1,16 @@ +work/coremark.bare.riscv.memfile: work/coremark.bare.riscv.objdump + exe2memfile.pl work/coremark.bare.riscv + +work/coremark.bare.riscv.objdump: work/coremark.bare.riscv + riscv64-unknown-elf-objdump -D work/coremark.bare.riscv > work/coremark.bare.riscv.objdump + +work/coremark.bare.riscv: + make -C coremark PORT_DIR=/home/harris/riscv-wally/benchmarks/riscv-coremark/riscv64-baremetal compile RISCV=/courses/e190ax/riscvcompiler XCFLAGS="-march=rv64im" + mv coremark/coremark.bare.riscv work + #make -C ../../addins/coremark PORT_DIR=/home/harris/riscv-wally/benchmarks/riscv-coremark/riscv64-baremetal compile RISCV=/courses/e190ax/riscvcompiler XCFLAGS="-march=rv64im" + #mv ../../addins/coremark/coremark.bare.riscv work + +.PHONY: clean + +clean: + rm -f work/* \ No newline at end of file diff --git a/tests/riscv-coremark/coremark/LICENSE.md b/benchmarks/riscv-coremark/coremark/LICENSE.md similarity index 100% rename from tests/riscv-coremark/coremark/LICENSE.md rename to benchmarks/riscv-coremark/coremark/LICENSE.md diff --git a/tests/riscv-coremark/coremark/Makefile b/benchmarks/riscv-coremark/coremark/Makefile similarity index 100% rename from tests/riscv-coremark/coremark/Makefile rename to benchmarks/riscv-coremark/coremark/Makefile diff --git a/tests/riscv-coremark/coremark/README.md b/benchmarks/riscv-coremark/coremark/README.md similarity index 100% rename from tests/riscv-coremark/coremark/README.md rename to benchmarks/riscv-coremark/coremark/README.md diff --git a/tests/riscv-coremark/coremark/barebones/core_portme.c b/benchmarks/riscv-coremark/coremark/barebones/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/barebones/core_portme.c rename to benchmarks/riscv-coremark/coremark/barebones/core_portme.c diff --git a/tests/riscv-coremark/coremark/barebones/core_portme.h b/benchmarks/riscv-coremark/coremark/barebones/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/barebones/core_portme.h rename to benchmarks/riscv-coremark/coremark/barebones/core_portme.h diff --git a/tests/riscv-coremark/coremark/barebones/core_portme.mak b/benchmarks/riscv-coremark/coremark/barebones/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/barebones/core_portme.mak rename to benchmarks/riscv-coremark/coremark/barebones/core_portme.mak diff --git a/tests/riscv-coremark/coremark/barebones/cvt.c b/benchmarks/riscv-coremark/coremark/barebones/cvt.c similarity index 100% rename from tests/riscv-coremark/coremark/barebones/cvt.c rename to benchmarks/riscv-coremark/coremark/barebones/cvt.c diff --git a/tests/riscv-coremark/coremark/barebones/ee_printf.c b/benchmarks/riscv-coremark/coremark/barebones/ee_printf.c similarity index 100% rename from tests/riscv-coremark/coremark/barebones/ee_printf.c rename to benchmarks/riscv-coremark/coremark/barebones/ee_printf.c diff --git a/tests/riscv-coremark/coremark/core_list_join.c b/benchmarks/riscv-coremark/coremark/core_list_join.c similarity index 100% rename from tests/riscv-coremark/coremark/core_list_join.c rename to benchmarks/riscv-coremark/coremark/core_list_join.c diff --git a/tests/riscv-coremark/coremark/core_main.c b/benchmarks/riscv-coremark/coremark/core_main.c similarity index 100% rename from tests/riscv-coremark/coremark/core_main.c rename to benchmarks/riscv-coremark/coremark/core_main.c diff --git a/tests/riscv-coremark/coremark/core_matrix.c b/benchmarks/riscv-coremark/coremark/core_matrix.c similarity index 100% rename from tests/riscv-coremark/coremark/core_matrix.c rename to benchmarks/riscv-coremark/coremark/core_matrix.c diff --git a/tests/riscv-coremark/coremark/core_state.c b/benchmarks/riscv-coremark/coremark/core_state.c similarity index 100% rename from tests/riscv-coremark/coremark/core_state.c rename to benchmarks/riscv-coremark/coremark/core_state.c diff --git a/tests/riscv-coremark/coremark/core_util.c b/benchmarks/riscv-coremark/coremark/core_util.c similarity index 100% rename from tests/riscv-coremark/coremark/core_util.c rename to benchmarks/riscv-coremark/coremark/core_util.c diff --git a/benchmarks/riscv-coremark/coremark/coremark.exe b/benchmarks/riscv-coremark/coremark/coremark.exe new file mode 100755 index 000000000..75b8e8468 Binary files /dev/null and b/benchmarks/riscv-coremark/coremark/coremark.exe differ diff --git a/tests/riscv-coremark/coremark/coremark.h b/benchmarks/riscv-coremark/coremark/coremark.h similarity index 100% rename from tests/riscv-coremark/coremark/coremark.h rename to benchmarks/riscv-coremark/coremark/coremark.h diff --git a/tests/riscv-coremark/coremark/coremark.md5 b/benchmarks/riscv-coremark/coremark/coremark.md5 similarity index 100% rename from tests/riscv-coremark/coremark/coremark.md5 rename to benchmarks/riscv-coremark/coremark/coremark.md5 diff --git a/tests/riscv-coremark/coremark/cygwin/core_portme.c b/benchmarks/riscv-coremark/coremark/cygwin/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/cygwin/core_portme.c rename to benchmarks/riscv-coremark/coremark/cygwin/core_portme.c diff --git a/tests/riscv-coremark/coremark/cygwin/core_portme.h b/benchmarks/riscv-coremark/coremark/cygwin/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/cygwin/core_portme.h rename to benchmarks/riscv-coremark/coremark/cygwin/core_portme.h diff --git a/tests/riscv-coremark/coremark/cygwin/core_portme.mak b/benchmarks/riscv-coremark/coremark/cygwin/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/cygwin/core_portme.mak rename to benchmarks/riscv-coremark/coremark/cygwin/core_portme.mak diff --git a/tests/riscv-coremark/coremark/docs/READM.md b/benchmarks/riscv-coremark/coremark/docs/READM.md similarity index 100% rename from tests/riscv-coremark/coremark/docs/READM.md rename to benchmarks/riscv-coremark/coremark/docs/READM.md diff --git a/tests/riscv-coremark/coremark/docs/balance_O0_joined.png b/benchmarks/riscv-coremark/coremark/docs/balance_O0_joined.png similarity index 100% rename from tests/riscv-coremark/coremark/docs/balance_O0_joined.png rename to benchmarks/riscv-coremark/coremark/docs/balance_O0_joined.png diff --git a/tests/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html b/benchmarks/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/core_list_join-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/core_list_join-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/core_list_join-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/core_list_join-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/core_main-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/core_main-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/core_main-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/core_main-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/core_matrix-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/core_matrix-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/core_matrix-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/core_matrix-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/core_state-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/core_state-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/core_state-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/core_state-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/core_util-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/core_util-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/core_util-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/core_util-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/coremark-h.html b/benchmarks/riscv-coremark/coremark/docs/html/files/coremark-h.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/coremark-h.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/coremark-h.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/docs/core_state.png b/benchmarks/riscv-coremark/coremark/docs/html/files/docs/core_state.png similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/docs/core_state.png rename to benchmarks/riscv-coremark/coremark/docs/html/files/docs/core_state.png diff --git a/tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html b/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html b/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html b/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/readme-txt.html b/benchmarks/riscv-coremark/coremark/docs/html/files/readme-txt.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/readme-txt.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/readme-txt.html diff --git a/tests/riscv-coremark/coremark/docs/html/files/release_notes-txt.html b/benchmarks/riscv-coremark/coremark/docs/html/files/release_notes-txt.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/files/release_notes-txt.html rename to benchmarks/riscv-coremark/coremark/docs/html/files/release_notes-txt.html diff --git a/tests/riscv-coremark/coremark/docs/html/index.html b/benchmarks/riscv-coremark/coremark/docs/html/index.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index.html rename to benchmarks/riscv-coremark/coremark/docs/html/index.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/BuildTargets.html b/benchmarks/riscv-coremark/coremark/docs/html/index/BuildTargets.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/BuildTargets.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/BuildTargets.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Configuration.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Configuration.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Configuration.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Configuration.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Configurations.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Configurations.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Configurations.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Configurations.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Files.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Files.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Files.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Files.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Functions.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Functions.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Functions.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Functions.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/General.html b/benchmarks/riscv-coremark/coremark/docs/html/index/General.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/General.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/General.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/General2.html b/benchmarks/riscv-coremark/coremark/docs/html/index/General2.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/General2.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/General2.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Types.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Types.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Types.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Types.html diff --git a/tests/riscv-coremark/coremark/docs/html/index/Variables.html b/benchmarks/riscv-coremark/coremark/docs/html/index/Variables.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/index/Variables.html rename to benchmarks/riscv-coremark/coremark/docs/html/index/Variables.html diff --git a/tests/riscv-coremark/coremark/docs/html/javascript/main.js b/benchmarks/riscv-coremark/coremark/docs/html/javascript/main.js similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/javascript/main.js rename to benchmarks/riscv-coremark/coremark/docs/html/javascript/main.js diff --git a/tests/riscv-coremark/coremark/docs/html/javascript/searchdata.js b/benchmarks/riscv-coremark/coremark/docs/html/javascript/searchdata.js similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/javascript/searchdata.js rename to benchmarks/riscv-coremark/coremark/docs/html/javascript/searchdata.js diff --git a/tests/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html b/benchmarks/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationC.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationC.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationC.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationC.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationH.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationH.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationH.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationH.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationM.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationM.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationM.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationM.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationS.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationT.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationT.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationT.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationT.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationU.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationU.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationU.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationU.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html b/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FilesC.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FilesC.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FilesC.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FilesC.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FilesR.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FilesR.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FilesR.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FilesR.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsC.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsC.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsC.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsC.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsG.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsG.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsG.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsG.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsI.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsI.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsI.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsI.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsM.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsM.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsM.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsM.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsP.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsP.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsP.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsP.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsS.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/FunctionsT.html b/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsT.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/FunctionsT.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsT.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralB.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralB.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralB.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralB.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralC.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralC.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralC.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralC.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralD.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralD.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralD.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralD.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralF.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralF.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralF.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralF.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralG.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralG.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralG.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralG.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralH.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralH.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralH.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralH.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralI.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralI.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralI.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralI.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralL.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralL.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralL.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralL.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralM.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralM.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralM.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralM.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralO.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralO.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralO.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralO.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralP.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralP.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralP.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralP.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralR.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralR.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralR.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralR.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralS.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralT.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralT.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralT.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralT.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralU.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralU.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralU.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralU.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralV.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralV.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralV.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralV.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/GeneralW.html b/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralW.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/GeneralW.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/GeneralW.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/NoResults.html b/benchmarks/riscv-coremark/coremark/docs/html/search/NoResults.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/NoResults.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/NoResults.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/TypesS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/TypesS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/TypesS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/TypesS.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesC.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesC.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesC.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesC.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesD.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesD.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesD.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesD.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesL.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesL.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesL.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesL.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesO.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesO.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesO.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesO.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesP.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesP.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesP.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesP.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesR.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesR.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesR.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesR.html diff --git a/tests/riscv-coremark/coremark/docs/html/search/VariablesS.html b/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesS.html similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/search/VariablesS.html rename to benchmarks/riscv-coremark/coremark/docs/html/search/VariablesS.html diff --git a/tests/riscv-coremark/coremark/docs/html/styles/1.css b/benchmarks/riscv-coremark/coremark/docs/html/styles/1.css similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/styles/1.css rename to benchmarks/riscv-coremark/coremark/docs/html/styles/1.css diff --git a/tests/riscv-coremark/coremark/docs/html/styles/2.css b/benchmarks/riscv-coremark/coremark/docs/html/styles/2.css similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/styles/2.css rename to benchmarks/riscv-coremark/coremark/docs/html/styles/2.css diff --git a/tests/riscv-coremark/coremark/docs/html/styles/main.css b/benchmarks/riscv-coremark/coremark/docs/html/styles/main.css similarity index 100% rename from tests/riscv-coremark/coremark/docs/html/styles/main.css rename to benchmarks/riscv-coremark/coremark/docs/html/styles/main.css diff --git a/tests/riscv-coremark/coremark/freebsd/core_portme.mak b/benchmarks/riscv-coremark/coremark/freebsd/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/freebsd/core_portme.mak rename to benchmarks/riscv-coremark/coremark/freebsd/core_portme.mak diff --git a/tests/riscv-coremark/coremark/linux/core_portme.c b/benchmarks/riscv-coremark/coremark/linux/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/linux/core_portme.c rename to benchmarks/riscv-coremark/coremark/linux/core_portme.c diff --git a/tests/riscv-coremark/coremark/linux/core_portme.h b/benchmarks/riscv-coremark/coremark/linux/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/linux/core_portme.h rename to benchmarks/riscv-coremark/coremark/linux/core_portme.h diff --git a/tests/riscv-coremark/coremark/linux/core_portme.mak b/benchmarks/riscv-coremark/coremark/linux/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/linux/core_portme.mak rename to benchmarks/riscv-coremark/coremark/linux/core_portme.mak diff --git a/tests/riscv-coremark/coremark/linux64/core_portme.c b/benchmarks/riscv-coremark/coremark/linux64/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/linux64/core_portme.c rename to benchmarks/riscv-coremark/coremark/linux64/core_portme.c diff --git a/tests/riscv-coremark/coremark/linux64/core_portme.h b/benchmarks/riscv-coremark/coremark/linux64/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/linux64/core_portme.h rename to benchmarks/riscv-coremark/coremark/linux64/core_portme.h diff --git a/tests/riscv-coremark/coremark/linux64/core_portme.mak b/benchmarks/riscv-coremark/coremark/linux64/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/linux64/core_portme.mak rename to benchmarks/riscv-coremark/coremark/linux64/core_portme.mak diff --git a/tests/riscv-coremark/coremark/macos/core_portme.mak b/benchmarks/riscv-coremark/coremark/macos/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/macos/core_portme.mak rename to benchmarks/riscv-coremark/coremark/macos/core_portme.mak diff --git a/tests/riscv-coremark/coremark/posix/core_portme.c b/benchmarks/riscv-coremark/coremark/posix/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/posix/core_portme.c rename to benchmarks/riscv-coremark/coremark/posix/core_portme.c diff --git a/tests/riscv-coremark/coremark/posix/core_portme.h b/benchmarks/riscv-coremark/coremark/posix/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/posix/core_portme.h rename to benchmarks/riscv-coremark/coremark/posix/core_portme.h diff --git a/tests/riscv-coremark/coremark/posix/core_portme.mak b/benchmarks/riscv-coremark/coremark/posix/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/posix/core_portme.mak rename to benchmarks/riscv-coremark/coremark/posix/core_portme.mak diff --git a/tests/riscv-coremark/coremark/posix/core_portme_posix_overrides.h b/benchmarks/riscv-coremark/coremark/posix/core_portme_posix_overrides.h similarity index 100% rename from tests/riscv-coremark/coremark/posix/core_portme_posix_overrides.h rename to benchmarks/riscv-coremark/coremark/posix/core_portme_posix_overrides.h diff --git a/tests/riscv-coremark/coremark/rtems/core_portme.mak b/benchmarks/riscv-coremark/coremark/rtems/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/rtems/core_portme.mak rename to benchmarks/riscv-coremark/coremark/rtems/core_portme.mak diff --git a/tests/riscv-coremark/coremark/rtems/init.c b/benchmarks/riscv-coremark/coremark/rtems/init.c similarity index 100% rename from tests/riscv-coremark/coremark/rtems/init.c rename to benchmarks/riscv-coremark/coremark/rtems/init.c diff --git a/tests/riscv-coremark/coremark/simple/core_portme.c b/benchmarks/riscv-coremark/coremark/simple/core_portme.c similarity index 100% rename from tests/riscv-coremark/coremark/simple/core_portme.c rename to benchmarks/riscv-coremark/coremark/simple/core_portme.c diff --git a/tests/riscv-coremark/coremark/simple/core_portme.h b/benchmarks/riscv-coremark/coremark/simple/core_portme.h similarity index 100% rename from tests/riscv-coremark/coremark/simple/core_portme.h rename to benchmarks/riscv-coremark/coremark/simple/core_portme.h diff --git a/tests/riscv-coremark/coremark/simple/core_portme.mak b/benchmarks/riscv-coremark/coremark/simple/core_portme.mak similarity index 100% rename from tests/riscv-coremark/coremark/simple/core_portme.mak rename to benchmarks/riscv-coremark/coremark/simple/core_portme.mak diff --git a/tests/riscv-coremark/README.md b/benchmarks/riscv-coremark/old/README.md similarity index 100% rename from tests/riscv-coremark/README.md rename to benchmarks/riscv-coremark/old/README.md diff --git a/tests/riscv-coremark/extraPortmes/README.md b/benchmarks/riscv-coremark/old/extraPortmes/README.md similarity index 100% rename from tests/riscv-coremark/extraPortmes/README.md rename to benchmarks/riscv-coremark/old/extraPortmes/README.md diff --git a/tests/riscv-coremark/extraPortmes/cygwin/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.c similarity index 100% rename from tests/riscv-coremark/extraPortmes/cygwin/core_portme.c rename to benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.c diff --git a/tests/riscv-coremark/extraPortmes/cygwin/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.h similarity index 100% rename from tests/riscv-coremark/extraPortmes/cygwin/core_portme.h rename to benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.h diff --git a/tests/riscv-coremark/extraPortmes/cygwin/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.mak similarity index 100% rename from tests/riscv-coremark/extraPortmes/cygwin/core_portme.mak rename to benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.mak diff --git a/tests/riscv-coremark/extraPortmes/linux/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.c similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux/core_portme.c rename to benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.c diff --git a/tests/riscv-coremark/extraPortmes/linux/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.h similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux/core_portme.h rename to benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.h diff --git a/tests/riscv-coremark/extraPortmes/linux/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.mak similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux/core_portme.mak rename to benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.mak diff --git a/tests/riscv-coremark/extraPortmes/linux64/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.c similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux64/core_portme.c rename to benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.c diff --git a/tests/riscv-coremark/extraPortmes/linux64/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.h similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux64/core_portme.h rename to benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.h diff --git a/tests/riscv-coremark/extraPortmes/linux64/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.mak similarity index 100% rename from tests/riscv-coremark/extraPortmes/linux64/core_portme.mak rename to benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.mak diff --git a/tests/riscv-coremark/riscv64/core_portme.c b/benchmarks/riscv-coremark/old/riscv64/core_portme.c similarity index 100% rename from tests/riscv-coremark/riscv64/core_portme.c rename to benchmarks/riscv-coremark/old/riscv64/core_portme.c diff --git a/tests/riscv-coremark/riscv64/core_portme.h b/benchmarks/riscv-coremark/old/riscv64/core_portme.h similarity index 100% rename from tests/riscv-coremark/riscv64/core_portme.h rename to benchmarks/riscv-coremark/old/riscv64/core_portme.h diff --git a/tests/riscv-coremark/riscv64/core_portme.mak b/benchmarks/riscv-coremark/old/riscv64/core_portme.mak similarity index 100% rename from tests/riscv-coremark/riscv64/core_portme.mak rename to benchmarks/riscv-coremark/old/riscv64/core_portme.mak diff --git a/tests/riscv-coremark/trace b/benchmarks/riscv-coremark/old/trace similarity index 100% rename from tests/riscv-coremark/trace rename to benchmarks/riscv-coremark/old/trace diff --git a/benchmarks/riscv-coremark/old/transferobjdump.sh b/benchmarks/riscv-coremark/old/transferobjdump.sh new file mode 100755 index 000000000..69578566a --- /dev/null +++ b/benchmarks/riscv-coremark/old/transferobjdump.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +./build-coremark.sh + +riscv64-unknown-elf-objdump -D coremark.bare.riscv > coremarkcodemod.bare.riscv.objdump +cp coremarkcodemod.bare.riscv.objdump ~/riscv-wally/tests/imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark/. +pushd ~/riscv-wally/tests/imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark +./exe2memfile.pl coremarkcodemod.bare.riscv +popd diff --git a/tests/riscv-coremark/riscv64-baremetal/core_portme.c b/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.c similarity index 98% rename from tests/riscv-coremark/riscv64-baremetal/core_portme.c rename to benchmarks/riscv-coremark/riscv64-baremetal/core_portme.c index 43e204a57..cad8b766d 100755 --- a/tests/riscv-coremark/riscv64-baremetal/core_portme.c +++ b/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.c @@ -195,8 +195,11 @@ void stop_time(void) { */ CORE_TICKS get_time(void) { CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val)); - //ee_printf(" Elapsed MTIME: %u\n", elapsed); - //ee_printf(" Elapsed MINSTRET: %lu\n", minstretDiff()); + unsigned long instructions = minstretDiff(); +/* double CPI = elapsed / instructions; + ee_printf(" Elapsed MTIME: %u\n", elapsed); + ee_printf(" Elapsed MINSTRET: %lu\n", instructions); + ee_printf(" CPI: %lf", CPI); */ return elapsed; } /* Function: time_in_secs diff --git a/tests/riscv-coremark/riscv64-baremetal/core_portme.h b/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.h similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/core_portme.h rename to benchmarks/riscv-coremark/riscv64-baremetal/core_portme.h diff --git a/tests/riscv-coremark/riscv64-baremetal/core_portme.mak b/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.mak similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/core_portme.mak rename to benchmarks/riscv-coremark/riscv64-baremetal/core_portme.mak diff --git a/tests/riscv-coremark/riscv64-baremetal/crt.S b/benchmarks/riscv-coremark/riscv64-baremetal/crt.S similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/crt.S rename to benchmarks/riscv-coremark/riscv64-baremetal/crt.S diff --git a/tests/riscv-coremark/riscv64-baremetal/encoding.h b/benchmarks/riscv-coremark/riscv64-baremetal/encoding.h similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/encoding.h rename to benchmarks/riscv-coremark/riscv64-baremetal/encoding.h diff --git a/tests/riscv-coremark/riscv64-baremetal/link.ld b/benchmarks/riscv-coremark/riscv64-baremetal/link.ld similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/link.ld rename to benchmarks/riscv-coremark/riscv64-baremetal/link.ld diff --git a/tests/riscv-coremark/riscv64-baremetal/syscallbackup.c b/benchmarks/riscv-coremark/riscv64-baremetal/syscallbackup.c similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/syscallbackup.c rename to benchmarks/riscv-coremark/riscv64-baremetal/syscallbackup.c diff --git a/tests/riscv-coremark/riscv64-baremetal/syscalls.c b/benchmarks/riscv-coremark/riscv64-baremetal/syscalls.c similarity index 99% rename from tests/riscv-coremark/riscv64-baremetal/syscalls.c rename to benchmarks/riscv-coremark/riscv64-baremetal/syscalls.c index c1824954f..093c6fa23 100644 --- a/tests/riscv-coremark/riscv64-baremetal/syscalls.c +++ b/benchmarks/riscv-coremark/riscv64-baremetal/syscalls.c @@ -7,6 +7,7 @@ #include #include #include "util.h" +#include #define SYS_write 64 @@ -80,6 +81,7 @@ void __attribute__((noreturn)) tohost_exit(uintptr_t code) { tohost = (code << 1) | 1; asm ("ecall"); + exit(0); } uintptr_t __attribute__((weak)) handle_trap(uintptr_t cause, uintptr_t epc, uintptr_t regs[32]) diff --git a/tests/riscv-coremark/riscv64-baremetal/util.h b/benchmarks/riscv-coremark/riscv64-baremetal/util.h similarity index 100% rename from tests/riscv-coremark/riscv64-baremetal/util.h rename to benchmarks/riscv-coremark/riscv64-baremetal/util.h diff --git a/wally-pipelined/bin/exe2memfile.pl b/bin/exe2memfile.pl similarity index 97% rename from wally-pipelined/bin/exe2memfile.pl rename to bin/exe2memfile.pl index 26d0d2f42..70666b1f3 100755 --- a/wally-pipelined/bin/exe2memfile.pl +++ b/bin/exe2memfile.pl @@ -19,10 +19,12 @@ my $maxaddress = 0; STDOUT->autoflush(1); my $numfiles = $#ARGV+1; -print ("Processing $numfiles memfiles: "); +if ($numfiles > 1) { + print ("Processing $numfiles memfiles: "); +} my $frac = $#ARGV/10; for(my $i=0; $i<=$#ARGV; $i++) { - if ($i < 10 || $i % $frac == 0) { print ("$i ") }; + if ($i > 0 && ($i < 10 || $i % $frac == 0)) { print ("$i ") }; my $fname = $ARGV[$i]; # print "fname = $fname"; my $ofile = $fname.".objdump"; diff --git a/wally-pipelined/bin/extractFunctionRadix.sh b/bin/extractFunctionRadix.sh similarity index 100% rename from wally-pipelined/bin/extractFunctionRadix.sh rename to bin/extractFunctionRadix.sh diff --git a/tests/linux-testgen/testvector-generation/checkpointSweep.sh b/tests/linux-testgen/testvector-generation/checkpointSweep.sh index bc04bbf78..01f05ea65 100755 --- a/tests/linux-testgen/testvector-generation/checkpointSweep.sh +++ b/tests/linux-testgen/testvector-generation/checkpointSweep.sh @@ -1,5 +1,5 @@ -for index in {0..105} +for index in {89..181} do - instrs=$(((400+$index)*1000000)) - echo "y" | ./genCheckpoint.sh $instrs + instrs=$(($index*1000000)) + echo "y" | nice -n 5 ./genCheckpoint.sh $instrs done diff --git a/tests/linux-testgen/testvector-generation/parseState.py b/tests/linux-testgen/testvector-generation/parseState.py index 9a2173b04..bbbf535ba 100755 --- a/tests/linux-testgen/testvector-generation/parseState.py +++ b/tests/linux-testgen/testvector-generation/parseState.py @@ -34,7 +34,8 @@ stateGDBpath = outDir+'intermediate-outputs/stateGDB.txt' if not os.path.exists(stateGDBpath): sys.exit('Error input file '+stateGDBpath+'not found') -singleCSRs = ['pc','mip','mie','mscratch','mcause','mepc','mtvec','medeleg','mideleg','sscratch','scause','sepc','stvec','sedeleg','sideleg','satp','mstatus'] +singleCSRs = ['pc','mip','mie','mscratch','mcause','mepc','mtvec','medeleg','mideleg','sscratch','scause','sepc','stvec','sedeleg','sideleg','satp','mstatus','priv'] +# priv (current privilege mode) isn't technically a CSR but we can log it with the same machinery thirtyTwoBitCSRs = ['mcounteren','scounteren'] listCSRs = ['hpmcounter','pmpaddr'] pmpcfg = ['pmpcfg'] @@ -75,7 +76,7 @@ with open(stateGDBpath, 'r') as stateGDB: outFile = open(outDir+outFileName, 'w') outFile.write(val+'\n') outFile.close() - if name in thirtyTwoBitCSRs: + elif name in thirtyTwoBitCSRs: outFileName = 'checkpoint-'+name.upper() outFile = open(outDir+outFileName, 'w') val = int(val,16) & 0xffffffff diff --git a/tests/riscv-coremark/build-coremark.sh b/tests/riscv-coremark/build-coremark.sh deleted file mode 100755 index bdd100725..000000000 --- a/tests/riscv-coremark/build-coremark.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -BASEDIR=$PWD -CM_FOLDER=coremark -#RISCV=/home/ehedenberg/riscvcompiler -RISCV=/courses/e190ax/riscvcompiler -XCFLAGS="-march=rv64im" -cd $BASEDIR/$CM_FOLDER - -# run the compile -echo "Start compilation" -#make PORT_DIR=../riscv64 compile RISCV=$RISCV -#mv coremark.riscv ../ - -make PORT_DIR=../riscv64-baremetal compile RISCV=$RISCV XCFLAGS=$XCFLAGS -mv coremark.bare.riscv ../ diff --git a/tests/riscv-coremark/transferobjump.sh b/tests/riscv-coremark/transferobjump.sh deleted file mode 100755 index f27f73f5b..000000000 --- a/tests/riscv-coremark/transferobjump.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -./build-coremark.sh - -riscv64-unknown-elf-objdump -D coremark.bare.riscv > coremarkcodemod.bare.riscv.objdump -cp coremarkcodemod.bare.riscv.objdump ~/riscv-wally/imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark/. -pushd ~/riscv-wally/imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark -./exe2memfile.pl coremarkcodemod.bare.riscv -popd diff --git a/wally-pipelined/bin/exe2memfile.pl.old b/wally-pipelined/bin/exe2memfile.pl.old deleted file mode 100755 index f02068d90..000000000 --- a/wally-pipelined/bin/exe2memfile.pl.old +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/perl -w - -# exe2memfile.pl -# David_Harris@hmc.edu 26 November 2020 -# Converts an executable file to a series of 32-bit hex instructions -# to read into a Verilog simulation with $readmemh - -use File::stat; -use IO::Handle; - -if ($#ARGV == -1) { - die("Usage: $0 executable_file"); -} - -# array to hold contents of memory file -my @memfilebytes = (0)*16384*4; -my $maxaddress = 0; - -STDOUT->autoflush(1); -# *** Ross Thompson I think there is a bug here needs to be +1 -print ("Processing $#ARGV memfiles: \n"); -my $frac = $#ARGV/10; -for(my $i=0; $i<=$#ARGV; $i++) { - if ($i < 10 || $i % $frac == 0) { print ("$i ") }; - my $fname = $ARGV[$i]; -# print "fname = $fname"; - my $ofile = $fname.".objdump"; - my $memfile = $fname.".memfile"; - - my $needsprocessing = 0; - if (!-e $memfile) { $needsprocessing = 1; } # create memfile if it doesn't exist - else { - my $osb = stat($ofile) || die("Can't stat $ofile"); - my $msb = stat($memfile) || die("Can't stat $memfile"); - my $otime = $osb->mtime; - my $mtime = $msb->mtime; - if ($otime > $mtime) { $needsprocessing = 1; } # is memfile out of date? - } - - if ($needsprocessing == 1) { - open(FILE, $ofile) || die("Can't read $ofile"); - my $mode = 0; # parse for code - my $section = ""; - my $data = ""; - my $address; - my $first = 0; - my $firstAddress; - - # initialize to all zeros; - # *** need to fix the zeroing range. Not always 64K - for (my $i=0; $i < 65536*4; $i++) { - $memfilebytes[$i] = "00"; - } - - while() { - # objdump fill is divided into several .sections of which only some we want to actually process. - # In general we want everything except the .comment and .*attributes - if (/Disassembly of section (.*):/) { - $section = $1; - print ("setting section to $section\n"); - } else { - # now check if the section is one we are interested in processing. - #if ($section ne ".comment" && $section ne ".riscv.attributes" && $section =~ /\.debug.*/) { - if ($section =~ "\.init|\.text|\..*data|\..*bss") { - # the structure is: possible space(s) hex number: possible space(s) hex number space(s) junk - # there are also lines we need to skip: possible space(s) hex number : - if (/^\s*([0-9A-Fa-f]{1,16}):\s+([0-9A-Fa-f]+).*$/) { - $address = &fixadr($1); - if ($first == 0) { - $first = 1; - $firstAddress = $address; - } - $data = $2; - &emitData($address, $data); - # my $len = length($data); - # for (my $i=0; $i<$len/2; $i++) { - # $memfilebytes[$address+$i] = substr($data, $len-2-2*$i, 2); - # } -# print ("Addr $address $data\n"); -# } elsif (/^\s*\.\.\./) { -# print ("Got ...\n"); -# } else { -# print ("No match\n"); - } - } - } -# # *** this mode stuff does not work if a section is missing or reordered. -# if ($mode == 0) { # Parse code -# # print("Examining $_\n"); -# if (/^\s*(\S{1,16}):\s+(\S+)\s+/) { -# $address = &fixadr($1); -# my $instr = $2; -# my $len = length($instr); -# for (my $i=0; $i<$len/2; $i++) { -# $memfilebytes[$address+$i] = substr($instr, $len-2-2*$i, 2); -# } -# print ("address $address $instr\n"); -# } -# if (/Disassembly of section .data:/) { $mode = 1;} -# } elsif ($mode == 1) { # Parse data segment -# if (/^\s*(\S{1,16}):\s+(.*)/) { -# $address = &fixadr($1); -# # print "addresss $address maxaddress $maxaddress\n"; -# if ($address > $maxaddress) { $maxaddress = $address; } -# my $line = $2; -# # merge chunks with spaces -# # *** might need to change -# $line =~ s/(\S)\s(\S)/$1$2/g; -# # strip off comments -# $line =~ /^(\S*)/; -# $payload = $1; -# &emitData($address, $payload); -# } -# if (/Disassembly of section .comment:/) { $mode = 2; } -# } elsif ($mode == 2) { # parse the comment section -# if (/Disassembly of section .riscv.attributes:/) { $mode = 3; } -# } - } - close(FILE); - $maxaddress = $address + 32; # pad some zeros at the end - - # print to memory file - # *** this is a problem - if ($fname =~ /rv32/) { - open(MEMFILE, ">$memfile") || die("Can't write $memfile"); - for (my $i=$firstAddress; $i<= $maxaddress; $i = $i + 4) { - for ($j=3; $j>=0; $j--) { - no warnings 'uninitialized'; - my $value = $memfilebytes[$i+$j]; - if ($value eq ""){ - print MEMFILE "00"; - } else { - print MEMFILE "$memfilebytes[$i+$j]"; - } - } - print MEMFILE "\n"; - } - close(MEMFILE); - } else { - open(MEMFILE, ">$memfile") || die("Can't write $memfile"); - for (my $i=$firstAddress; $i<= $maxaddress; $i = $i + 8) { - for ($j=7; $j>=0; $j--) { - no warnings 'uninitialized'; - my $value = $memfilebytes[$i+$j]; - if ($value eq ""){ - print MEMFILE "00"; - } else { - print MEMFILE "$memfilebytes[$i+$j]"; - } - } - print MEMFILE "\n"; - } - close(MEMFILE); - } - } -} -print("\n"); - -sub emitData { - # print the data portion of the ELF into a memroy file, including 0s for empty stuff - # deal with endianness - my $address = shift; - my $payload = shift; - -# print("Emitting data. address = $address payload = $payload\n"); - - my $len = length($payload); - if ($len <= 8) { - # print word or halfword - for(my $i=0; $i<$len/2; $i++) { - my $adr = $address+$i; - my $b = substr($payload, $len-2-2*$i, 2); - $memfilebytes[$adr] = $b; -# print(" $adr $b\n"); - } - } elsif ($len == 12) { - # weird case of three halfwords on line - &emitData($address, substr($payload, 0, 4)); - &emitData($address+2, substr($payload, 4, 4)); - &emitData($address+4, substr($payload, 8, 4)); - } else { - &emitData($address, substr($payload, 0, 8)); - &emitData($address+4, substr($payload, 8, $len-8)); - } -} - -sub fixadr { - # strip off leading 8 from address and convert to decimal - # if the leading 8 is not present don't remove. - my $adr = shift; - #print "addr $adr\n"; - - # start at 0 - return hex($adr); - - # start at 8 - #if ($adr =~ s/^8/0/) { return hex($adr); } - #else { return hex($adr) } - -} diff --git a/wally-pipelined/regression/Makefile b/wally-pipelined/regression/Makefile index cdebb5c08..ad6e427d7 100644 --- a/wally-pipelined/regression/Makefile +++ b/wally-pipelined/regression/Makefile @@ -1,6 +1,6 @@ make all: - make ../../tests/imperas-riscv-tests/ - make ../../tests/wally-riscv-arch-test/ - make XLEN=32 ../../tests/wally-riscv-arch-test/ + make -C ../../tests/imperas-riscv-tests/ + make -C ../../tests/wally-riscv-arch-test/ + make -C XLEN=32 ../../tests/wally-riscv-arch-test/ exe2memfile.pl ../../tests/wally-riscv-arch-test/work/*/*/*.elf cd ../../tests/linux-testgen/linux-testvectors/;./tvLinker.sh diff --git a/wally-pipelined/regression/buildrootBugFinder.py b/wally-pipelined/regression/buildrootBugFinder.py new file mode 100755 index 000000000..a20b7bf57 --- /dev/null +++ b/wally-pipelined/regression/buildrootBugFinder.py @@ -0,0 +1,41 @@ +#!/usr/bin/python3 +import sys, os, subprocess + +def main(): + maxGoodCount = 400e6 # num instrs that execute sucessfully starting from 0 + currInstrCount = maxGoodCount + linuxTestvectors = "../../tests/linux-testgen/linux-testvectors" + if not os.path.exists(linuxTestvectors): + sys.stderr.write("Error: Linux testvectors not found at "+linuxTestvectors+"\n") + exit(1) + checkpointList = [int(fileName.strip('checkpoint')) for fileName in os.listdir(linuxTestvectors) if 'checkpoint' in fileName] + checkpointList.sort() + + logDir = "./logs/buildrootBugFinderLogs/" + os.system("mkdir -p "+logDir) + summaryLogFilePath = logDir+"summary.log" + summaryLogFile = open(summaryLogFilePath,'w') + summaryLogFile.close() + while True: + checkpointList = [checkpoint for checkpoint in checkpointList if checkpoint > currInstrCount] + if len(checkpointList)==0: + break + checkpoint = checkpointList[0] + logFile = logDir+"checkpoint"+str(checkpoint)+".log" + runCommand="{\nvsim -c <" prompt: -# do wally-coremark.do -# or, to run from a shell, type the following at the shell prompt: -# vsim -do wally-coremark.do -c -# (omit the "-c" to see the GUI while running from the shell) - -onbreak {resume} - -# create library -if [file exists work] { - vdel -all -} -vlib work - -# compile source files -# suppress spurious warnngs about -# "Extra checking for conflicts with always_comb done at vopt time" -# because vsim will run vopt - -# default to config/coremark, but allow this to be overridden at the command line. For example: -vlog +incdir+../config/coremark_bare +incdir+../config/shared ../testbench/testbench-coremark_bare.sv ../testbench/common/*.sv ../src/*/*.sv -suppress 2583 - -# start and run simulation -# remove +acc flag for faster sim during regressions if there is no need to access internal signals -vopt +acc work.testbench -o workopt -vsim workopt - -mem load -startaddress 268435456 -endaddress 268566527 -filltype value -fillradix hex -filldata 0 /testbench/dut/uncore/dtim/RAM - -view wave - --- display input and output signals as hexidecimal values -# Diplays All Signals recursively -add wave /testbench/clk -add wave /testbench/reset -add wave -divider -#add wave /testbench/dut/hart/ebu/IReadF -#add wave /testbench/dut/hart/DataStall -#add wave /testbench/dut/hart/InstrStall -#add wave /testbench/dut/hart/StallF -#add wave /testbench/dut/hart/StallD -#add wave /testbench/dut/hart/FlushD -#add wave /testbench/dut/hart/FlushE -#add wave /testbench/dut/hart/FlushM -#add wave /testbench/dut/hart/FlushW - -add wave -divider Fetch -add wave -hex /testbench/dut/hart/ifu/PCF -add wave -hex /testbench/dut/hart/ifu/icache/controller/FinalInstrRawF -add wave /testbench/InstrFName -add wave -divider Decode -add wave -hex /testbench/dut/hart/ifu/PCD -add wave -hex /testbench/dut/hart/ifu/InstrD -add wave /testbench/InstrDName -add wave -divider Execute -add wave -hex /testbench/dut/hart/ifu/PCE -add wave -hex /testbench/dut/hart/ifu/InstrE -add wave /testbench/InstrEName -add wave -divider Memory -add wave -hex /testbench/dut/hart/ifu/PCM -add wave -hex /testbench/dut/hart/ifu/InstrM -add wave /testbench/InstrMName -add wave -divider Write -add wave -hex /testbench/PCW -add wave -hex /testbench/InstrW -add wave /testbench/InstrWName -#add wave -hex /testbench/dut/hart/ieu/dp/SrcAE -#add wave -hex /testbench/dut/hart/ieu/dp/SrcBE -#add wave -hex /testbench/dut/hart/ieu/dp/ALUResultE -#add wave /testbench/dut/hart/ieu/dp/PCSrcE -add wave -divider Regfile_signals -#add wave /testbench/dut/uncore/dtim/memwrite -#add wave -hex /testbench/dut/uncore/HADDR -#add wave -hex /testbench/dut/uncore/HWDATA -#add wave -divider -#add wave -hex /testbench/PCW -#add wave /testbench/InstrWName -#add wave /testbench/dut/hart/ieu/dp/RegWriteW -#add wave -hex /testbench/dut/hart/ieu/dp/ResultW -#add wave -hex /testbench/dut/hart/ieu/dp/RdW -add wave -hex -r /testbench/dut/hart/ieu/dp/regf/* -add wave -divider Regfile_itself -add wave -hex -r /testbench/dut/hart/ieu/dp/regf/rf -add wave -divider RAM -#add wave -hex -r /testbench/dut/uncore/dtim/RAM -add wave -divider Misc -add wave -divider -#add wave -hex -r /testbench/* - --- Set Wave Output Items -TreeUpdate [SetDefaultTree] -WaveRestoreZoom {0 ps} {100 ps} -configure wave -namecolwidth 250 -configure wave -valuecolwidth 120 -configure wave -justifyvalue left -configure wave -signalnamewidth 0 -configure wave -snapdistance 10 -configure wave -datasetprefix 0 -configure wave -rowmargin 4 -configure wave -childrowmargin 2 -set DefaultRadix hexadecimal - --- Run the Simulation -#run 7402000 -#run 12750 -run -all -#run 21400 -#quit diff --git a/wally-pipelined/regression/regression-wally.py b/wally-pipelined/regression/regression-wally.py index d1008532b..c55e8b617 100755 --- a/wally-pipelined/regression/regression-wally.py +++ b/wally-pipelined/regression/regression-wally.py @@ -32,7 +32,7 @@ configs = [ ] def getBuildrootTC(short): INSTR_LIMIT = 100000 # multiple of 100000 - MAX_EXPECTED = 14000000 + MAX_EXPECTED = 182000000 if short: BRcmd="vsim > {} -c < {} -c <