diff --git a/benchmarks/riscv-coremark/.gitignore b/benchmarks/coremark/.gitignore similarity index 100% rename from benchmarks/riscv-coremark/.gitignore rename to benchmarks/coremark/.gitignore diff --git a/benchmarks/riscv-coremark/.gitmodules b/benchmarks/coremark/.gitmodules similarity index 79% rename from benchmarks/riscv-coremark/.gitmodules rename to benchmarks/coremark/.gitmodules index 938028cb7..678afc830 100644 --- a/benchmarks/riscv-coremark/.gitmodules +++ b/benchmarks/coremark/.gitmodules @@ -1,3 +1,3 @@ [submodule "coremark"] - path = coremark + path = src url = https://github.com/eembc/coremark diff --git a/benchmarks/riscv-coremark/LICENSE b/benchmarks/coremark/LICENSE similarity index 100% rename from benchmarks/riscv-coremark/LICENSE rename to benchmarks/coremark/LICENSE diff --git a/benchmarks/riscv-coremark/Makefile b/benchmarks/coremark/Makefile similarity index 89% rename from benchmarks/riscv-coremark/Makefile rename to benchmarks/coremark/Makefile index ce8dea81e..dabce4c24 100644 --- a/benchmarks/riscv-coremark/Makefile +++ b/benchmarks/coremark/Makefile @@ -1,6 +1,6 @@ #cmbase=../../addins/coremark PORT_DIR = $(CURDIR)/riscv64-baremetal -cmbase=coremark +cmbase=src sources=$(cmbase)/core_main.c $(cmbase)/core_list_join.c $(cmbase)/coremark.h \ $(cmbase)/core_matrix.c $(cmbase)/core_state.c $(cmbase)/core_util.c \ $(PORT_DIR)/core_portme.h $(PORT_DIR)/core_portme.c $(PORT_DIR)/core_portme.mak \ @@ -10,6 +10,8 @@ work/coremark.bare.riscv.elf.memfile: work/coremark.bare.riscv riscv64-unknown-elf-objdump -D $< > $<.elf.objdump riscv64-unknown-elf-elf2hex --bit-width 64 --input $< --output $@ extractFunctionRadix.sh $<.elf.objdump + (cd ../../pipelined/regression && (vsim -c -do "do wally-pipelined-batch.do rv64gc coremark" > ../../benchmarks/coremark/work/coremark.bare.riscv.sim.output)) + cd ../../benchmarks/coremark/ work/coremark.bare.riscv: $(sources) Makefile # make -C $(cmbase) PORT_DIR=$(PORT_DIR) compile RISCV=/opt/riscv/riscv-gnu-toolchain XCFLAGS="-march=rv64imd -mabi=lp64d -mbranch-cost=1 -DSKIP_DEFAULT_MEMSET -mtune=sifive-7-series -Ofast -funroll-all-loops -fno-delete-null-pointer-checks -fno-rename-registers --param=loop-max-datarefs-for-datadeps=0 -funroll-all-loops --param=uninlined-function-insns=8 -fno-tree-vrp -fwrapv -fno-toplevel-reorder --param=max-inline-insns-size=128 -fipa-pta" @@ -19,6 +21,7 @@ work/coremark.bare.riscv: $(sources) Makefile mkdir -p work/ mv $(cmbase)/coremark.bare.riscv work/ + .PHONY: clean clean: diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.c b/benchmarks/coremark/riscv64-baremetal/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/core_portme.c rename to benchmarks/coremark/riscv64-baremetal/core_portme.c diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.h b/benchmarks/coremark/riscv64-baremetal/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/core_portme.h rename to benchmarks/coremark/riscv64-baremetal/core_portme.h diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/core_portme.mak b/benchmarks/coremark/riscv64-baremetal/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/core_portme.mak rename to benchmarks/coremark/riscv64-baremetal/core_portme.mak diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/crt.S b/benchmarks/coremark/riscv64-baremetal/crt.S similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/crt.S rename to benchmarks/coremark/riscv64-baremetal/crt.S diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/encoding.h b/benchmarks/coremark/riscv64-baremetal/encoding.h similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/encoding.h rename to benchmarks/coremark/riscv64-baremetal/encoding.h diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/link.ld b/benchmarks/coremark/riscv64-baremetal/link.ld similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/link.ld rename to benchmarks/coremark/riscv64-baremetal/link.ld diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/syscallbackup.c b/benchmarks/coremark/riscv64-baremetal/syscallbackup.c similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/syscallbackup.c rename to benchmarks/coremark/riscv64-baremetal/syscallbackup.c diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/syscalls.c b/benchmarks/coremark/riscv64-baremetal/syscalls.c similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/syscalls.c rename to benchmarks/coremark/riscv64-baremetal/syscalls.c diff --git a/benchmarks/riscv-coremark/riscv64-baremetal/util.h b/benchmarks/coremark/riscv64-baremetal/util.h similarity index 100% rename from benchmarks/riscv-coremark/riscv64-baremetal/util.h rename to benchmarks/coremark/riscv64-baremetal/util.h diff --git a/benchmarks/riscv-coremark/coremark/LICENSE.md b/benchmarks/coremark/src/LICENSE.md similarity index 100% rename from benchmarks/riscv-coremark/coremark/LICENSE.md rename to benchmarks/coremark/src/LICENSE.md diff --git a/benchmarks/riscv-coremark/coremark/Makefile b/benchmarks/coremark/src/Makefile similarity index 100% rename from benchmarks/riscv-coremark/coremark/Makefile rename to benchmarks/coremark/src/Makefile diff --git a/benchmarks/riscv-coremark/coremark/README.md b/benchmarks/coremark/src/README.md similarity index 100% rename from benchmarks/riscv-coremark/coremark/README.md rename to benchmarks/coremark/src/README.md diff --git a/benchmarks/riscv-coremark/coremark/barebones/core_portme.c b/benchmarks/coremark/src/barebones/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/barebones/core_portme.c rename to benchmarks/coremark/src/barebones/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/barebones/core_portme.h b/benchmarks/coremark/src/barebones/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/barebones/core_portme.h rename to benchmarks/coremark/src/barebones/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/barebones/core_portme.mak b/benchmarks/coremark/src/barebones/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/barebones/core_portme.mak rename to benchmarks/coremark/src/barebones/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/barebones/cvt.c b/benchmarks/coremark/src/barebones/cvt.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/barebones/cvt.c rename to benchmarks/coremark/src/barebones/cvt.c diff --git a/benchmarks/riscv-coremark/coremark/barebones/ee_printf.c b/benchmarks/coremark/src/barebones/ee_printf.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/barebones/ee_printf.c rename to benchmarks/coremark/src/barebones/ee_printf.c diff --git a/benchmarks/riscv-coremark/coremark/core_list_join.c b/benchmarks/coremark/src/core_list_join.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/core_list_join.c rename to benchmarks/coremark/src/core_list_join.c diff --git a/benchmarks/riscv-coremark/coremark/core_main.c b/benchmarks/coremark/src/core_main.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/core_main.c rename to benchmarks/coremark/src/core_main.c diff --git a/benchmarks/riscv-coremark/coremark/core_matrix.c b/benchmarks/coremark/src/core_matrix.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/core_matrix.c rename to benchmarks/coremark/src/core_matrix.c diff --git a/benchmarks/riscv-coremark/coremark/core_state.c b/benchmarks/coremark/src/core_state.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/core_state.c rename to benchmarks/coremark/src/core_state.c diff --git a/benchmarks/riscv-coremark/coremark/core_util.c b/benchmarks/coremark/src/core_util.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/core_util.c rename to benchmarks/coremark/src/core_util.c diff --git a/benchmarks/riscv-coremark/coremark/coremark.exe b/benchmarks/coremark/src/coremark.exe similarity index 100% rename from benchmarks/riscv-coremark/coremark/coremark.exe rename to benchmarks/coremark/src/coremark.exe diff --git a/benchmarks/riscv-coremark/coremark/coremark.h b/benchmarks/coremark/src/coremark.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/coremark.h rename to benchmarks/coremark/src/coremark.h diff --git a/benchmarks/riscv-coremark/coremark/coremark.md5 b/benchmarks/coremark/src/coremark.md5 similarity index 100% rename from benchmarks/riscv-coremark/coremark/coremark.md5 rename to benchmarks/coremark/src/coremark.md5 diff --git a/benchmarks/riscv-coremark/coremark/cygwin/core_portme.c b/benchmarks/coremark/src/cygwin/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/cygwin/core_portme.c rename to benchmarks/coremark/src/cygwin/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/cygwin/core_portme.h b/benchmarks/coremark/src/cygwin/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/cygwin/core_portme.h rename to benchmarks/coremark/src/cygwin/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/cygwin/core_portme.mak b/benchmarks/coremark/src/cygwin/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/cygwin/core_portme.mak rename to benchmarks/coremark/src/cygwin/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/docs/READM.md b/benchmarks/coremark/src/docs/READM.md similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/READM.md rename to benchmarks/coremark/src/docs/READM.md diff --git a/benchmarks/riscv-coremark/coremark/docs/balance_O0_joined.png b/benchmarks/coremark/src/docs/balance_O0_joined.png similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/balance_O0_joined.png rename to benchmarks/coremark/src/docs/balance_O0_joined.png diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html b/benchmarks/coremark/src/docs/html/files/PIC32/core_portme-mak.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/PIC32/core_portme-mak.html rename to benchmarks/coremark/src/docs/html/files/PIC32/core_portme-mak.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/core_list_join-c.html b/benchmarks/coremark/src/docs/html/files/core_list_join-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/core_list_join-c.html rename to benchmarks/coremark/src/docs/html/files/core_list_join-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/core_main-c.html b/benchmarks/coremark/src/docs/html/files/core_main-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/core_main-c.html rename to benchmarks/coremark/src/docs/html/files/core_main-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/core_matrix-c.html b/benchmarks/coremark/src/docs/html/files/core_matrix-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/core_matrix-c.html rename to benchmarks/coremark/src/docs/html/files/core_matrix-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/core_state-c.html b/benchmarks/coremark/src/docs/html/files/core_state-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/core_state-c.html rename to benchmarks/coremark/src/docs/html/files/core_state-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/core_util-c.html b/benchmarks/coremark/src/docs/html/files/core_util-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/core_util-c.html rename to benchmarks/coremark/src/docs/html/files/core_util-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/coremark-h.html b/benchmarks/coremark/src/docs/html/files/coremark-h.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/coremark-h.html rename to benchmarks/coremark/src/docs/html/files/coremark-h.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/docs/core_state.png b/benchmarks/coremark/src/docs/html/files/docs/core_state.png similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/docs/core_state.png rename to benchmarks/coremark/src/docs/html/files/docs/core_state.png diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html b/benchmarks/coremark/src/docs/html/files/linux/core_portme-c.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-c.html rename to benchmarks/coremark/src/docs/html/files/linux/core_portme-c.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html b/benchmarks/coremark/src/docs/html/files/linux/core_portme-h.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-h.html rename to benchmarks/coremark/src/docs/html/files/linux/core_portme-h.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html b/benchmarks/coremark/src/docs/html/files/linux/core_portme-mak.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/linux/core_portme-mak.html rename to benchmarks/coremark/src/docs/html/files/linux/core_portme-mak.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/readme-txt.html b/benchmarks/coremark/src/docs/html/files/readme-txt.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/readme-txt.html rename to benchmarks/coremark/src/docs/html/files/readme-txt.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/files/release_notes-txt.html b/benchmarks/coremark/src/docs/html/files/release_notes-txt.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/files/release_notes-txt.html rename to benchmarks/coremark/src/docs/html/files/release_notes-txt.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index.html b/benchmarks/coremark/src/docs/html/index.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index.html rename to benchmarks/coremark/src/docs/html/index.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/BuildTargets.html b/benchmarks/coremark/src/docs/html/index/BuildTargets.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/BuildTargets.html rename to benchmarks/coremark/src/docs/html/index/BuildTargets.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Configuration.html b/benchmarks/coremark/src/docs/html/index/Configuration.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Configuration.html rename to benchmarks/coremark/src/docs/html/index/Configuration.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Configurations.html b/benchmarks/coremark/src/docs/html/index/Configurations.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Configurations.html rename to benchmarks/coremark/src/docs/html/index/Configurations.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Files.html b/benchmarks/coremark/src/docs/html/index/Files.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Files.html rename to benchmarks/coremark/src/docs/html/index/Files.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Functions.html b/benchmarks/coremark/src/docs/html/index/Functions.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Functions.html rename to benchmarks/coremark/src/docs/html/index/Functions.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/General.html b/benchmarks/coremark/src/docs/html/index/General.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/General.html rename to benchmarks/coremark/src/docs/html/index/General.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/General2.html b/benchmarks/coremark/src/docs/html/index/General2.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/General2.html rename to benchmarks/coremark/src/docs/html/index/General2.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Types.html b/benchmarks/coremark/src/docs/html/index/Types.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Types.html rename to benchmarks/coremark/src/docs/html/index/Types.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/index/Variables.html b/benchmarks/coremark/src/docs/html/index/Variables.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/index/Variables.html rename to benchmarks/coremark/src/docs/html/index/Variables.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/javascript/main.js b/benchmarks/coremark/src/docs/html/javascript/main.js similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/javascript/main.js rename to benchmarks/coremark/src/docs/html/javascript/main.js diff --git a/benchmarks/riscv-coremark/coremark/docs/html/javascript/searchdata.js b/benchmarks/coremark/src/docs/html/javascript/searchdata.js similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/javascript/searchdata.js rename to benchmarks/coremark/src/docs/html/javascript/searchdata.js diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html b/benchmarks/coremark/src/docs/html/search/BuildTargetsP.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/BuildTargetsP.html rename to benchmarks/coremark/src/docs/html/search/BuildTargetsP.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationC.html b/benchmarks/coremark/src/docs/html/search/ConfigurationC.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationC.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationC.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationH.html b/benchmarks/coremark/src/docs/html/search/ConfigurationH.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationH.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationH.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationM.html b/benchmarks/coremark/src/docs/html/search/ConfigurationM.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationM.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationM.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationS.html b/benchmarks/coremark/src/docs/html/search/ConfigurationS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationS.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationT.html b/benchmarks/coremark/src/docs/html/search/ConfigurationT.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationT.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationT.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationU.html b/benchmarks/coremark/src/docs/html/search/ConfigurationU.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationU.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationU.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html b/benchmarks/coremark/src/docs/html/search/ConfigurationsH.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsH.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationsH.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html b/benchmarks/coremark/src/docs/html/search/ConfigurationsM.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsM.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationsM.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html b/benchmarks/coremark/src/docs/html/search/ConfigurationsS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsS.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationsS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html b/benchmarks/coremark/src/docs/html/search/ConfigurationsT.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/ConfigurationsT.html rename to benchmarks/coremark/src/docs/html/search/ConfigurationsT.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FilesC.html b/benchmarks/coremark/src/docs/html/search/FilesC.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FilesC.html rename to benchmarks/coremark/src/docs/html/search/FilesC.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FilesR.html b/benchmarks/coremark/src/docs/html/search/FilesR.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FilesR.html rename to benchmarks/coremark/src/docs/html/search/FilesR.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsC.html b/benchmarks/coremark/src/docs/html/search/FunctionsC.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsC.html rename to benchmarks/coremark/src/docs/html/search/FunctionsC.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsG.html b/benchmarks/coremark/src/docs/html/search/FunctionsG.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsG.html rename to benchmarks/coremark/src/docs/html/search/FunctionsG.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsI.html b/benchmarks/coremark/src/docs/html/search/FunctionsI.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsI.html rename to benchmarks/coremark/src/docs/html/search/FunctionsI.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsM.html b/benchmarks/coremark/src/docs/html/search/FunctionsM.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsM.html rename to benchmarks/coremark/src/docs/html/search/FunctionsM.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsP.html b/benchmarks/coremark/src/docs/html/search/FunctionsP.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsP.html rename to benchmarks/coremark/src/docs/html/search/FunctionsP.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsS.html b/benchmarks/coremark/src/docs/html/search/FunctionsS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsS.html rename to benchmarks/coremark/src/docs/html/search/FunctionsS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsT.html b/benchmarks/coremark/src/docs/html/search/FunctionsT.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/FunctionsT.html rename to benchmarks/coremark/src/docs/html/search/FunctionsT.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralB.html b/benchmarks/coremark/src/docs/html/search/GeneralB.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralB.html rename to benchmarks/coremark/src/docs/html/search/GeneralB.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralC.html b/benchmarks/coremark/src/docs/html/search/GeneralC.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralC.html rename to benchmarks/coremark/src/docs/html/search/GeneralC.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralD.html b/benchmarks/coremark/src/docs/html/search/GeneralD.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralD.html rename to benchmarks/coremark/src/docs/html/search/GeneralD.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralF.html b/benchmarks/coremark/src/docs/html/search/GeneralF.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralF.html rename to benchmarks/coremark/src/docs/html/search/GeneralF.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralG.html b/benchmarks/coremark/src/docs/html/search/GeneralG.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralG.html rename to benchmarks/coremark/src/docs/html/search/GeneralG.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralH.html b/benchmarks/coremark/src/docs/html/search/GeneralH.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralH.html rename to benchmarks/coremark/src/docs/html/search/GeneralH.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralI.html b/benchmarks/coremark/src/docs/html/search/GeneralI.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralI.html rename to benchmarks/coremark/src/docs/html/search/GeneralI.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralL.html b/benchmarks/coremark/src/docs/html/search/GeneralL.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralL.html rename to benchmarks/coremark/src/docs/html/search/GeneralL.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralM.html b/benchmarks/coremark/src/docs/html/search/GeneralM.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralM.html rename to benchmarks/coremark/src/docs/html/search/GeneralM.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralO.html b/benchmarks/coremark/src/docs/html/search/GeneralO.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralO.html rename to benchmarks/coremark/src/docs/html/search/GeneralO.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralP.html b/benchmarks/coremark/src/docs/html/search/GeneralP.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralP.html rename to benchmarks/coremark/src/docs/html/search/GeneralP.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralR.html b/benchmarks/coremark/src/docs/html/search/GeneralR.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralR.html rename to benchmarks/coremark/src/docs/html/search/GeneralR.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralS.html b/benchmarks/coremark/src/docs/html/search/GeneralS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralS.html rename to benchmarks/coremark/src/docs/html/search/GeneralS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralT.html b/benchmarks/coremark/src/docs/html/search/GeneralT.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralT.html rename to benchmarks/coremark/src/docs/html/search/GeneralT.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralU.html b/benchmarks/coremark/src/docs/html/search/GeneralU.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralU.html rename to benchmarks/coremark/src/docs/html/search/GeneralU.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralV.html b/benchmarks/coremark/src/docs/html/search/GeneralV.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralV.html rename to benchmarks/coremark/src/docs/html/search/GeneralV.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/GeneralW.html b/benchmarks/coremark/src/docs/html/search/GeneralW.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/GeneralW.html rename to benchmarks/coremark/src/docs/html/search/GeneralW.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/NoResults.html b/benchmarks/coremark/src/docs/html/search/NoResults.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/NoResults.html rename to benchmarks/coremark/src/docs/html/search/NoResults.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/TypesS.html b/benchmarks/coremark/src/docs/html/search/TypesS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/TypesS.html rename to benchmarks/coremark/src/docs/html/search/TypesS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesC.html b/benchmarks/coremark/src/docs/html/search/VariablesC.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesC.html rename to benchmarks/coremark/src/docs/html/search/VariablesC.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesD.html b/benchmarks/coremark/src/docs/html/search/VariablesD.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesD.html rename to benchmarks/coremark/src/docs/html/search/VariablesD.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesL.html b/benchmarks/coremark/src/docs/html/search/VariablesL.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesL.html rename to benchmarks/coremark/src/docs/html/search/VariablesL.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesO.html b/benchmarks/coremark/src/docs/html/search/VariablesO.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesO.html rename to benchmarks/coremark/src/docs/html/search/VariablesO.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesP.html b/benchmarks/coremark/src/docs/html/search/VariablesP.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesP.html rename to benchmarks/coremark/src/docs/html/search/VariablesP.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesR.html b/benchmarks/coremark/src/docs/html/search/VariablesR.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesR.html rename to benchmarks/coremark/src/docs/html/search/VariablesR.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/search/VariablesS.html b/benchmarks/coremark/src/docs/html/search/VariablesS.html similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/search/VariablesS.html rename to benchmarks/coremark/src/docs/html/search/VariablesS.html diff --git a/benchmarks/riscv-coremark/coremark/docs/html/styles/1.css b/benchmarks/coremark/src/docs/html/styles/1.css similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/styles/1.css rename to benchmarks/coremark/src/docs/html/styles/1.css diff --git a/benchmarks/riscv-coremark/coremark/docs/html/styles/2.css b/benchmarks/coremark/src/docs/html/styles/2.css similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/styles/2.css rename to benchmarks/coremark/src/docs/html/styles/2.css diff --git a/benchmarks/riscv-coremark/coremark/docs/html/styles/main.css b/benchmarks/coremark/src/docs/html/styles/main.css similarity index 100% rename from benchmarks/riscv-coremark/coremark/docs/html/styles/main.css rename to benchmarks/coremark/src/docs/html/styles/main.css diff --git a/benchmarks/riscv-coremark/coremark/freebsd/core_portme.mak b/benchmarks/coremark/src/freebsd/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/freebsd/core_portme.mak rename to benchmarks/coremark/src/freebsd/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/linux/core_portme.c b/benchmarks/coremark/src/linux/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux/core_portme.c rename to benchmarks/coremark/src/linux/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/linux/core_portme.h b/benchmarks/coremark/src/linux/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux/core_portme.h rename to benchmarks/coremark/src/linux/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/linux/core_portme.mak b/benchmarks/coremark/src/linux/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux/core_portme.mak rename to benchmarks/coremark/src/linux/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/linux64/core_portme.c b/benchmarks/coremark/src/linux64/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux64/core_portme.c rename to benchmarks/coremark/src/linux64/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/linux64/core_portme.h b/benchmarks/coremark/src/linux64/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux64/core_portme.h rename to benchmarks/coremark/src/linux64/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/linux64/core_portme.mak b/benchmarks/coremark/src/linux64/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/linux64/core_portme.mak rename to benchmarks/coremark/src/linux64/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/macos/core_portme.mak b/benchmarks/coremark/src/macos/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/macos/core_portme.mak rename to benchmarks/coremark/src/macos/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/posix/core_portme.c b/benchmarks/coremark/src/posix/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/posix/core_portme.c rename to benchmarks/coremark/src/posix/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/posix/core_portme.h b/benchmarks/coremark/src/posix/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/posix/core_portme.h rename to benchmarks/coremark/src/posix/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/posix/core_portme.mak b/benchmarks/coremark/src/posix/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/posix/core_portme.mak rename to benchmarks/coremark/src/posix/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/posix/core_portme_posix_overrides.h b/benchmarks/coremark/src/posix/core_portme_posix_overrides.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/posix/core_portme_posix_overrides.h rename to benchmarks/coremark/src/posix/core_portme_posix_overrides.h diff --git a/benchmarks/riscv-coremark/coremark/rtems/core_portme.mak b/benchmarks/coremark/src/rtems/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/rtems/core_portme.mak rename to benchmarks/coremark/src/rtems/core_portme.mak diff --git a/benchmarks/riscv-coremark/coremark/rtems/init.c b/benchmarks/coremark/src/rtems/init.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/rtems/init.c rename to benchmarks/coremark/src/rtems/init.c diff --git a/benchmarks/riscv-coremark/coremark/simple/core_portme.c b/benchmarks/coremark/src/simple/core_portme.c similarity index 100% rename from benchmarks/riscv-coremark/coremark/simple/core_portme.c rename to benchmarks/coremark/src/simple/core_portme.c diff --git a/benchmarks/riscv-coremark/coremark/simple/core_portme.h b/benchmarks/coremark/src/simple/core_portme.h similarity index 100% rename from benchmarks/riscv-coremark/coremark/simple/core_portme.h rename to benchmarks/coremark/src/simple/core_portme.h diff --git a/benchmarks/riscv-coremark/coremark/simple/core_portme.mak b/benchmarks/coremark/src/simple/core_portme.mak similarity index 100% rename from benchmarks/riscv-coremark/coremark/simple/core_portme.mak rename to benchmarks/coremark/src/simple/core_portme.mak diff --git a/benchmarks/riscv-coremark/old/README.md b/benchmarks/riscv-coremark/old/README.md deleted file mode 100644 index 7c02eb1bf..000000000 --- a/benchmarks/riscv-coremark/old/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Coremark EEMBC Wrapper -====================== - -This repository provides the utility files to port [CoreMark EEMBC](https://www.eembc.org/coremark/) to RISC-V. - -### Requirements - - - You must have installed the RISC-V tools - -### Setup - - - `git submodule update --init` - - Run the `./build-coremark.sh` script that does the following - - Builds a version of Coremark for Linux or pk (coremark.riscv) - - Builds a version of Coremark for bare-metal (coremark.bare.riscv) - - Copies the output binaries into this directory - -### Default Files - -The default files target **RV64GC** and use minimal amount of compilation flags. Additionally, the `*.mak` file in the `riscv64` -folder setups `spike pk` as the default `run` rule. - -Feel free to change these to suit your needs. diff --git a/benchmarks/riscv-coremark/old/extraPortmes/README.md b/benchmarks/riscv-coremark/old/extraPortmes/README.md deleted file mode 100644 index 681fc4d8b..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/README.md +++ /dev/null @@ -1,7 +0,0 @@ -This directory is a backup for the portme files associated with cygwin, linux, and linux64 - -This backup is needed in the event that a user replaces the coremark directory with a clean version -from EEMBC's github page (the clean version does not have the cygwin, linux, -and linux64 files that our version does). - -Please do not delete this directory under any circumstance. \ No newline at end of file diff --git a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.c deleted file mode 100755 index fe8d29983..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.c +++ /dev/null @@ -1,336 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -#include -#include -#include "coremark.h" -#if CALLGRIND_RUN -#include -#endif - -#if (MEM_METHOD==MEM_MALLOC) -#include -/* Function: portable_malloc - Provide malloc() functionality in a platform specific way. -*/ -void *portable_malloc(size_t size) { - return malloc(size); -} -/* Function: portable_free - Provide free() functionality in a platform specific way. -*/ -void portable_free(void *p) { - free(p); -} -#else -void *portable_malloc(size_t size) { - return NULL; -} -void portable_free(void *p) { - p=NULL; -} -#endif - -#if (SEED_METHOD==SEED_VOLATILE) -#if VALIDATION_RUN - volatile ee_s32 seed1_volatile=0x3415; - volatile ee_s32 seed2_volatile=0x3415; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PERFORMANCE_RUN - volatile ee_s32 seed1_volatile=0x0; - volatile ee_s32 seed2_volatile=0x0; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PROFILE_RUN - volatile ee_s32 seed1_volatile=0x8; - volatile ee_s32 seed2_volatile=0x8; - volatile ee_s32 seed3_volatile=0x8; -#endif - volatile ee_s32 seed4_volatile=ITERATIONS; - volatile ee_s32 seed5_volatile=0; -#endif -/* Porting: Timing functions - How to capture time and convert to seconds must be ported to whatever is supported by the platform. - e.g. Read value from on board RTC, read value from cpu clock cycles performance counter etc. - Sample implementation for standard time.h and windows.h definitions included. -*/ -/* Define: TIMER_RES_DIVIDER - Divider to trade off timer resolution and total time that can be measured. - - Use lower values to increase resolution, but make sure that overflow does not occur. - If there are issues with the return value overflowing, increase this value. - */ -#if USE_CLOCK - #define NSECS_PER_SEC CLOCKS_PER_SEC - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE clock_t - #define GETMYTIME(_t) (*_t=clock()) - #define MYTIMEDIFF(fin,ini) ((fin)-(ini)) - #define TIMER_RES_DIVIDER 1 - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif defined(_MSC_VER) - #define NSECS_PER_SEC 10000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE FILETIME - #define GETMYTIME(_t) GetSystemTimeAsFileTime(_t) - #define MYTIMEDIFF(fin,ini) (((*(__int64*)&fin)-(*(__int64*)&ini))/TIMER_RES_DIVIDER) - /* setting to millisces resolution by default with MSDEV */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif HAS_TIME_H - #define NSECS_PER_SEC 1000000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE struct timespec - #define GETMYTIME(_t) clock_gettime(CLOCK_REALTIME,_t) - #define MYTIMEDIFF(fin,ini) ((fin.tv_sec-ini.tv_sec)*(NSECS_PER_SEC/TIMER_RES_DIVIDER)+(fin.tv_nsec-ini.tv_nsec)/TIMER_RES_DIVIDER) - /* setting to 1/1000 of a second resolution by default with linux */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#else - #define SAMPLE_TIME_IMPLEMENTATION 0 -#endif -#define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER) - -#if SAMPLE_TIME_IMPLEMENTATION -/** Define Host specific (POSIX), or target specific global time variables. */ -static CORETIMETYPE start_time_val, stop_time_val; - -/* Function: start_time - This function will be called right before starting the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or zeroing some system parameters - e.g. setting the cpu clocks cycles to 0. -*/ -void start_time(void) { - GETMYTIME(&start_time_val ); -#if CALLGRIND_RUN - CALLGRIND_START_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif -} -/* Function: stop_time - This function will be called right after ending the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or other system parameters - e.g. reading the current value of cpu cycles counter. -*/ -void stop_time(void) { -#if CALLGRIND_RUN - CALLGRIND_STOP_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif - GETMYTIME(&stop_time_val ); -} -/* Function: get_time - Return an abstract "ticks" number that signifies time on the system. - - Actual value returned may be cpu cycles, milliseconds or any other value, - as long as it can be converted to seconds by . - This methodology is taken to accomodate any hardware or simulated platform. - The sample implementation returns millisecs by default, - and the resolution is controlled by -*/ -CORE_TICKS get_time(void) { - CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val)); - return elapsed; -} -/* Function: time_in_secs - Convert the value returned by get_time to seconds. - - The type is used to accomodate systems with no support for floating point. - Default implementation implemented by the EE_TICKS_PER_SEC macro above. -*/ -secs_ret time_in_secs(CORE_TICKS ticks) { - secs_ret retval=((secs_ret)ticks) / (secs_ret)EE_TICKS_PER_SEC; - return retval; -} -#else -#error "Please implement timing functionality in core_portme.c" -#endif /* SAMPLE_TIME_IMPLEMENTATION */ - -ee_u32 default_num_contexts=MULTITHREAD; - -/* Function: portable_init - Target specific initialization code - Test for some common mistakes. -*/ -void portable_init(core_portable *p, int *argc, char *argv[]) -{ -#if PRINT_ARGS - int i; - for (i=0; i<*argc; i++) { - ee_printf("Arg[%d]=%s\n",i,argv[i]); - } -#endif - if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) { - ee_printf("ERROR! Please define ee_ptr_int to a type that holds a pointer!\n"); - } - if (sizeof(ee_u32) != 4) { - ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n"); - } -#if (MAIN_HAS_NOARGC && (SEED_METHOD==SEED_ARG)) - ee_printf("ERROR! Main has no argc, but SEED_METHOD defined to SEED_ARG!\n"); -#endif - -#if (MULTITHREAD>1) && (SEED_METHOD==SEED_ARG) - int nargs=*argc,i; - if ((nargs>1) && (*argv[1]=='M')) { - default_num_contexts=parseval(argv[1]+1); - if (default_num_contexts>MULTITHREAD) - default_num_contexts=MULTITHREAD; - /* Shift args since first arg is directed to the portable part and not to coremark main */ - --nargs; - for (i=1; i*/ - p->portable_id=1; -} -/* Function: portable_fini - Target specific final code -*/ -void portable_fini(core_portable *p) -{ - p->portable_id=0; -} - -#if (MULTITHREAD>1) - -/* Function: core_start_parallel - Start benchmarking in a parallel context. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -/* Function: core_stop_parallel - Stop a parallel context execution of coremark, and gather the results. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -#if USE_PTHREAD -ee_u8 core_start_parallel(core_results *res) { - return (ee_u8)pthread_create(&(res->port.thread),NULL,iterate,(void *)res); -} -ee_u8 core_stop_parallel(core_results *res) { - void *retval; - return (ee_u8)pthread_join(res->port.thread,&retval); -} -#elif USE_FORK -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - key_t key=4321+key_id; - key_id++; - res->port.pid=fork(); - res->port.shmid=shmget(key, 8, IPC_CREAT | 0666); - if (res->port.shmid<0) { - ee_printf("ERROR in shmget!\n"); - } - if (res->port.pid==0) { - iterate(res); - res->port.shm=shmat(res->port.shmid, NULL, 0); - /* copy the validation values to the shared memory area and quit*/ - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in child shmat!\n"); - } else { - memcpy(res->port.shm,&(res->crc),8); - shmdt(res->port.shm); - } - exit(0); - } - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - /* after process is done, get the values from the shared memory area */ - res->port.shm=shmat(res->port.shmid, NULL, 0); - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in parent shmat!\n"); - return 0; - } - memcpy(&(res->crc),res->port.shm,8); - shmdt(res->port.shm); - return 1; -} -#elif USE_SOCKET -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - int bound, buffer_length=8; - res->port.sa.sin_family = AF_INET; - res->port.sa.sin_addr.s_addr = htonl(0x7F000001); - res->port.sa.sin_port = htons(7654+key_id); - key_id++; - res->port.pid=fork(); - if (res->port.pid==0) { /* benchmark child */ - iterate(res); - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (-1 == res->port.sock) /* if socket failed to initialize, exit */ { - ee_printf("Error Creating Socket"); - } else { - int bytes_sent = sendto(res->port.sock, &(res->crc), buffer_length, 0,(struct sockaddr*)&(res->port.sa), sizeof (struct sockaddr_in)); - if (bytes_sent < 0) - ee_printf("Error sending packet: %s\n", strerror(errno)); - close(res->port.sock); /* close the socket */ - } - exit(0); - } - /* parent process, open the socket */ - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - bound = bind(res->port.sock,(struct sockaddr*)&(res->port.sa), sizeof(struct sockaddr)); - if (bound < 0) - ee_printf("bind(): %s\n",strerror(errno)); - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - int fromlen=sizeof(struct sockaddr); - int recsize = recvfrom(res->port.sock, &(res->crc), 8, 0, (struct sockaddr*)&(res->port.sa), &fromlen); - if (recsize < 0) { - ee_printf("Error in receive: %s\n", strerror(errno)); - return 0; - } - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - return 1; -} -#else /* no standard multicore implementation */ -#error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* multithread implementations */ -#endif diff --git a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.h deleted file mode 100755 index 9471b12ec..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.h +++ /dev/null @@ -1,293 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -/* Topic: Description - This file contains configuration constants required to execute on different platforms -*/ -#ifndef CORE_PORTME_H -#define CORE_PORTME_H -/************************/ -/* Data types and settings */ -/************************/ -/* Configuration: HAS_FLOAT - Define to 1 if the platform supports floating point. -*/ -#ifndef HAS_FLOAT -#define HAS_FLOAT 1 -#endif -/* Configuration: HAS_TIME_H - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef HAS_TIME_H -#define HAS_TIME_H 1 -#endif -/* Configuration: USE_CLOCK - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef USE_CLOCK -#define USE_CLOCK 0 -#endif -/* Configuration: HAS_STDIO - Define to 1 if the platform has stdio.h. -*/ -#ifndef HAS_STDIO -#define HAS_STDIO 1 -#endif -/* Configuration: HAS_PRINTF - Define to 1 if the platform has stdio.h and implements the printf function. -*/ -#ifndef HAS_PRINTF -#define HAS_PRINTF 1 -#endif - -/* Configuration: CORE_TICKS - Define type of return from the timing functions. - */ -#if defined(_MSC_VER) -#include -typedef size_t CORE_TICKS; -#elif HAS_TIME_H -#include -typedef clock_t CORE_TICKS; -#else -#error "Please define type of CORE_TICKS and implement start_time, end_time get_time and time_in_secs functions!" -#endif - -/* Definitions: COMPILER_VERSION, COMPILER_FLAGS, MEM_LOCATION - Initialize these strings per platform -*/ -#ifndef COMPILER_VERSION - #ifdef __GNUC__ - #define COMPILER_VERSION "GCC"__VERSION__ - #else - #define COMPILER_VERSION "Please put compiler version here (e.g. gcc 4.1)" - #endif -#endif -#ifndef COMPILER_FLAGS - #define COMPILER_FLAGS FLAGS_STR /* "Please put compiler flags here (e.g. -o3)" */ -#endif -#ifndef MEM_LOCATION - #define MEM_LOCATION "Please put data memory location here\n\t\t\t(e.g. code in flash, data on heap etc)" - #define MEM_LOCATION_UNSPEC 1 -#endif - -/* Data Types: - To avoid compiler issues, define the data types that need ot be used for 8b, 16b and 32b in . - - *Imprtant*: - ee_ptr_int needs to be the data type used to hold pointers, otherwise coremark may fail!!! -*/ -typedef signed short ee_s16; -typedef unsigned short ee_u16; -typedef signed int ee_s32; -typedef double ee_f32; -typedef unsigned char ee_u8; -typedef unsigned int ee_u32; -typedef ee_u32 ee_ptr_int; -typedef size_t ee_size_t; -/* align_mem: - This macro is used to align an offset to point to a 32b value. It is used in the Matrix algorithm to initialize the input memory blocks. -*/ -#define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3)) - -/* Configuration: SEED_METHOD - Defines method to get seed values that cannot be computed at compile time. - - Valid values: - SEED_ARG - from command line. - SEED_FUNC - from a system function. - SEED_VOLATILE - from volatile variables. -*/ -#ifndef SEED_METHOD -#define SEED_METHOD SEED_ARG -#endif - -/* Configuration: MEM_METHOD - Defines method to get a block of memry. - - Valid values: - MEM_MALLOC - for platforms that implement malloc and have malloc.h. - MEM_STATIC - to use a static memory array. - MEM_STACK - to allocate the data block on the stack (NYI). -*/ -#ifndef MEM_METHOD -#define MEM_METHOD MEM_MALLOC -#endif - -/* Configuration: MULTITHREAD - Define for parallel execution - - Valid values: - 1 - only one context (default). - N>1 - will execute N copies in parallel. - - Note: - If this flag is defined to more then 1, an implementation for launching parallel contexts must be defined. - - Two sample implementations are provided. Use or to enable them. - - It is valid to have a different implementation of and in , - to fit a particular architecture. -*/ -#ifndef MULTITHREAD -#define MULTITHREAD 1 -#endif - -/* Configuration: USE_PTHREAD - Sample implementation for launching parallel contexts - This implementation uses pthread_thread_create and pthread_join. - - Valid values: - 0 - Do not use pthreads API. - 1 - Use pthreads API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_PTHREAD -#define USE_PTHREAD 0 -#endif - -/* Configuration: USE_FORK - Sample implementation for launching parallel contexts - This implementation uses fork, waitpid, shmget,shmat and shmdt. - - Valid values: - 0 - Do not use fork API. - 1 - Use fork API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_FORK -#define USE_FORK 0 -#endif - -/* Configuration: USE_SOCKET - Sample implementation for launching parallel contexts - This implementation uses fork, socket, sendto and recvfrom - - Valid values: - 0 - Do not use fork and sockets API. - 1 - Use fork and sockets API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_SOCKET -#define USE_SOCKET 0 -#endif - -/* Configuration: MAIN_HAS_NOARGC - Needed if platform does not support getting arguments to main. - - Valid values: - 0 - argc/argv to main is supported - 1 - argc/argv to main is not supported -*/ -#ifndef MAIN_HAS_NOARGC -#define MAIN_HAS_NOARGC 0 -#endif - -/* Configuration: MAIN_HAS_NORETURN - Needed if platform does not support returning a value from main. - - Valid values: - 0 - main returns an int, and return value will be 0. - 1 - platform does not support returning a value from main -*/ -#ifndef MAIN_HAS_NORETURN -#define MAIN_HAS_NORETURN 0 -#endif - -/* Variable: default_num_contexts - Number of contexts to spawn in multicore context. - Override this global value to change number of contexts used. - - Note: - This value may not be set higher then the define. - - To experiment, you can set the define to the highest value expected, and use argc/argv in the to set this value from the command line. -*/ -extern ee_u32 default_num_contexts; - -#if (MULTITHREAD>1) -#if USE_PTHREAD - #include - #define PARALLEL_METHOD "PThreads" -#elif USE_FORK - #include - #include - #include - #include - #include /* for memcpy */ - #define PARALLEL_METHOD "Fork" -#elif USE_SOCKET - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #define PARALLEL_METHOD "Sockets" -#else - #define PARALLEL_METHOD "Proprietary" - #error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* Method for multithreading */ -#endif /* MULTITHREAD > 1 */ - -typedef struct CORE_PORTABLE_S { -#if (MULTITHREAD>1) - #if USE_PTHREAD - pthread_t thread; - #elif USE_FORK - pid_t pid; - int shmid; - void *shm; - #elif USE_SOCKET - pid_t pid; - int sock; - struct sockaddr_in sa; - #endif /* Method for multithreading */ -#endif /* MULTITHREAD>1 */ - ee_u8 portable_id; -} core_portable; - -/* target specific init/fini */ -void portable_init(core_portable *p, int *argc, char *argv[]); -void portable_fini(core_portable *p); - -#if (SEED_METHOD==SEED_VOLATILE) - #if (VALIDATION_RUN || PERFORMANCE_RUN || PROFILE_RUN) - #define RUN_TYPE_FLAG 1 - #else - #if (TOTAL_DATA_SIZE==1200) - #define PROFILE_RUN 1 - #else - #define PERFORMANCE_RUN 1 - #endif - #endif -#endif /* SEED_METHOD==SEED_VOLATILE */ - -#endif /* CORE_PORTME_H */ diff --git a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.mak deleted file mode 100644 index 97b6d6ace..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/cygwin/core_portme.mak +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Original Author: Shay Gal-on - -include posix/core_portme.mak diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.c deleted file mode 100755 index 6b63610d1..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.c +++ /dev/null @@ -1,338 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -#include -#include -#include "coremark.h" -#if CALLGRIND_RUN -#include -#endif - -#if (MEM_METHOD==MEM_MALLOC) -#include -/* Function: portable_malloc - Provide malloc() functionality in a platform specific way. -*/ -void *portable_malloc(size_t size) { - return malloc(size); -} -/* Function: portable_free - Provide free() functionality in a platform specific way. -*/ -void portable_free(void *p) { - free(p); -} -#else -void *portable_malloc(size_t size) { - return NULL; -} -void portable_free(void *p) { - p=NULL; -} -#endif - -#if (SEED_METHOD==SEED_VOLATILE) -#if VALIDATION_RUN - volatile ee_s32 seed1_volatile=0x3415; - volatile ee_s32 seed2_volatile=0x3415; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PERFORMANCE_RUN - volatile ee_s32 seed1_volatile=0x0; - volatile ee_s32 seed2_volatile=0x0; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PROFILE_RUN - volatile ee_s32 seed1_volatile=0x8; - volatile ee_s32 seed2_volatile=0x8; - volatile ee_s32 seed3_volatile=0x8; -#endif - volatile ee_s32 seed4_volatile=ITERATIONS; - volatile ee_s32 seed5_volatile=0; -#endif -/* Porting: Timing functions - How to capture time and convert to seconds must be ported to whatever is supported by the platform. - e.g. Read value from on board RTC, read value from cpu clock cycles performance counter etc. - Sample implementation for standard time.h and windows.h definitions included. -*/ -/* Define: TIMER_RES_DIVIDER - Divider to trade off timer resolution and total time that can be measured. - - Use lower values to increase resolution, but make sure that overflow does not occur. - If there are issues with the return value overflowing, increase this value. - */ -#if USE_CLOCK - #define NSECS_PER_SEC CLOCKS_PER_SEC - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE clock_t - #define GETMYTIME(_t) (*_t=clock()) - #define MYTIMEDIFF(fin,ini) ((fin)-(ini)) - #define TIMER_RES_DIVIDER 1 - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif defined(_MSC_VER) - #define NSECS_PER_SEC 10000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE FILETIME - #define GETMYTIME(_t) GetSystemTimeAsFileTime(_t) - #define MYTIMEDIFF(fin,ini) (((*(__int64*)&fin)-(*(__int64*)&ini))/TIMER_RES_DIVIDER) - /* setting to millisces resolution by default with MSDEV */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif HAS_TIME_H - #define NSECS_PER_SEC 1000000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE struct timespec - #define GETMYTIME(_t) clock_gettime(CLOCK_REALTIME,_t) - #define MYTIMEDIFF(fin,ini) ((fin.tv_sec-ini.tv_sec)*(NSECS_PER_SEC/TIMER_RES_DIVIDER)+(fin.tv_nsec-ini.tv_nsec)/TIMER_RES_DIVIDER) - /* setting to 1/1000 of a second resolution by default with linux */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#else - #define SAMPLE_TIME_IMPLEMENTATION 0 -#endif -#define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER) - -#if SAMPLE_TIME_IMPLEMENTATION -/** Define Host specific (POSIX), or target specific global time variables. */ -static CORETIMETYPE start_time_val, stop_time_val; - -/* Function: start_time - This function will be called right before starting the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or zeroing some system parameters - e.g. setting the cpu clocks cycles to 0. -*/ -void start_time(void) { - GETMYTIME(&start_time_val ); -#if CALLGRIND_RUN - CALLGRIND_START_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif -} -/* Function: stop_time - This function will be called right after ending the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or other system parameters - e.g. reading the current value of cpu cycles counter. -*/ -void stop_time(void) { -#if CALLGRIND_RUN - CALLGRIND_STOP_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif - GETMYTIME(&stop_time_val ); -} -/* Function: get_time - Return an abstract "ticks" number that signifies time on the system. - - Actual value returned may be cpu cycles, milliseconds or any other value, - as long as it can be converted to seconds by . - This methodology is taken to accomodate any hardware or simulated platform. - The sample implementation returns millisecs by default, - and the resolution is controlled by -*/ -CORE_TICKS get_time(void) { - CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val)); - return elapsed; -} -/* Function: time_in_secs - Convert the value returned by get_time to seconds. - - The type is used to accomodate systems with no support for floating point. - Default implementation implemented by the EE_TICKS_PER_SEC macro above. -*/ -secs_ret time_in_secs(CORE_TICKS ticks) { - secs_ret retval=((secs_ret)ticks) / (secs_ret)EE_TICKS_PER_SEC; - return retval; -} -#else -#error "Please implement timing functionality in core_portme.c" -#endif /* SAMPLE_TIME_IMPLEMENTATION */ - -ee_u32 default_num_contexts=MULTITHREAD; - -/* Function: portable_init - Target specific initialization code - Test for some common mistakes. -*/ -void portable_init(core_portable *p, int *argc, char *argv[]) -{ -#if PRINT_ARGS - int i; - for (i=0; i<*argc; i++) { - ee_printf("Arg[%d]=%s\n",i,argv[i]); - } -#endif - if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) { - ee_printf("ERROR! Please define ee_ptr_int to a type that holds a pointer!\n"); - } - if (sizeof(ee_u32) != 4) { - ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n"); - } -#if (MAIN_HAS_NOARGC && (SEED_METHOD==SEED_ARG)) - ee_printf("ERROR! Main has no argc, but SEED_METHOD defined to SEED_ARG!\n"); -#endif - -#if (MULTITHREAD>1) && (SEED_METHOD==SEED_ARG) - { - int nargs=*argc,i; - if ((nargs>1) && (*argv[1]=='M')) { - default_num_contexts=parseval(argv[1]+1); - if (default_num_contexts>MULTITHREAD) - default_num_contexts=MULTITHREAD; - /* Shift args since first arg is directed to the portable part and not to coremark main */ - --nargs; - for (i=1; i*/ - p->portable_id=1; -} -/* Function: portable_fini - Target specific final code -*/ -void portable_fini(core_portable *p) -{ - p->portable_id=0; -} - -#if (MULTITHREAD>1) - -/* Function: core_start_parallel - Start benchmarking in a parallel context. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -/* Function: core_stop_parallel - Stop a parallel context execution of coremark, and gather the results. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -#if USE_PTHREAD -ee_u8 core_start_parallel(core_results *res) { - return (ee_u8)pthread_create(&(res->port.thread),NULL,iterate,(void *)res); -} -ee_u8 core_stop_parallel(core_results *res) { - void *retval; - return (ee_u8)pthread_join(res->port.thread,&retval); -} -#elif USE_FORK -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - key_t key=4321+key_id; - key_id++; - res->port.pid=fork(); - res->port.shmid=shmget(key, 8, IPC_CREAT | 0666); - if (res->port.shmid<0) { - ee_printf("ERROR in shmget!\n"); - } - if (res->port.pid==0) { - iterate(res); - res->port.shm=shmat(res->port.shmid, NULL, 0); - /* copy the validation values to the shared memory area and quit*/ - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in child shmat!\n"); - } else { - memcpy(res->port.shm,&(res->crc),8); - shmdt(res->port.shm); - } - exit(0); - } - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - /* after process is done, get the values from the shared memory area */ - res->port.shm=shmat(res->port.shmid, NULL, 0); - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in parent shmat!\n"); - return 0; - } - memcpy(&(res->crc),res->port.shm,8); - shmdt(res->port.shm); - return 1; -} -#elif USE_SOCKET -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - int bound, buffer_length=8; - res->port.sa.sin_family = AF_INET; - res->port.sa.sin_addr.s_addr = htonl(0x7F000001); - res->port.sa.sin_port = htons(7654+key_id); - key_id++; - res->port.pid=fork(); - if (res->port.pid==0) { /* benchmark child */ - iterate(res); - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (-1 == res->port.sock) /* if socket failed to initialize, exit */ { - ee_printf("Error Creating Socket"); - } else { - int bytes_sent = sendto(res->port.sock, &(res->crc), buffer_length, 0,(struct sockaddr*)&(res->port.sa), sizeof (struct sockaddr_in)); - if (bytes_sent < 0) - ee_printf("Error sending packet: %s\n", strerror(errno)); - close(res->port.sock); /* close the socket */ - } - exit(0); - } - /* parent process, open the socket */ - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - bound = bind(res->port.sock,(struct sockaddr*)&(res->port.sa), sizeof(struct sockaddr)); - if (bound < 0) - ee_printf("bind(): %s\n",strerror(errno)); - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - int fromlen=sizeof(struct sockaddr); - int recsize = recvfrom(res->port.sock, &(res->crc), 8, 0, (struct sockaddr*)&(res->port.sa), &fromlen); - if (recsize < 0) { - ee_printf("Error in receive: %s\n", strerror(errno)); - return 0; - } - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - return 1; -} -#else /* no standard multicore implementation */ -#error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* multithread implementations */ -#endif diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.h deleted file mode 100755 index 2cf4659a4..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.h +++ /dev/null @@ -1,290 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -#ifndef CORE_PORTME_H -#define CORE_PORTME_H -/************************/ -/* Data types and settings */ -/************************/ -/* Configuration: HAS_FLOAT - Define to 1 if the platform supports floating point. -*/ -#ifndef HAS_FLOAT -#define HAS_FLOAT 1 -#endif -/* Configuration: HAS_TIME_H - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef HAS_TIME_H -#define HAS_TIME_H 1 -#endif -/* Configuration: USE_CLOCK - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef USE_CLOCK -#define USE_CLOCK 0 -#endif -/* Configuration: HAS_STDIO - Define to 1 if the platform has stdio.h. -*/ -#ifndef HAS_STDIO -#define HAS_STDIO 1 -#endif -/* Configuration: HAS_PRINTF - Define to 1 if the platform has stdio.h and implements the printf function. -*/ -#ifndef HAS_PRINTF -#define HAS_PRINTF 1 -#endif - -/* Configuration: CORE_TICKS - Define type of return from the timing functions. - */ -#if defined(_MSC_VER) -#include -typedef size_t CORE_TICKS; -#elif HAS_TIME_H -#include -typedef clock_t CORE_TICKS; -#else -#error "Please define type of CORE_TICKS and implement start_time, end_time get_time and time_in_secs functions!" -#endif - -/* Definitions: COMPILER_VERSION, COMPILER_FLAGS, MEM_LOCATION - Initialize these strings per platform -*/ -#ifndef COMPILER_VERSION - #ifdef __GNUC__ - #define COMPILER_VERSION "GCC"__VERSION__ - #else - #define COMPILER_VERSION "Please put compiler version here (e.g. gcc 4.1)" - #endif -#endif -#ifndef COMPILER_FLAGS - #define COMPILER_FLAGS FLAGS_STR /* "Please put compiler flags here (e.g. -o3)" */ -#endif -#ifndef MEM_LOCATION - #define MEM_LOCATION "Please put data memory location here\n\t\t\t(e.g. code in flash, data on heap etc)" - #define MEM_LOCATION_UNSPEC 1 -#endif - -/* Data Types: - To avoid compiler issues, define the data types that need ot be used for 8b, 16b and 32b in . - - *Imprtant*: - ee_ptr_int needs to be the data type used to hold pointers, otherwise coremark may fail!!! -*/ -typedef signed short ee_s16; -typedef unsigned short ee_u16; -typedef signed int ee_s32; -typedef double ee_f32; -typedef unsigned char ee_u8; -typedef unsigned int ee_u32; -typedef ee_u32 ee_ptr_int; -typedef size_t ee_size_t; -/* align_mem: - This macro is used to align an offset to point to a 32b value. It is used in the Matrix algorithm to initialize the input memory blocks. -*/ -#define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3)) - -/* Configuration: SEED_METHOD - Defines method to get seed values that cannot be computed at compile time. - - Valid values: - SEED_ARG - from command line. - SEED_FUNC - from a system function. - SEED_VOLATILE - from volatile variables. -*/ -#ifndef SEED_METHOD -#define SEED_METHOD SEED_ARG -#endif - -/* Configuration: MEM_METHOD - Defines method to get a block of memry. - - Valid values: - MEM_MALLOC - for platforms that implement malloc and have malloc.h. - MEM_STATIC - to use a static memory array. - MEM_STACK - to allocate the data block on the stack (NYI). -*/ -#ifndef MEM_METHOD -#define MEM_METHOD MEM_MALLOC -#endif - -/* Configuration: MULTITHREAD - Define for parallel execution - - Valid values: - 1 - only one context (default). - N>1 - will execute N copies in parallel. - - Note: - If this flag is defined to more then 1, an implementation for launching parallel contexts must be defined. - - Two sample implementations are provided. Use or to enable them. - - It is valid to have a different implementation of and in , - to fit a particular architecture. -*/ -#ifndef MULTITHREAD -#define MULTITHREAD 1 -#endif - -/* Configuration: USE_PTHREAD - Sample implementation for launching parallel contexts - This implementation uses pthread_thread_create and pthread_join. - - Valid values: - 0 - Do not use pthreads API. - 1 - Use pthreads API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_PTHREAD -#define USE_PTHREAD 0 -#endif - -/* Configuration: USE_FORK - Sample implementation for launching parallel contexts - This implementation uses fork, waitpid, shmget,shmat and shmdt. - - Valid values: - 0 - Do not use fork API. - 1 - Use fork API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_FORK -#define USE_FORK 0 -#endif - -/* Configuration: USE_SOCKET - Sample implementation for launching parallel contexts - This implementation uses fork, socket, sendto and recvfrom - - Valid values: - 0 - Do not use fork and sockets API. - 1 - Use fork and sockets API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_SOCKET -#define USE_SOCKET 0 -#endif - -/* Configuration: MAIN_HAS_NOARGC - Needed if platform does not support getting arguments to main. - - Valid values: - 0 - argc/argv to main is supported - 1 - argc/argv to main is not supported -*/ -#ifndef MAIN_HAS_NOARGC -#define MAIN_HAS_NOARGC 0 -#endif - -/* Configuration: MAIN_HAS_NORETURN - Needed if platform does not support returning a value from main. - - Valid values: - 0 - main returns an int, and return value will be 0. - 1 - platform does not support returning a value from main -*/ -#ifndef MAIN_HAS_NORETURN -#define MAIN_HAS_NORETURN 0 -#endif - -/* Variable: default_num_contexts - Number of contexts to spawn in multicore context. - Override this global value to change number of contexts used. - - Note: - This value may not be set higher then the define. - - To experiment, you can set the define to the highest value expected, and use argc/argv in the to set this value from the command line. -*/ -extern ee_u32 default_num_contexts; - -#if (MULTITHREAD>1) -#if USE_PTHREAD - #include - #define PARALLEL_METHOD "PThreads" -#elif USE_FORK - #include - #include - #include - #include - #include /* for memcpy */ - #define PARALLEL_METHOD "Fork" -#elif USE_SOCKET - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #define PARALLEL_METHOD "Sockets" -#else - #define PARALLEL_METHOD "Proprietary" - #error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* Method for multithreading */ -#endif /* MULTITHREAD > 1 */ - -typedef struct CORE_PORTABLE_S { -#if (MULTITHREAD>1) - #if USE_PTHREAD - pthread_t thread; - #elif USE_FORK - pid_t pid; - int shmid; - void *shm; - #elif USE_SOCKET - pid_t pid; - int sock; - struct sockaddr_in sa; - #endif /* Method for multithreading */ -#endif /* MULTITHREAD>1 */ - ee_u8 portable_id; -} core_portable; - -/* target specific init/fini */ -void portable_init(core_portable *p, int *argc, char *argv[]); -void portable_fini(core_portable *p); - -#if (SEED_METHOD==SEED_VOLATILE) - #if (VALIDATION_RUN || PERFORMANCE_RUN || PROFILE_RUN) - #define RUN_TYPE_FLAG 1 - #else - #if (TOTAL_DATA_SIZE==1200) - #define PROFILE_RUN 1 - #else - #define PERFORMANCE_RUN 1 - #endif - #endif -#endif /* SEED_METHOD==SEED_VOLATILE */ - -#endif /* CORE_PORTME_H */ diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.mak deleted file mode 100644 index 97b6d6ace..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux/core_portme.mak +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Original Author: Shay Gal-on - -include posix/core_portme.mak diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.c b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.c deleted file mode 100755 index fe8d29983..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.c +++ /dev/null @@ -1,336 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -#include -#include -#include "coremark.h" -#if CALLGRIND_RUN -#include -#endif - -#if (MEM_METHOD==MEM_MALLOC) -#include -/* Function: portable_malloc - Provide malloc() functionality in a platform specific way. -*/ -void *portable_malloc(size_t size) { - return malloc(size); -} -/* Function: portable_free - Provide free() functionality in a platform specific way. -*/ -void portable_free(void *p) { - free(p); -} -#else -void *portable_malloc(size_t size) { - return NULL; -} -void portable_free(void *p) { - p=NULL; -} -#endif - -#if (SEED_METHOD==SEED_VOLATILE) -#if VALIDATION_RUN - volatile ee_s32 seed1_volatile=0x3415; - volatile ee_s32 seed2_volatile=0x3415; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PERFORMANCE_RUN - volatile ee_s32 seed1_volatile=0x0; - volatile ee_s32 seed2_volatile=0x0; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PROFILE_RUN - volatile ee_s32 seed1_volatile=0x8; - volatile ee_s32 seed2_volatile=0x8; - volatile ee_s32 seed3_volatile=0x8; -#endif - volatile ee_s32 seed4_volatile=ITERATIONS; - volatile ee_s32 seed5_volatile=0; -#endif -/* Porting: Timing functions - How to capture time and convert to seconds must be ported to whatever is supported by the platform. - e.g. Read value from on board RTC, read value from cpu clock cycles performance counter etc. - Sample implementation for standard time.h and windows.h definitions included. -*/ -/* Define: TIMER_RES_DIVIDER - Divider to trade off timer resolution and total time that can be measured. - - Use lower values to increase resolution, but make sure that overflow does not occur. - If there are issues with the return value overflowing, increase this value. - */ -#if USE_CLOCK - #define NSECS_PER_SEC CLOCKS_PER_SEC - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE clock_t - #define GETMYTIME(_t) (*_t=clock()) - #define MYTIMEDIFF(fin,ini) ((fin)-(ini)) - #define TIMER_RES_DIVIDER 1 - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif defined(_MSC_VER) - #define NSECS_PER_SEC 10000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE FILETIME - #define GETMYTIME(_t) GetSystemTimeAsFileTime(_t) - #define MYTIMEDIFF(fin,ini) (((*(__int64*)&fin)-(*(__int64*)&ini))/TIMER_RES_DIVIDER) - /* setting to millisces resolution by default with MSDEV */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif HAS_TIME_H - #define NSECS_PER_SEC 1000000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE struct timespec - #define GETMYTIME(_t) clock_gettime(CLOCK_REALTIME,_t) - #define MYTIMEDIFF(fin,ini) ((fin.tv_sec-ini.tv_sec)*(NSECS_PER_SEC/TIMER_RES_DIVIDER)+(fin.tv_nsec-ini.tv_nsec)/TIMER_RES_DIVIDER) - /* setting to 1/1000 of a second resolution by default with linux */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#else - #define SAMPLE_TIME_IMPLEMENTATION 0 -#endif -#define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER) - -#if SAMPLE_TIME_IMPLEMENTATION -/** Define Host specific (POSIX), or target specific global time variables. */ -static CORETIMETYPE start_time_val, stop_time_val; - -/* Function: start_time - This function will be called right before starting the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or zeroing some system parameters - e.g. setting the cpu clocks cycles to 0. -*/ -void start_time(void) { - GETMYTIME(&start_time_val ); -#if CALLGRIND_RUN - CALLGRIND_START_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif -} -/* Function: stop_time - This function will be called right after ending the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or other system parameters - e.g. reading the current value of cpu cycles counter. -*/ -void stop_time(void) { -#if CALLGRIND_RUN - CALLGRIND_STOP_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif - GETMYTIME(&stop_time_val ); -} -/* Function: get_time - Return an abstract "ticks" number that signifies time on the system. - - Actual value returned may be cpu cycles, milliseconds or any other value, - as long as it can be converted to seconds by . - This methodology is taken to accomodate any hardware or simulated platform. - The sample implementation returns millisecs by default, - and the resolution is controlled by -*/ -CORE_TICKS get_time(void) { - CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val)); - return elapsed; -} -/* Function: time_in_secs - Convert the value returned by get_time to seconds. - - The type is used to accomodate systems with no support for floating point. - Default implementation implemented by the EE_TICKS_PER_SEC macro above. -*/ -secs_ret time_in_secs(CORE_TICKS ticks) { - secs_ret retval=((secs_ret)ticks) / (secs_ret)EE_TICKS_PER_SEC; - return retval; -} -#else -#error "Please implement timing functionality in core_portme.c" -#endif /* SAMPLE_TIME_IMPLEMENTATION */ - -ee_u32 default_num_contexts=MULTITHREAD; - -/* Function: portable_init - Target specific initialization code - Test for some common mistakes. -*/ -void portable_init(core_portable *p, int *argc, char *argv[]) -{ -#if PRINT_ARGS - int i; - for (i=0; i<*argc; i++) { - ee_printf("Arg[%d]=%s\n",i,argv[i]); - } -#endif - if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) { - ee_printf("ERROR! Please define ee_ptr_int to a type that holds a pointer!\n"); - } - if (sizeof(ee_u32) != 4) { - ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n"); - } -#if (MAIN_HAS_NOARGC && (SEED_METHOD==SEED_ARG)) - ee_printf("ERROR! Main has no argc, but SEED_METHOD defined to SEED_ARG!\n"); -#endif - -#if (MULTITHREAD>1) && (SEED_METHOD==SEED_ARG) - int nargs=*argc,i; - if ((nargs>1) && (*argv[1]=='M')) { - default_num_contexts=parseval(argv[1]+1); - if (default_num_contexts>MULTITHREAD) - default_num_contexts=MULTITHREAD; - /* Shift args since first arg is directed to the portable part and not to coremark main */ - --nargs; - for (i=1; i*/ - p->portable_id=1; -} -/* Function: portable_fini - Target specific final code -*/ -void portable_fini(core_portable *p) -{ - p->portable_id=0; -} - -#if (MULTITHREAD>1) - -/* Function: core_start_parallel - Start benchmarking in a parallel context. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -/* Function: core_stop_parallel - Stop a parallel context execution of coremark, and gather the results. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -#if USE_PTHREAD -ee_u8 core_start_parallel(core_results *res) { - return (ee_u8)pthread_create(&(res->port.thread),NULL,iterate,(void *)res); -} -ee_u8 core_stop_parallel(core_results *res) { - void *retval; - return (ee_u8)pthread_join(res->port.thread,&retval); -} -#elif USE_FORK -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - key_t key=4321+key_id; - key_id++; - res->port.pid=fork(); - res->port.shmid=shmget(key, 8, IPC_CREAT | 0666); - if (res->port.shmid<0) { - ee_printf("ERROR in shmget!\n"); - } - if (res->port.pid==0) { - iterate(res); - res->port.shm=shmat(res->port.shmid, NULL, 0); - /* copy the validation values to the shared memory area and quit*/ - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in child shmat!\n"); - } else { - memcpy(res->port.shm,&(res->crc),8); - shmdt(res->port.shm); - } - exit(0); - } - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - /* after process is done, get the values from the shared memory area */ - res->port.shm=shmat(res->port.shmid, NULL, 0); - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in parent shmat!\n"); - return 0; - } - memcpy(&(res->crc),res->port.shm,8); - shmdt(res->port.shm); - return 1; -} -#elif USE_SOCKET -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - int bound, buffer_length=8; - res->port.sa.sin_family = AF_INET; - res->port.sa.sin_addr.s_addr = htonl(0x7F000001); - res->port.sa.sin_port = htons(7654+key_id); - key_id++; - res->port.pid=fork(); - if (res->port.pid==0) { /* benchmark child */ - iterate(res); - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (-1 == res->port.sock) /* if socket failed to initialize, exit */ { - ee_printf("Error Creating Socket"); - } else { - int bytes_sent = sendto(res->port.sock, &(res->crc), buffer_length, 0,(struct sockaddr*)&(res->port.sa), sizeof (struct sockaddr_in)); - if (bytes_sent < 0) - ee_printf("Error sending packet: %s\n", strerror(errno)); - close(res->port.sock); /* close the socket */ - } - exit(0); - } - /* parent process, open the socket */ - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - bound = bind(res->port.sock,(struct sockaddr*)&(res->port.sa), sizeof(struct sockaddr)); - if (bound < 0) - ee_printf("bind(): %s\n",strerror(errno)); - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - int fromlen=sizeof(struct sockaddr); - int recsize = recvfrom(res->port.sock, &(res->crc), 8, 0, (struct sockaddr*)&(res->port.sa), &fromlen); - if (recsize < 0) { - ee_printf("Error in receive: %s\n", strerror(errno)); - return 0; - } - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - return 1; -} -#else /* no standard multicore implementation */ -#error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* multithread implementations */ -#endif diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.h b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.h deleted file mode 100755 index 1228a679b..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.h +++ /dev/null @@ -1,291 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -/* Topic: Description - This file contains configuration constants required to execute on different platforms -*/ -#ifndef CORE_PORTME_H -#define CORE_PORTME_H -/************************/ -/* Data types and settings */ -/************************/ -/* Configuration: HAS_FLOAT - Define to 1 if the platform supports floating point. -*/ -#ifndef HAS_FLOAT -#define HAS_FLOAT 1 -#endif -/* Configuration: HAS_TIME_H - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef HAS_TIME_H -#define HAS_TIME_H 1 -#endif -/* Configuration: USE_CLOCK - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef USE_CLOCK -#define USE_CLOCK 0 -#endif -/* Configuration: HAS_STDIO - Define to 1 if the platform has stdio.h. -*/ -#ifndef HAS_STDIO -#define HAS_STDIO 1 -#endif -/* Configuration: HAS_PRINTF - Define to 1 if the platform has stdio.h and implements the printf function. -*/ -#ifndef HAS_PRINTF -#define HAS_PRINTF 1 -#endif - -/* Configuration: CORE_TICKS - Define type of return from the timing functions. - */ -#if defined(_MSC_VER) -#include -typedef size_t CORE_TICKS; -#elif HAS_TIME_H -#include -typedef clock_t CORE_TICKS; -#else -#error "Please define type of CORE_TICKS and implement start_time, end_time get_time and time_in_secs functions!" -#endif - -/* Definitions: COMPILER_VERSION, COMPILER_FLAGS, MEM_LOCATION - Initialize these strings per platform -*/ -#ifndef COMPILER_VERSION - #ifdef __GNUC__ - #define COMPILER_VERSION "GCC"__VERSION__ - #else - #define COMPILER_VERSION "Please put compiler version here (e.g. gcc 4.1)" - #endif -#endif -#ifndef COMPILER_FLAGS - #define COMPILER_FLAGS FLAGS_STR /* "Please put compiler flags here (e.g. -o3)" */ -#endif -#ifndef MEM_LOCATION - #define MEM_LOCATION "Please put data memory location here\n\t\t\t(e.g. code in flash, data on heap etc)" - #define MEM_LOCATION_UNSPEC 1 -#endif - -/* Data Types: - To avoid compiler issues, define the data types that need ot be used for 8b, 16b and 32b in . - - *Imprtant*: - ee_ptr_int needs to be the data type used to hold pointers, otherwise coremark may fail!!! -*/ -typedef signed short ee_s16; -typedef unsigned short ee_u16; -typedef signed int ee_s32; -typedef double ee_f32; -typedef unsigned char ee_u8; -typedef unsigned int ee_u32; -typedef unsigned long long ee_ptr_int; -typedef size_t ee_size_t; -/* align an offset to point to a 32b value */ -#define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3)) - -/* Configuration: SEED_METHOD - Defines method to get seed values that cannot be computed at compile time. - - Valid values: - SEED_ARG - from command line. - SEED_FUNC - from a system function. - SEED_VOLATILE - from volatile variables. -*/ -#ifndef SEED_METHOD -#define SEED_METHOD SEED_ARG -#endif - -/* Configuration: MEM_METHOD - Defines method to get a block of memry. - - Valid values: - MEM_MALLOC - for platforms that implement malloc and have malloc.h. - MEM_STATIC - to use a static memory array. - MEM_STACK - to allocate the data block on the stack (NYI). -*/ -#ifndef MEM_METHOD -#define MEM_METHOD MEM_MALLOC -#endif - -/* Configuration: MULTITHREAD - Define for parallel execution - - Valid values: - 1 - only one context (default). - N>1 - will execute N copies in parallel. - - Note: - If this flag is defined to more then 1, an implementation for launching parallel contexts must be defined. - - Two sample implementations are provided. Use or to enable them. - - It is valid to have a different implementation of and in , - to fit a particular architecture. -*/ -#ifndef MULTITHREAD -#define MULTITHREAD 1 -#endif - -/* Configuration: USE_PTHREAD - Sample implementation for launching parallel contexts - This implementation uses pthread_thread_create and pthread_join. - - Valid values: - 0 - Do not use pthreads API. - 1 - Use pthreads API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_PTHREAD -#define USE_PTHREAD 0 -#endif - -/* Configuration: USE_FORK - Sample implementation for launching parallel contexts - This implementation uses fork, waitpid, shmget,shmat and shmdt. - - Valid values: - 0 - Do not use fork API. - 1 - Use fork API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_FORK -#define USE_FORK 0 -#endif - -/* Configuration: USE_SOCKET - Sample implementation for launching parallel contexts - This implementation uses fork, socket, sendto and recvfrom - - Valid values: - 0 - Do not use fork and sockets API. - 1 - Use fork and sockets API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_SOCKET -#define USE_SOCKET 0 -#endif - -/* Configuration: MAIN_HAS_NOARGC - Needed if platform does not support getting arguments to main. - - Valid values: - 0 - argc/argv to main is supported - 1 - argc/argv to main is not supported -*/ -#ifndef MAIN_HAS_NOARGC -#define MAIN_HAS_NOARGC 0 -#endif - -/* Configuration: MAIN_HAS_NORETURN - Needed if platform does not support returning a value from main. - - Valid values: - 0 - main returns an int, and return value will be 0. - 1 - platform does not support returning a value from main -*/ -#ifndef MAIN_HAS_NORETURN -#define MAIN_HAS_NORETURN 0 -#endif - -/* Variable: default_num_contexts - Number of contexts to spawn in multicore context. - Override this global value to change number of contexts used. - - Note: - This value may not be set higher then the define. - - To experiment, you can set the define to the highest value expected, and use argc/argv in the to set this value from the command line. -*/ -extern ee_u32 default_num_contexts; - -#if (MULTITHREAD>1) -#if USE_PTHREAD - #include - #define PARALLEL_METHOD "PThreads" -#elif USE_FORK - #include - #include - #include - #include - #include /* for memcpy */ - #define PARALLEL_METHOD "Fork" -#elif USE_SOCKET - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #define PARALLEL_METHOD "Sockets" -#else - #define PARALLEL_METHOD "Proprietary" - #error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* Method for multithreading */ -#endif /* MULTITHREAD > 1 */ - -typedef struct CORE_PORTABLE_S { -#if (MULTITHREAD>1) - #if USE_PTHREAD - pthread_t thread; - #elif USE_FORK - pid_t pid; - int shmid; - void *shm; - #elif USE_SOCKET - pid_t pid; - int sock; - struct sockaddr_in sa; - #endif /* Method for multithreading */ -#endif /* MULTITHREAD>1 */ - ee_u8 portable_id; -} core_portable; - -/* target specific init/fini */ -void portable_init(core_portable *p, int *argc, char *argv[]); -void portable_fini(core_portable *p); - -#if (SEED_METHOD==SEED_VOLATILE) - #if (VALIDATION_RUN || PERFORMANCE_RUN || PROFILE_RUN) - #define RUN_TYPE_FLAG 1 - #else - #if (TOTAL_DATA_SIZE==1200) - #define PROFILE_RUN 1 - #else - #define PERFORMANCE_RUN 1 - #endif - #endif -#endif /* SEED_METHOD==SEED_VOLATILE */ - -#endif /* CORE_PORTME_H */ diff --git a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.mak b/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.mak deleted file mode 100755 index 5cfabee32..000000000 --- a/benchmarks/riscv-coremark/old/extraPortmes/linux64/core_portme.mak +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Original Author: Shay Gal-on - -#File: core_portme.mak - -# Flag: OUTFLAG -# Use this flag to define how to to get an executable (e.g -o) -OUTFLAG= -o -# Flag: CC -# Use this flag to define compiler to use -CC = gcc -# Flag: CFLAGS -# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags" -PORT_CFLAGS = -O2 -FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)" -CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -#Flag: LFLAGS_END -# Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). -# Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt. -LFLAGS_END += -lrt -# Flag: PORT_SRCS -# Port specific source files can be added here -PORT_SRCS = $(PORT_DIR)/core_portme.c -# Flag: LOAD -# Define this flag if you need to load to a target, as in a cross compile environment. - -# Flag: RUN -# Define this flag if running does not consist of simple invocation of the binary. -# In a cross compile environment, you need to define this. - -#For flashing and using a tera term macro, you could use -#LOAD = flash ADDR -#RUN = ttpmacro coremark.ttl - -#For copying to target and executing via SSH connection, you could use -#LOAD = scp $(OUTFILE) user@target:~ -#RUN = ssh user@target -c - -#For native compilation and execution -LOAD = echo Loading done -RUN = - -OEXT = .o -EXE = .exe - -# Flag: SEPARATE_COMPILE -# Define if you need to separate compilation from link stage. -# In this case, you also need to define below how to create an object file, and how to link. -ifdef SEPARATE_COMPILE - -LD = gcc -OBJOUT = -o -LFLAGS = -OFLAG = -o -COUT = -c -# Flag: PORT_OBJS -# Port specific object files can be added here -PORT_OBJS = $(PORT_DIR)/core_portme$(OEXT) -PORT_CLEAN = *$(OEXT) - -$(OPATH)%$(OEXT) : %.c - $(CC) $(CFLAGS) $(XCFLAGS) $(COUT) $< $(OBJOUT) $@ - -endif - -# Target: port_prebuild -# Generate any files that are needed before actual build starts. -# E.g. generate profile guidance files. Sample PGO generation for gcc enabled with PGO=1 -# - First, check if PGO was defined on the command line, if so, need to add -fprofile-use to compile line. -# - Second, if PGO reference has not yet been generated, add a step to the prebuild that will build a profile-generate version and run it. -# Note - Using REBUILD=1 -# -# Use make PGO=1 to invoke this sample processing. - -ifdef PGO - ifeq (,$(findstring $(PGO),gen)) - PGO_STAGE=build_pgo_gcc - CFLAGS+=-fprofile-use - endif - PORT_CLEAN+=*.gcda *.gcno gmon.out -endif - -.PHONY: port_prebuild -port_prebuild: $(PGO_STAGE) - -.PHONY: build_pgo_gcc -build_pgo_gcc: - $(MAKE) PGO=gen XCFLAGS="$(XCFLAGS) -fprofile-generate -DTOTAL_DATA_SIZE=1200" ITERATIONS=10 gen_pgo_data REBUILD=1 - -# Target: port_postbuild -# Generate any files that are needed after actual build end. -# E.g. change format to srec, bin, zip in order to be able to load into flash -.PHONY: port_postbuild -port_postbuild: - -# Target: port_postrun -# Do platform specific after run stuff. -# E.g. reset the board, backup the logfiles etc. -.PHONY: port_postrun -port_postrun: - -# Target: port_prerun -# Do platform specific after run stuff. -# E.g. reset the board, backup the logfiles etc. -.PHONY: port_prerun -port_prerun: - -# Target: port_postload -# Do platform specific after load stuff. -# E.g. reset the reset power to the flash eraser -.PHONY: port_postload -port_postload: - -# Target: port_preload -# Do platform specific before load stuff. -# E.g. reset the reset power to the flash eraser -.PHONY: port_preload -port_preload: - -# FLAG: OPATH -# Path to the output folder. Default - current folder. -OPATH = ./ -MKDIR = mkdir -p - -# FLAG: PERL -# Define perl executable to calculate the geomean if running separate. -PERL=/usr/bin/perl diff --git a/benchmarks/riscv-coremark/old/riscv64/core_portme.c b/benchmarks/riscv-coremark/old/riscv64/core_portme.c deleted file mode 100755 index 8f17cb8bd..000000000 --- a/benchmarks/riscv-coremark/old/riscv64/core_portme.c +++ /dev/null @@ -1,346 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -#include -#include -#include "coremark.h" -#if CALLGRIND_RUN -#include -#endif - -#if (MEM_METHOD==MEM_MALLOC) -#include -/* Function: portable_malloc - Provide malloc() functionality in a platform specific way. -*/ -void *portable_malloc(size_t size) { - return malloc(size); -} -/* Function: portable_free - Provide free() functionality in a platform specific way. -*/ -void portable_free(void *p) { - free(p); -} -#else -void *portable_malloc(size_t size) { - return NULL; -} -void portable_free(void *p) { - p=NULL; -} -#endif - -#if (SEED_METHOD==SEED_VOLATILE) -#if VALIDATION_RUN - volatile ee_s32 seed1_volatile=0x3415; - volatile ee_s32 seed2_volatile=0x3415; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PERFORMANCE_RUN - volatile ee_s32 seed1_volatile=0x0; - volatile ee_s32 seed2_volatile=0x0; - volatile ee_s32 seed3_volatile=0x66; -#endif -#if PROFILE_RUN - volatile ee_s32 seed1_volatile=0x8; - volatile ee_s32 seed2_volatile=0x8; - volatile ee_s32 seed3_volatile=0x8; -#endif - volatile ee_s32 seed4_volatile=ITERATIONS; - volatile ee_s32 seed5_volatile=0; -#endif -/* Porting: Timing functions - How to capture time and convert to seconds must be ported to whatever is supported by the platform. - e.g. Read value from on board RTC, read value from cpu clock cycles performance counter etc. - Sample implementation for standard time.h and windows.h definitions included. -*/ -/* Define: TIMER_RES_DIVIDER - Divider to trade off timer resolution and total time that can be measured. - - Use lower values to increase resolution, but make sure that overflow does not occur. - If there are issues with the return value overflowing, increase this value. - */ -#if USE_CLOCK - #define NSECS_PER_SEC CLOCKS_PER_SEC - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE clock_t - #define GETMYTIME(_t) (*_t=clock()) - #define MYTIMEDIFF(fin,ini) ((fin)-(ini)) - #define TIMER_RES_DIVIDER 1 - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif defined(_MSC_VER) - #define NSECS_PER_SEC 10000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE FILETIME - #define GETMYTIME(_t) GetSystemTimeAsFileTime(_t) - #define MYTIMEDIFF(fin,ini) (((*(__int64*)&fin)-(*(__int64*)&ini))/TIMER_RES_DIVIDER) - /* setting to millisces resolution by default with MSDEV */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#elif HAS_TIME_H - #define NSECS_PER_SEC 1000000000 - #define EE_TIMER_TICKER_RATE 1000 - #define CORETIMETYPE struct timespec - #define GETMYTIME(_t) clock_gettime(CLOCK_REALTIME,_t) - #define MYTIMEDIFF(fin,ini) ((fin.tv_sec-ini.tv_sec)*(NSECS_PER_SEC/TIMER_RES_DIVIDER)+(fin.tv_nsec-ini.tv_nsec)/TIMER_RES_DIVIDER) - /* setting to 1/1000 of a second resolution by default with linux */ - #ifndef TIMER_RES_DIVIDER - #define TIMER_RES_DIVIDER 1000000 - #endif - #define SAMPLE_TIME_IMPLEMENTATION 1 -#else - // Defined for RISCV - #define NSECS_PER_SEC 1000000000 // TODO: What freq are we assuming? - #define EE_TIMER_TICKER_RATE 1000 // TODO: What is this? - #define CORETIMETYPE clock_t - #define read_csr(reg) ({ unsigned long __tmp; \ - asm volatile ("csrr %0, " #reg : "=r"(__tmp)); \ - __tmp; }) - #define GETMYTIME(_t) (*_t=read_csr(cycle)) - #define MYTIMEDIFF(fin,ini) ((fin)-(ini)) - #define TIMER_RES_DIVIDER 1 - #define SAMPLE_TIME_IMPLEMENTATION 1 -#endif -#define EE_TICKS_PER_SEC (NSECS_PER_SEC / TIMER_RES_DIVIDER) - -#if SAMPLE_TIME_IMPLEMENTATION -/** Define Host specific (POSIX), or target specific global time variables. */ -static CORETIMETYPE start_time_val, stop_time_val; - -/* Function: start_time - This function will be called right before starting the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or zeroing some system parameters - e.g. setting the cpu clocks cycles to 0. -*/ -void start_time(void) { - GETMYTIME(&start_time_val ); -#if CALLGRIND_RUN - CALLGRIND_START_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif -} -/* Function: stop_time - This function will be called right after ending the timed portion of the benchmark. - - Implementation may be capturing a system timer (as implemented in the example code) - or other system parameters - e.g. reading the current value of cpu cycles counter. -*/ -void stop_time(void) { -#if CALLGRIND_RUN - CALLGRIND_STOP_INSTRUMENTATION -#endif -#if MICA - asm volatile("int3");/*1 */ -#endif - GETMYTIME(&stop_time_val ); -} -/* Function: get_time - Return an abstract "ticks" number that signifies time on the system. - - Actual value returned may be cpu cycles, milliseconds or any other value, - as long as it can be converted to seconds by . - This methodology is taken to accomodate any hardware or simulated platform. - The sample implementation returns millisecs by default, - and the resolution is controlled by -*/ -CORE_TICKS get_time(void) { - CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val)); - return elapsed; -} -/* Function: time_in_secs - Convert the value returned by get_time to seconds. - - The type is used to accomodate systems with no support for floating point. - Default implementation implemented by the EE_TICKS_PER_SEC macro above. -*/ -secs_ret time_in_secs(CORE_TICKS ticks) { - secs_ret retval=((secs_ret)ticks) / (secs_ret)EE_TICKS_PER_SEC; - return retval; -} -#else -#error "Please implement timing functionality in core_portme.c" -#endif /* SAMPLE_TIME_IMPLEMENTATION */ - -ee_u32 default_num_contexts=MULTITHREAD; - -/* Function: portable_init - Target specific initialization code - Test for some common mistakes. -*/ -void portable_init(core_portable *p, int *argc, char *argv[]) -{ -#if PRINT_ARGS - int i; - for (i=0; i<*argc; i++) { - ee_printf("Arg[%d]=%s\n",i,argv[i]); - } -#endif - if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) { - ee_printf("ERROR! Please define ee_ptr_int to a type that holds a pointer!\n"); - } - if (sizeof(ee_u32) != 4) { - ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n"); - } -#if (MAIN_HAS_NOARGC && (SEED_METHOD==SEED_ARG)) - ee_printf("ERROR! Main has no argc, but SEED_METHOD defined to SEED_ARG!\n"); -#endif - -#if (MULTITHREAD>1) && (SEED_METHOD==SEED_ARG) - int nargs=*argc,i; - if ((nargs>1) && (*argv[1]=='M')) { - default_num_contexts=parseval(argv[1]+1); - if (default_num_contexts>MULTITHREAD) - default_num_contexts=MULTITHREAD; - /* Shift args since first arg is directed to the portable part and not to coremark main */ - --nargs; - for (i=1; i*/ - p->portable_id=1; -} -/* Function: portable_fini - Target specific final code -*/ -void portable_fini(core_portable *p) -{ - p->portable_id=0; -} - -#if (MULTITHREAD>1) - -/* Function: core_start_parallel - Start benchmarking in a parallel context. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -/* Function: core_stop_parallel - Stop a parallel context execution of coremark, and gather the results. - - Three implementations are provided, one using pthreads, one using fork and shared mem, and one using fork and sockets. - Other implementations using MCAPI or other standards can easily be devised. -*/ -#if USE_PTHREAD -ee_u8 core_start_parallel(core_results *res) { - return (ee_u8)pthread_create(&(res->port.thread),NULL,iterate,(void *)res); -} -ee_u8 core_stop_parallel(core_results *res) { - void *retval; - return (ee_u8)pthread_join(res->port.thread,&retval); -} -#elif USE_FORK -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - key_t key=4321+key_id; - key_id++; - res->port.pid=fork(); - res->port.shmid=shmget(key, 8, IPC_CREAT | 0666); - if (res->port.shmid<0) { - ee_printf("ERROR in shmget!\n"); - } - if (res->port.pid==0) { - iterate(res); - res->port.shm=shmat(res->port.shmid, NULL, 0); - /* copy the validation values to the shared memory area and quit*/ - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in child shmat!\n"); - } else { - memcpy(res->port.shm,&(res->crc),8); - shmdt(res->port.shm); - } - exit(0); - } - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - /* after process is done, get the values from the shared memory area */ - res->port.shm=shmat(res->port.shmid, NULL, 0); - if (res->port.shm == (char *) -1) { - ee_printf("ERROR in parent shmat!\n"); - return 0; - } - memcpy(&(res->crc),res->port.shm,8); - shmdt(res->port.shm); - return 1; -} -#elif USE_SOCKET -static int key_id=0; -ee_u8 core_start_parallel(core_results *res) { - int bound, buffer_length=8; - res->port.sa.sin_family = AF_INET; - res->port.sa.sin_addr.s_addr = htonl(0x7F000001); - res->port.sa.sin_port = htons(7654+key_id); - key_id++; - res->port.pid=fork(); - if (res->port.pid==0) { /* benchmark child */ - iterate(res); - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (-1 == res->port.sock) /* if socket failed to initialize, exit */ { - ee_printf("Error Creating Socket"); - } else { - int bytes_sent = sendto(res->port.sock, &(res->crc), buffer_length, 0,(struct sockaddr*)&(res->port.sa), sizeof (struct sockaddr_in)); - if (bytes_sent < 0) - ee_printf("Error sending packet: %s\n", strerror(errno)); - close(res->port.sock); /* close the socket */ - } - exit(0); - } - /* parent process, open the socket */ - res->port.sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - bound = bind(res->port.sock,(struct sockaddr*)&(res->port.sa), sizeof(struct sockaddr)); - if (bound < 0) - ee_printf("bind(): %s\n",strerror(errno)); - return 1; -} -ee_u8 core_stop_parallel(core_results *res) { - int status; - int fromlen=sizeof(struct sockaddr); - int recsize = recvfrom(res->port.sock, &(res->crc), 8, 0, (struct sockaddr*)&(res->port.sa), &fromlen); - if (recsize < 0) { - ee_printf("Error in receive: %s\n", strerror(errno)); - return 0; - } - pid_t wpid = waitpid(res->port.pid,&status,WUNTRACED); - if (wpid != res->port.pid) { - ee_printf("ERROR waiting for child.\n"); - if (errno == ECHILD) ee_printf("errno=No such child %d\n",res->port.pid); - if (errno == EINTR) ee_printf("errno=Interrupted\n"); - return 0; - } - return 1; -} -#else /* no standard multicore implementation */ -#error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* multithread implementations */ -#endif diff --git a/benchmarks/riscv-coremark/old/riscv64/core_portme.h b/benchmarks/riscv-coremark/old/riscv64/core_portme.h deleted file mode 100755 index 4e28afd36..000000000 --- a/benchmarks/riscv-coremark/old/riscv64/core_portme.h +++ /dev/null @@ -1,296 +0,0 @@ -/* -Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Original Author: Shay Gal-on -*/ - -/* Topic: Description - This file contains configuration constants required to execute on different platforms -*/ -#ifndef CORE_PORTME_H -#define CORE_PORTME_H -/************************/ -/* Data types and settings */ -/************************/ -/* Configuration: HAS_FLOAT - Define to 1 if the platform supports floating point. -*/ -#ifndef HAS_FLOAT -#define HAS_FLOAT 1 -#endif -/* Configuration: HAS_TIME_H - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef HAS_TIME_H -#define HAS_TIME_H 0 -#endif -/* Configuration: USE_CLOCK - Define to 1 if platform has the time.h header file, - and implementation of functions thereof. -*/ -#ifndef USE_CLOCK -#define USE_CLOCK 0 -#endif -/* Configuration: HAS_STDIO - Define to 1 if the platform has stdio.h. -*/ -#ifndef HAS_STDIO -#define HAS_STDIO 1 -#endif -/* Configuration: HAS_PRINTF - Define to 1 if the platform has stdio.h and implements the printf function. -*/ -#ifndef HAS_PRINTF -#define HAS_PRINTF 1 -#endif - -/* Configuration: CORE_TICKS - Define type of return from the timing functions. - */ -#if defined(_MSC_VER) -#include -typedef size_t CORE_TICKS; -#elif HAS_TIME_H -#include -typedef clock_t CORE_TICKS; -#else -/* Configuration: size_t and clock_t - Note these need to match the size of the clock output and the xLen the processor supports - */ -typedef unsigned long int size_t; -typedef unsigned long int clock_t; -typedef clock_t CORE_TICKS; -#endif - -/* Definitions: COMPILER_VERSION, COMPILER_FLAGS, MEM_LOCATION - Initialize these strings per platform -*/ -#ifndef COMPILER_VERSION - #ifdef __GNUC__ - #define COMPILER_VERSION "GCC"__VERSION__ - #else - #define COMPILER_VERSION "Please put compiler version here (e.g. gcc 4.1)" - #endif -#endif -#ifndef COMPILER_FLAGS - #define COMPILER_FLAGS FLAGS_STR /* "Please put compiler flags here (e.g. -o3)" */ -#endif -#ifndef MEM_LOCATION - #define MEM_LOCATION "Please put data memory location here\n\t\t\t(e.g. code in flash, data on heap etc)" - #define MEM_LOCATION_UNSPEC 1 -#endif - -/* Data Types: - To avoid compiler issues, define the data types that need ot be used for 8b, 16b and 32b in . - - *Imprtant*: - ee_ptr_int needs to be the data type used to hold pointers, otherwise coremark may fail!!! -*/ -typedef signed short ee_s16; -typedef unsigned short ee_u16; -typedef signed int ee_s32; -typedef double ee_f32; -typedef unsigned char ee_u8; -typedef unsigned int ee_u32; -typedef unsigned long long ee_ptr_int; -typedef size_t ee_size_t; -/* align an offset to point to a 32b value */ -#define align_mem(x) (void *)(4 + (((ee_ptr_int)(x) - 1) & ~3)) - -/* Configuration: SEED_METHOD - Defines method to get seed values that cannot be computed at compile time. - - Valid values: - SEED_ARG - from command line. - SEED_FUNC - from a system function. - SEED_VOLATILE - from volatile variables. -*/ -#ifndef SEED_METHOD -#define SEED_METHOD SEED_ARG -#endif - -/* Configuration: MEM_METHOD - Defines method to get a block of memry. - - Valid values: - MEM_MALLOC - for platforms that implement malloc and have malloc.h. - MEM_STATIC - to use a static memory array. - MEM_STACK - to allocate the data block on the stack (NYI). -*/ -#ifndef MEM_METHOD -#define MEM_METHOD MEM_MALLOC -#endif - -/* Configuration: MULTITHREAD - Define for parallel execution - - Valid values: - 1 - only one context (default). - N>1 - will execute N copies in parallel. - - Note: - If this flag is defined to more then 1, an implementation for launching parallel contexts must be defined. - - Two sample implementations are provided. Use or to enable them. - - It is valid to have a different implementation of and in , - to fit a particular architecture. -*/ -#ifndef MULTITHREAD -#define MULTITHREAD 1 -#endif - -/* Configuration: USE_PTHREAD - Sample implementation for launching parallel contexts - This implementation uses pthread_thread_create and pthread_join. - - Valid values: - 0 - Do not use pthreads API. - 1 - Use pthreads API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_PTHREAD -#define USE_PTHREAD 0 -#endif - -/* Configuration: USE_FORK - Sample implementation for launching parallel contexts - This implementation uses fork, waitpid, shmget,shmat and shmdt. - - Valid values: - 0 - Do not use fork API. - 1 - Use fork API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_FORK -#define USE_FORK 0 -#endif - -/* Configuration: USE_SOCKET - Sample implementation for launching parallel contexts - This implementation uses fork, socket, sendto and recvfrom - - Valid values: - 0 - Do not use fork and sockets API. - 1 - Use fork and sockets API - - Note: - This flag only matters if MULTITHREAD has been defined to a value greater then 1. -*/ -#ifndef USE_SOCKET -#define USE_SOCKET 0 -#endif - -/* Configuration: MAIN_HAS_NOARGC - Needed if platform does not support getting arguments to main. - - Valid values: - 0 - argc/argv to main is supported - 1 - argc/argv to main is not supported -*/ -#ifndef MAIN_HAS_NOARGC -#define MAIN_HAS_NOARGC 0 -#endif - -/* Configuration: MAIN_HAS_NORETURN - Needed if platform does not support returning a value from main. - - Valid values: - 0 - main returns an int, and return value will be 0. - 1 - platform does not support returning a value from main -*/ -#ifndef MAIN_HAS_NORETURN -#define MAIN_HAS_NORETURN 0 -#endif - -/* Variable: default_num_contexts - Number of contexts to spawn in multicore context. - Override this global value to change number of contexts used. - - Note: - This value may not be set higher then the define. - - To experiment, you can set the define to the highest value expected, and use argc/argv in the to set this value from the command line. -*/ -extern ee_u32 default_num_contexts; - -#if (MULTITHREAD>1) -#if USE_PTHREAD - #include - #define PARALLEL_METHOD "PThreads" -#elif USE_FORK - #include - #include - #include - #include - #include /* for memcpy */ - #define PARALLEL_METHOD "Fork" -#elif USE_SOCKET - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #define PARALLEL_METHOD "Sockets" -#else - #define PARALLEL_METHOD "Proprietary" - #error "Please implement multicore functionality in core_portme.c to use multiple contexts." -#endif /* Method for multithreading */ -#endif /* MULTITHREAD > 1 */ - -typedef struct CORE_PORTABLE_S { -#if (MULTITHREAD>1) - #if USE_PTHREAD - pthread_t thread; - #elif USE_FORK - pid_t pid; - int shmid; - void *shm; - #elif USE_SOCKET - pid_t pid; - int sock; - struct sockaddr_in sa; - #endif /* Method for multithreading */ -#endif /* MULTITHREAD>1 */ - ee_u8 portable_id; -} core_portable; - -/* target specific init/fini */ -void portable_init(core_portable *p, int *argc, char *argv[]); -void portable_fini(core_portable *p); - -#if (SEED_METHOD==SEED_VOLATILE) - #if (VALIDATION_RUN || PERFORMANCE_RUN || PROFILE_RUN) - #define RUN_TYPE_FLAG 1 - #else - #if (TOTAL_DATA_SIZE==1200) - #define PROFILE_RUN 1 - #else - #define PERFORMANCE_RUN 1 - #endif - #endif -#endif /* SEED_METHOD==SEED_VOLATILE */ - -#endif /* CORE_PORTME_H */ diff --git a/benchmarks/riscv-coremark/old/riscv64/core_portme.mak b/benchmarks/riscv-coremark/old/riscv64/core_portme.mak deleted file mode 100755 index edc341abc..000000000 --- a/benchmarks/riscv-coremark/old/riscv64/core_portme.mak +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Original Author: Shay Gal-on - -#File: core_portme.mak - -# Flag: RISCVTOOLS -# Use this flag to point to your RISCV tools -RISCVTOOLS=$(RISCV) -# Flag: RISCVTYPE -# Type of toolchain to use -RISCVTYPE=riscv64-unknown-elf -# Flag: OUTFLAG -# Use this flag to define how to to get an executable (e.g -o) -OUTFLAG= -o -# Flag: CC -# Use this flag to define compiler to use -CC = $(RISCVTOOLS)/bin/$(RISCVTYPE)-gcc -# Flag: CFLAGS -# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags" -#PORT_CFLAGS = -O2 -static -std=gnu99 -PORT_CFLAGS = -O2 -FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)" -CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -#Flag: LFLAGS_END -# Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). -# Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt. -LFLAGS_END += -# Flag: PORT_SRCS -# Port specific source files can be added here -PORT_SRCS = $(PORT_DIR)/core_portme.c -# Flag: LOAD -# Define this flag if you need to load to a target, as in a cross compile environment. - -# Flag: RUN -# Define this flag if running does not consist of simple invocation of the binary. -# In a cross compile environment, you need to define this. - -#For flashing and using a tera term macro, you could use -#LOAD = flash ADDR -#RUN = ttpmacro coremark.ttl - -#For copying to target and executing via SSH connection, you could use -#LOAD = scp $(OUTFILE) user@target:~ -#RUN = ssh user@target -c - -#For native compilation and execution -LOAD = echo Loading done -RUN = spike pk - -OEXT = .o -EXE = .riscv - -# Flag: SEPARATE_COMPILE -# Define if you need to separate compilation from link stage. -# In this case, you also need to define below how to create an object file, and how to link. -ifdef SEPARATE_COMPILE - -LD = $(RISCVTOOLS)/bin/$(RISCVTYPE)-gcc -OBJOUT = -o -LFLAGS = -OFLAG = -o -COUT = -c -# Flag: PORT_OBJS -# Port specific object files can be added here -PORT_OBJS = $(PORT_DIR)/core_portme$(OEXT) -PORT_CLEAN = *$(OEXT) - -$(OPATH)%$(OEXT) : %.c - $(CC) $(CFLAGS) $(XCFLAGS) $(COUT) $< $(OBJOUT) $@ - -endif - -# Target: port_prebuild -# Generate any files that are needed before actual build starts. -# E.g. generate profile guidance files. Sample PGO generation for gcc enabled with PGO=1 -# - First, check if PGO was defined on the command line, if so, need to add -fprofile-use to compile line. -# - Second, if PGO reference has not yet been generated, add a step to the prebuild that will build a profile-generate version and run it. -# Note - Using REBUILD=1 -# -# Use make PGO=1 to invoke this sample processing. - -ifdef PGO - ifeq (,$(findstring $(PGO),gen)) - PGO_STAGE=build_pgo_gcc - CFLAGS+=-fprofile-use - endif - PORT_CLEAN+=*.gcda *.gcno gmon.out -endif - -.PHONY: port_prebuild -port_prebuild: $(PGO_STAGE) - -.PHONY: build_pgo_gcc -build_pgo_gcc: - $(MAKE) PGO=gen XCFLAGS="$(XCFLAGS) -fprofile-generate -DTOTAL_DATA_SIZE=1200" ITERATIONS=10 gen_pgo_data REBUILD=1 - -# Target: port_postbuild -# Generate any files that are needed after actual build end. -# E.g. change format to srec, bin, zip in order to be able to load into flash -.PHONY: port_postbuild -port_postbuild: - -# Target: port_postrun -# Do platform specific after run stuff. -# E.g. reset the board, backup the logfiles etc. -.PHONY: port_postrun -port_postrun: - -# Target: port_prerun -# Do platform specific after run stuff. -# E.g. reset the board, backup the logfiles etc. -.PHONY: port_prerun -port_prerun: - -# Target: port_postload -# Do platform specific after load stuff. -# E.g. reset the reset power to the flash eraser -.PHONY: port_postload -port_postload: - -# Target: port_preload -# Do platform specific before load stuff. -# E.g. reset the reset power to the flash eraser -.PHONY: port_preload -port_preload: - -# FLAG: OPATH -# Path to the output folder. Default - current folder. -OPATH = ./ -MKDIR = mkdir -p - -# FLAG: PERL -# Define perl executable to calculate the geomean if running separate. -PERL=/usr/bin/perl diff --git a/benchmarks/riscv-coremark/old/trace b/benchmarks/riscv-coremark/old/trace deleted file mode 100644 index 7c76d0bfa..000000000 --- a/benchmarks/riscv-coremark/old/trace +++ /dev/null @@ -1,48 +0,0 @@ -Imperas riscvOVPsimPlus - - -riscvOVPsimPlus (64-Bit) v20210329.0 Open Virtual Platform simulator from www.IMPERAS.com. -Copyright (c) 2005-2021 Imperas Software Ltd. Contains Imperas Proprietary Information. -Licensed Software, All Rights Reserved. -Visit www.IMPERAS.com for multicore debug, verification and analysis solutions. - -riscvOVPsimPlus started: Wed May 12 17:55:33 2021 - - -Info (GDBT_PORT) Host: Tera.Eng.HMC.Edu, Port: 55460 -Info (DBC_LGDB) Starting Debugger /cad/riscv/imperas-riscv-tests/riscv-ovpsim-plus/bin/Linux64/riscv-none-embed-gdb -Info (GDBT_WAIT) Waiting for remote debugger to connect... -Info (OR_OF) Target 'riscvOVPsim/cpu' has object file read from 'coremark.bare.riscv' -Info (OR_PH) Program Headers: -Info (OR_PH) Type Offset VirtAddr PhysAddr -Info (OR_PH) FileSiz MemSiz Flags Align -Info (OR_PD) LOAD 0x0000000000001000 0x0000000080000000 0x0000000080000000 -Info (OR_PD) 0x0000000000000204 0x0000000000000204 R-E 1000 -Info (OR_PD) LOAD 0x0000000000002000 0x0000000080001000 0x0000000080001000 -Info (OR_PD) 0x00000000000047e0 0x0000000000004ff0 RWE 1000 -Info (GDBT_CONNECTED) Client connected -Info (GDBT_GON) Client disappeared 'riscvOVPsim/cpu' -Info -Info --------------------------------------------------- -Info CPU 'riscvOVPsim/cpu' STATISTICS -Info Type : riscv (RV64GC) -Info Nominal MIPS : 100 -Info Final program counter : 0x80003558 -Info Simulated instructions: 1,455,608 -Info Simulated MIPS : 0.0 -Info --------------------------------------------------- -Info -Info --------------------------------------------------- -Info SIMULATION TIME STATISTICS -Info Simulated time : 0.02 seconds -Info User time : 99.23 seconds -Info System time : 254.08 seconds -Info Elapsed time : 1107.49 seconds -Info --------------------------------------------------- - -riscvOVPsimPlus finished: Wed May 12 18:14:04 2021 - - -riscvOVPsimPlus (64-Bit) v20210329.0 Open Virtual Platform simulator from www.IMPERAS.com. -Visit www.IMPERAS.com for multicore debug, verification and analysis solutions. - diff --git a/benchmarks/riscv-coremark/old/transferobjdump.sh b/benchmarks/riscv-coremark/old/transferobjdump.sh deleted file mode 100755 index 69578566a..000000000 --- a/benchmarks/riscv-coremark/old/transferobjdump.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/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/pipelined/regression/sim-coremark-batch b/pipelined/regression/sim-coremark-batch deleted file mode 100755 index 54b8bc391..000000000 --- a/pipelined/regression/sim-coremark-batch +++ /dev/null @@ -1 +0,0 @@ -vsim -c -do wally-coremark.do diff --git a/pipelined/regression/wally-coremark.do b/pipelined/regression/wally-coremark.do deleted file mode 100644 index a5fae409a..000000000 --- a/pipelined/regression/wally-coremark.do +++ /dev/null @@ -1,45 +0,0 @@ -# wally-coremark.do -# -# Modification by Oklahoma State University & Harvey Mudd College -# Use with Testbench -# James Stine, 2008; David Harris 2021 -# Go Cowboys!!!!!! -# -# Takes 1:10 to run RV64IC tests using gui - -# Use this wally-coremark.do file to run this example. -# Either bring up ModelSim and type the following at the "ModelSim>" 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 ../src/*/*/*.sv -suppress 2583 -vlog +incdir+../config/rv64gc +incdir+../config/shared ../testbench/testbench-coremark_bare.sv ../testbench/common/*.sv ../src/*/*.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/ram/ram/RAM - -#add log -recursive /* -do wave.do -run -all -#run 21400 -#quit diff --git a/pipelined/regression/wave-coremark.do b/pipelined/regression/wave-coremark.do deleted file mode 100644 index 20248f35f..000000000 --- a/pipelined/regression/wave-coremark.do +++ /dev/null @@ -1,502 +0,0 @@ -onerror {resume} -quietly WaveActivateNextPane {} 0 -add wave -noupdate /testbench/clk -add wave -noupdate /testbench/reset -add wave -noupdate /testbench/test -add wave -noupdate /testbench/memfilename -add wave -noupdate /testbench/dut/core/SATP_REGW -add wave -noupdate -group {Execution Stage} /testbench/dut/core/ifu/PCE -add wave -noupdate -group {Execution Stage} /testbench/InstrEName -add wave -noupdate -group {Execution Stage} /testbench/dut/core/ifu/InstrE -add wave -noupdate -expand -group {Memory Stage} /testbench/dut/core/priv/trap/InstrValidM -add wave -noupdate -expand -group {Memory Stage} /testbench/dut/core/PCM -add wave -noupdate -expand -group {Memory Stage} /testbench/InstrMName -add wave -noupdate -expand -group {Memory Stage} /testbench/dut/core/InstrM -add wave -noupdate -expand -group {Memory Stage} /testbench/dut/core/lsu/MemAdrM -add wave -noupdate /testbench/dut/core/ieu/dp/ResultM -add wave -noupdate /testbench/dut/core/ieu/dp/ResultW -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/InstrMisalignedFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/InstrAccessFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/IllegalInstrFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/BreakpointFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/LoadMisalignedFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/StoreAmoMisalignedFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/LoadAccessFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/StoreAmoAccessFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/EcallFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/InstrPageFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/LoadPageFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/StorePageFaultM -add wave -noupdate -expand -group HDU -group traps /testbench/dut/core/priv/trap/InterruptM -add wave -noupdate -expand -group HDU -group interrupts /testbench/dut/core/priv/trap/PendingIntsM -add wave -noupdate -expand -group HDU -group interrupts /testbench/dut/core/priv/trap/CommittedM -add wave -noupdate -expand -group HDU -group interrupts /testbench/dut/core/priv/trap/InstrValidM -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/BPPredWrongE -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/CSRWritePendingDEM -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/RetM -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/TrapM -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/LoadStallD -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/StoreStallD -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/ICacheStallF -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/hzu/LSUStallM -add wave -noupdate -expand -group HDU -expand -group hazards /testbench/dut/core/MulDivStallD -add wave -noupdate -expand -group HDU -group Flush -color Yellow /testbench/dut/core/hzu/FlushF -add wave -noupdate -expand -group HDU -group Flush -color Yellow /testbench/dut/core/FlushD -add wave -noupdate -expand -group HDU -group Flush -color Yellow /testbench/dut/core/FlushE -add wave -noupdate -expand -group HDU -group Flush -color Yellow /testbench/dut/core/FlushM -add wave -noupdate -expand -group HDU -group Flush -color Yellow /testbench/dut/core/FlushW -add wave -noupdate -expand -group HDU -group Stall -color Orange /testbench/dut/core/StallF -add wave -noupdate -expand -group HDU -group Stall -color Orange /testbench/dut/core/StallD -add wave -noupdate -expand -group HDU -group Stall -color Orange /testbench/dut/core/StallE -add wave -noupdate -expand -group HDU -group Stall -color Orange /testbench/dut/core/StallM -add wave -noupdate -expand -group HDU -group Stall -color Orange /testbench/dut/core/StallW -add wave -noupdate -group Bpred -color Orange /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHR -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPPredF -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/InstrClassE[0]} -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPInstrClassE[0]} -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPPredDirWrongE -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} -divider {class check} -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPClassRightNonCFI -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPClassWrongCFI -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPClassWrongNonCFI -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPClassRightBPRight -add wave -noupdate -group Bpred -expand -group {branch update selection inputs} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/BPClassRightBPWrong -add wave -noupdate -group Bpred -radix hexadecimal -childformat {{{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[6]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[5]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[4]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[3]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[2]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[1]} -radix binary} {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[0]} -radix binary}} -subitemconfig {{/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[6]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[5]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[4]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[3]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[2]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[1]} {-height 16 -radix binary} {/testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel[0]} {-height 16 -radix binary}} /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRMuxSel -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRNext -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRUpdateEN -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHTUpdateAdr -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHTUpdateAdr0 -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHTUpdateAdr1 -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHTUpdateEN -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/GHRLookup -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PCNextF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHT/RA1 -add wave -noupdate -group Bpred -expand -group prediction -radix binary /testbench/dut/core/ifu/bpred/bpred/BPPredF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/BTBValidF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/BPInstrClassF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/BTBPredPCF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/RASPCF -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/LookUpPCIndex -add wave -noupdate -group Bpred -expand -group prediction /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/TargetPC -add wave -noupdate -group Bpred -expand -group prediction -expand -group ex -radix binary /testbench/dut/core/ifu/bpred/bpred/BPPredE -add wave -noupdate -group Bpred -expand -group prediction -expand -group ex /testbench/dut/core/ifu/bpred/bpred/PCSrcE -add wave -noupdate -group Bpred -expand -group prediction -expand -group ex /testbench/dut/core/ifu/bpred/bpred/BPPredDirWrongE -add wave -noupdate -group Bpred -expand -group update -expand -group BTB /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/UpdatePCIndex -add wave -noupdate -group Bpred -expand -group update -expand -group BTB /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/UpdateTarget -add wave -noupdate -group Bpred -expand -group update -expand -group BTB /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/UpdateEN -add wave -noupdate -group Bpred -expand -group update -expand -group BTB /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/UpdatePC -add wave -noupdate -group Bpred -expand -group update -expand -group BTB /testbench/dut/core/ifu/bpred/bpred/TargetPredictor/UpdateTarget -add wave -noupdate -group Bpred -expand -group update -expand -group direction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHTUpdateAdr -add wave -noupdate -group Bpred -expand -group update -expand -group direction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PCE -add wave -noupdate -group Bpred -expand -group update -expand -group direction /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/PHT/WA1 -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/TargetWrongE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/FallThroughWrongE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/PredictionPCWrongE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/InstrClassE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/PredictionInstrClassWrongE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/BPPredClassNonCFIWrongE -add wave -noupdate -group Bpred -expand -group {bp wrong} /testbench/dut/core/ifu/bpred/bpred/BPPredWrongE -add wave -noupdate -group Bpred /testbench/dut/core/ifu/bpred/bpred/BPPredWrongE -add wave -noupdate -group {instruction pipeline} /testbench/InstrFName -add wave -noupdate -group {instruction pipeline} /testbench/dut/core/ifu/bus/icache/FinalInstrRawF -add wave -noupdate -group {instruction pipeline} /testbench/dut/core/ifu/InstrD -add wave -noupdate -group {instruction pipeline} /testbench/dut/core/ifu/InstrE -add wave -noupdate -group {instruction pipeline} /testbench/dut/core/ifu/InstrM -add wave -noupdate -group {instruction pipeline} /testbench/InstrW -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PCNextF -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PCF -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PCPlus2or4F -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/BPPredPCF -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PCNext0F -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PCNext1F -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/SelBPPredF -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/BPPredWrongE -add wave -noupdate -group {PCNext Generation} /testbench/dut/core/ifu/PrivilegedChangePCM -add wave -noupdate -group {Decode Stage} /testbench/dut/core/ifu/InstrD -add wave -noupdate -group {Decode Stage} /testbench/InstrDName -add wave -noupdate -group {Decode Stage} /testbench/dut/core/ieu/c/RegWriteD -add wave -noupdate -group {Decode Stage} /testbench/dut/core/ieu/dp/RdD -add wave -noupdate -group {Decode Stage} /testbench/dut/core/ieu/dp/Rs1D -add wave -noupdate -group {Decode Stage} /testbench/dut/core/ieu/dp/Rs2D -add wave -noupdate -group RegFile -expand /testbench/dut/core/ieu/dp/regf/rf -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/a1 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/a2 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/a3 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/rd1 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/rd2 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/we3 -add wave -noupdate -group RegFile /testbench/dut/core/ieu/dp/regf/wd3 -add wave -noupdate -group RegFile -group {write regfile mux} /testbench/dut/core/ieu/dp/ReadDataW -add wave -noupdate -group RegFile -group {write regfile mux} /testbench/dut/core/ieu/dp/CSRReadValW -add wave -noupdate -group RegFile -group {write regfile mux} /testbench/dut/core/ieu/dp/ResultSrcW -add wave -noupdate -group RegFile -group {write regfile mux} /testbench/dut/core/ieu/dp/ResultW -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/A -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/B -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/ALUControl -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/result -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/FlagsE -add wave -noupdate -group alu -divider internals -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/overflow -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/carry -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/zero -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/neg -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/lt -add wave -noupdate -group alu /testbench/dut/core/ieu/dp/alu/ltu -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/Rs1D -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/Rs2D -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/Rs1E -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/Rs2E -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/RdE -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/RdM -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/RdW -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/MemReadE -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/RegWriteM -add wave -noupdate -group Forward /testbench/dut/core/ieu/fw/RegWriteW -add wave -noupdate -group Forward -color Thistle /testbench/dut/core/ieu/fw/ForwardAE -add wave -noupdate -group Forward -color Thistle /testbench/dut/core/ieu/fw/ForwardBE -add wave -noupdate -group Forward -color Thistle /testbench/dut/core/ieu/fw/LoadStallD -add wave -noupdate -group {alu execution stage} /testbench/dut/core/ieu/dp/WriteDataE -add wave -noupdate -group {alu execution stage} /testbench/dut/core/ieu/dp/ALUResultE -add wave -noupdate -group {alu execution stage} /testbench/dut/core/ieu/dp/SrcAE -add wave -noupdate -group {alu execution stage} /testbench/dut/core/ieu/dp/SrcBE -add wave -noupdate -group PCS /testbench/dut/core/ifu/PCNextF -add wave -noupdate -group PCS /testbench/dut/core/PCF -add wave -noupdate -group PCS /testbench/dut/core/ifu/PCD -add wave -noupdate -group PCS /testbench/dut/core/PCE -add wave -noupdate -group PCS /testbench/dut/core/PCM -add wave -noupdate -group PCS /testbench/PCW -add wave -noupdate -group muldiv /testbench/dut/core/mdu/Funct3E -add wave -noupdate -group muldiv /testbench/dut/core/mdu/MulDivE -add wave -noupdate -group muldiv /testbench/dut/core/mdu/W64E -add wave -noupdate -group muldiv /testbench/dut/core/mdu/StallM -add wave -noupdate -group muldiv /testbench/dut/core/mdu/StallW -add wave -noupdate -group muldiv /testbench/dut/core/mdu/FlushM -add wave -noupdate -group muldiv /testbench/dut/core/mdu/FlushW -add wave -noupdate -group muldiv /testbench/dut/core/mdu/MulDivResultW -add wave -noupdate -group muldiv /testbench/dut/core/mdu/DivBusyE -add wave -noupdate -group icache -color Gold /testbench/dut/core/ifu/bus/icache/controller/CurrState -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/BasePAdrF -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/HitWay -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/VictimWay -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/WriteEnable} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/SetValid} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -label TAG {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/CacheTagMem/StoredData} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/ValidBits} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -expand -group Way0Word0 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[0]/CacheDataMem/StoredData} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -expand -group Way0Word0 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[0]/CacheDataMem/WriteEnable} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word1 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[1]/CacheDataMem/StoredData} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word1 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[1]/CacheDataMem/WriteEnable} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word2 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[2]/CacheDataMem/WriteEnable} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word2 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[2]/CacheDataMem/StoredData} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word3 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[3]/CacheDataMem/WriteEnable} -add wave -noupdate -group icache -expand -group {Cache SRAM writes} -group way0 -group Way0Word3 {/testbench/dut/core/ifu/bus/icache/CacheWays[0]/word[3]/CacheDataMem/StoredData} -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/controller/NextState -add wave -noupdate -group icache /testbench/dut/core/ifu/ITLBMissF -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/ITLBWriteF -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/ReadLineF -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/ReadLineF -add wave -noupdate -group icache /testbench/dut/core/ifu/bus/icache/BasePAdrF -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/hit -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/spill -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/ICacheStallF -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/spillSave -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/spillSave -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/CntReset -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/PreCntEn -add wave -noupdate -group icache -expand -group {fsm out and control} /testbench/dut/core/ifu/bus/icache/controller/CntEn -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/InstrPAdrF -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/InstrInF -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/controller/FetchCountFlag -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/FetchCount -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/controller/InstrReadF -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/controller/InstrAckF -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/controller/ICacheMemWriteEnable -add wave -noupdate -group icache -expand -group memory /testbench/dut/core/ifu/bus/icache/ICacheBusWriteData -add wave -noupdate -group AHB -color Gold /testbench/dut/core/ebu/BusState -add wave -noupdate -group AHB /testbench/dut/core/ebu/NextBusState -add wave -noupdate -group AHB -expand -group {input requests} /testbench/dut/core/ebu/AtomicMaskedM -add wave -noupdate -group AHB -expand -group {input requests} /testbench/dut/core/ebu/InstrReadF -add wave -noupdate -group AHB -expand -group {input requests} /testbench/dut/core/ebu/MemSizeM -add wave -noupdate -group AHB /testbench/dut/core/ebu/HCLK -add wave -noupdate -group AHB /testbench/dut/core/ebu/HRESETn -add wave -noupdate -group AHB /testbench/dut/core/ebu/HRDATA -add wave -noupdate -group AHB /testbench/dut/core/ebu/HREADY -add wave -noupdate -group AHB /testbench/dut/core/ebu/HRESP -add wave -noupdate -group AHB /testbench/dut/core/ebu/HADDR -add wave -noupdate -group AHB /testbench/dut/core/ebu/HWDATA -add wave -noupdate -group AHB /testbench/dut/core/ebu/HWRITE -add wave -noupdate -group AHB /testbench/dut/core/ebu/HSIZE -add wave -noupdate -group AHB /testbench/dut/core/ebu/HBURST -add wave -noupdate -group AHB /testbench/dut/core/ebu/HPROT -add wave -noupdate -group AHB /testbench/dut/core/ebu/HTRANS -add wave -noupdate -group AHB /testbench/dut/core/ebu/HMASTLOCK -add wave -noupdate -group AHB /testbench/dut/core/ebu/HADDRD -add wave -noupdate -group AHB /testbench/dut/core/ebu/HSIZED -add wave -noupdate -group AHB /testbench/dut/core/ebu/HWRITED -add wave -noupdate -group lsu -expand -group {LSU ARB} /testbench/dut/core/lsu/arbiter/SelPTW -add wave -noupdate -group lsu -expand -group dcache -color Gold /testbench/dut/core/lsu.bus.dcache/dcachefsm/CurrState -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/WalkerPageFaultM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/WriteDataM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SRAMBlockWriteEnableM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SRAMWordWriteEnableM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SRAMWayWriteEnable -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SRAMWordEnable -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SRAMBlockWayWriteEnableM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/SelAdrM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/ReadDataBlockM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/DCacheBusWriteData -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/SetValid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/SetDirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -label TAG {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/CacheTagMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/DirtyBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/ValidBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[0]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[0]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[1]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[1]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[2]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[2]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[3]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way0 -expand -group Way0Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/word[3]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/DirtyBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/SetDirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/WriteWordEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -label TAG {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/CacheTagMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[0]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[0]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[1]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[1]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[2]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[2]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[3]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way1 -expand -group Way1Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/word[3]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/SetValid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/SetDirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -label TAG {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/CacheTagMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/DirtyBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/ValidBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[0]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[0]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[1]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[1]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[2]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[2]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[3]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -group way2 -expand -group Way2Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/word[3]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/SetValid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/SetDirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -label TAG {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/CacheTagMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/DirtyBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/ValidBits} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[0]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[0]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[1]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[1]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[2]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[2]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[3]/CacheDataMem/WriteEnable} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group way3 -expand -group Way3Word3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/word[3]/CacheDataMem/StoredData} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group valid/dirty /testbench/dut/core/lsu.bus.dcache/SetValid -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group valid/dirty /testbench/dut/core/lsu.bus.dcache/ClearValid -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group valid/dirty /testbench/dut/core/lsu.bus.dcache/SetDirty -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM writes} -expand -group valid/dirty /testbench/dut/core/lsu.bus.dcache/ClearDirty -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/HitWay} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/Valid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/Dirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -group way0 {/testbench/dut/core/lsu.bus.dcache/CacheWays[0]/ReadTag} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/HitWay} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/Valid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/Dirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way1 {/testbench/dut/core/lsu.bus.dcache/CacheWays[1]/ReadTag} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/HitWay} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/Valid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/Dirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way2 {/testbench/dut/core/lsu.bus.dcache/CacheWays[2]/ReadTag} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/HitWay} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/Valid} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/Dirty} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} -expand -group way3 {/testbench/dut/core/lsu.bus.dcache/CacheWays[3]/ReadTag} -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} /testbench/dut/core/lsu.bus.dcache/HitWay -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} /testbench/dut/core/lsu.bus.dcache/ReadDataBlockWayMaskedM -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} /testbench/dut/core/lsu.bus.dcache/ReadDataWordM -add wave -noupdate -group lsu -expand -group dcache -group {Cache SRAM read} /testbench/dut/core/lsu.bus.dcache/ReadDataWordMuxM -add wave -noupdate -group lsu -expand -group dcache -group Victim /testbench/dut/core/lsu.bus.dcache/VictimTag -add wave -noupdate -group lsu -expand -group dcache -group Victim /testbench/dut/core/lsu.bus.dcache/VictimWay -add wave -noupdate -group lsu -expand -group dcache -group Victim /testbench/dut/core/lsu.bus.dcache/VictimDirtyWay -add wave -noupdate -group lsu -expand -group dcache -group Victim /testbench/dut/core/lsu.bus.dcache/VictimDirty -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/MemRWM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/MemAdrE -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/MemPAdrM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/Funct3M -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/Funct7M -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/AtomicM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/FlushDCacheM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/CacheableM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/WriteDataM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/ReadDataM -add wave -noupdate -group lsu -expand -group dcache -group {CPU side} /testbench/dut/core/lsu.bus.dcache/DCacheStallM -add wave -noupdate -group lsu -expand -group dcache /testbench/dut/core/lsu.bus.dcache/FlushAdrFlag -add wave -noupdate -group lsu -expand -group dcache -group status /testbench/dut/core/lsu.bus.dcache/HitWay -add wave -noupdate -group lsu -expand -group dcache -group status -color {Medium Orchid} /testbench/dut/core/lsu.bus.dcache/CacheHit -add wave -noupdate -group lsu -expand -group dcache -group status /testbench/dut/core/lsu.bus.dcache/FetchCount -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/FetchCountFlag -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/AHBPAdr -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/AHBRead -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/AHBWrite -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/AHBAck -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/HRDATA -add wave -noupdate -group lsu -expand -group dcache -expand -group {Memory Side} /testbench/dut/core/lsu.bus.dcache/HWDATA -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/genblk1/tlb/tlbcontrol/EffectivePrivilegeMode -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/genblk1/tlb/tlbcontrol/Translate -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/genblk1/tlb/tlbcontrol/DisableTranslation -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/TLBMiss -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/TLBHit -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/PhysicalAddress -add wave -noupdate -group lsu -group dtlb -expand -group faults /testbench/dut/core/lsu/dmmu/TLBPageFault -add wave -noupdate -group lsu -group dtlb -expand -group faults /testbench/dut/core/lsu/dmmu/LoadAccessFaultM -add wave -noupdate -group lsu -group dtlb -expand -group faults /testbench/dut/core/lsu/dmmu/StoreAmoAccessFaultM -add wave -noupdate -group lsu -group dtlb /testbench/dut/core/lsu/dmmu/genblk1/tlb/TLBPAdr -add wave -noupdate -group lsu -group dtlb -expand -group write /testbench/dut/core/lsu/dmmu/genblk1/tlb/PTE -add wave -noupdate -group lsu -group dtlb -expand -group write /testbench/dut/core/lsu/dmmu/genblk1/tlb/TLBWrite -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/pmachecker/PhysicalAddress -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/pmachecker/SelRegions -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/Cacheable -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/Idempotent -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/AtomicAllowed -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/pmachecker/PMAAccessFault -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/PMAInstrAccessFaultF -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/PMALoadAccessFaultM -add wave -noupdate -group lsu -group pma /testbench/dut/core/lsu/dmmu/PMAStoreAmoAccessFaultM -add wave -noupdate -group lsu -group pmp /testbench/dut/core/lsu/dmmu/PMPInstrAccessFaultF -add wave -noupdate -group lsu -group pmp /testbench/dut/core/lsu/dmmu/PMPLoadAccessFaultM -add wave -noupdate -group lsu -group pmp /testbench/dut/core/lsu/dmmu/PMPStoreAmoAccessFaultM -add wave -noupdate -group lsu -group ptwalker -color Gold /testbench/dut/core/lsu/hptw/genblk1/WalkerState -add wave -noupdate -group lsu -group ptwalker /testbench/dut/core/lsu/hptw/PCF -add wave -noupdate -group lsu -group ptwalker /testbench/dut/core/lsu/hptw/genblk1/TranslationVAdr -add wave -noupdate -group lsu -group ptwalker /testbench/dut/core/lsu/hptw/TranslationPAdr -add wave -noupdate -group lsu -group ptwalker /testbench/dut/core/lsu/hptw/HPTWReadPTE -add wave -noupdate -group lsu -group ptwalker /testbench/dut/core/lsu/hptw/PTE -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/ITLBMissF -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/DTLBMissM -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/ITLBWriteF -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/DTLBWriteM -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/WalkerInstrPageFaultF -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/WalkerLoadPageFaultM -add wave -noupdate -group lsu -group ptwalker -expand -group types /testbench/dut/core/lsu/hptw/WalkerStorePageFaultM -add wave -noupdate -group csr /testbench/dut/core/priv/csr/MIP_REGW -add wave -noupdate -group itlb /testbench/dut/core/ifu/immu/TLBWrite -add wave -noupdate -group itlb /testbench/dut/core/ifu/ITLBMissF -add wave -noupdate -group itlb /testbench/dut/core/ifu/immu/PhysicalAddress -add wave -noupdate /testbench/dut/core/lsu.bus.dcache/VAdr -add wave -noupdate /testbench/dut/core/lsu.bus.dcache/MemPAdrM -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HCLK -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HSELPLIC -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HADDR -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HWRITE -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HREADY -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HTRANS -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HWDATA -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/UARTIntr -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/GPIOIntr -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HREADPLIC -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HRESPPLIC -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/HREADYPLIC -add wave -noupdate -group plic /testbench/dut/uncore/plic/plic/ExtIntM -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HCLK -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HSELGPIO -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HADDR -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HWDATA -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HWRITE -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HREADY -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HTRANS -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HREADGPIO -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HRESPGPIO -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/HREADYGPIO -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/GPIOPinsIn -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/GPIOPinsOut -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/GPIOPinsEn -add wave -noupdate -group GPIO /testbench/dut/uncore/gpio/gpio/GPIOIntr -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HCLK -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HSELCLINT -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HADDR -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HWRITE -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HWDATA -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HREADY -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HTRANS -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HREADCLINT -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HRESPCLINT -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/HREADYCLINT -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/MTIME -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/MTIMECMP -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/TimerIntM -add wave -noupdate -group CLINT /testbench/dut/uncore/clint/clint/SwIntM -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HCLK -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HRESETn -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HSELUART -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HADDR -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HWRITE -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HWDATA -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HREADUART -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HRESPUART -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/HREADYUART -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/SIN -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/DSRb -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/DCDb -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/CTSb -add wave -noupdate -group uart /testbench/dut/uncore/uart/uart/RIb -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/SOUT -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/RTSb -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/DTRb -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/OUT1b -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/OUT2b -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/INTR -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/TXRDYb -add wave -noupdate -group uart -expand -group outputs /testbench/dut/uncore/uart/uart/RXRDYb -add wave -noupdate -group UART /testbench/dut/uncore/uart/uart/HCLK -add wave -noupdate -group UART /testbench/dut/uncore/uart/uart/HSELUART -add wave -noupdate -group UART /testbench/dut/uncore/uart/uart/HADDR -add wave -noupdate -group UART /testbench/dut/uncore/uart/uart/HWRITE -add wave -noupdate -group UART /testbench/dut/uncore/uart/uart/HWDATA -add wave -noupdate -radix unsigned /testbench/dut/core/priv/csr/genblk1/counters/genblk1/CYCLE_REGW -add wave -noupdate -radix unsigned /testbench/dut/core/priv/csr/genblk1/counters/genblk1/INSTRET_REGW -add wave -noupdate -label LoadStall -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[3]} -add wave -noupdate -label {Branch Instr} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[5]} -add wave -noupdate -label {BP Dir Wrong} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[4]} -add wave -noupdate -label {Jump, Jal, Jalr} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[7]} -add wave -noupdate -label {RAS Wrong} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[8]} -add wave -noupdate -label {BTB Wrong} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[6]} -add wave -noupdate -label {BP Class Non CFI Wrong} -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[10]} -add wave -noupdate -label DCacheAccess -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[11]} -add wave -noupdate -label DCacheMiss -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[12]} -add wave -noupdate -label Return -radix unsigned {/testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW[9]} -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/genblk1/HPMCOUNTER_REGW -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/MCOUNTINHIBIT_REGW -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/InstrValidM -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/genblk1/InstrValidNotFlushedM -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/BPPredDirWrongM -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/genblk1/genblk1/genblk1/LoadStallM -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/genblk1/genblk1/NextHPMCOUNTERM -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/DCacheMiss -add wave -noupdate /testbench/dut/core/priv/csr/genblk1/counters/DCacheAccess -TreeUpdate [SetDefaultTree] -WaveRestoreCursors {{Cursor 6} {17923831 ns} 0} -quietly wave cursor active 1 -configure wave -namecolwidth 250 -configure wave -valuecolwidth 297 -configure wave -justifyvalue left -configure wave -signalnamewidth 1 -configure wave -snapdistance 10 -configure wave -datasetprefix 0 -configure wave -rowmargin 4 -configure wave -childrowmargin 2 -configure wave -gridoffset 0 -configure wave -gridperiod 1 -configure wave -griddelta 40 -configure wave -timeline 0 -configure wave -timelineunits ns -update -WaveRestoreZoom {0 ns} {18715695 ns} diff --git a/pipelined/testbench/testbench-coremark_bare.sv b/pipelined/testbench/testbench-coremark_bare.sv deleted file mode 100644 index 6bde61db4..000000000 --- a/pipelined/testbench/testbench-coremark_bare.sv +++ /dev/null @@ -1,145 +0,0 @@ -/////////////////////////////////////////// -// testbench-imperas.sv -// -// Written: David_Harris@hmc.edu 9 January 2021 -// Modified: -// -// Purpose: Wally Testbench and helper modules -// Applies test programs from the Imperas suite -// -// A component of the Wally configurable RISC-V project. -// -// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University -// -// MIT LICENSE -// Permission is hereby granted, free of charge, to any person obtaining a copy of this -// software and associated documentation files (the "Software"), to deal in the Software -// without restriction, including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons -// to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or -// substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. -//////////////////////////////////////////////////////////////////////////////////////////////// -`include "wally-config.vh" -module testbench(); - logic clk; - logic reset, reset_ext; - int test, i, errors, totalerrors; - logic [31:0] sig32[10000:0]; - logic [`XLEN-1:0] signature[10000:0]; - logic [`XLEN-1:0] testadr; - string InstrFName, InstrDName, InstrEName, InstrMName, InstrWName; - logic [`XLEN-1:0] meminit; - string tests[]; - logic [`AHBW-1:0] HRDATAEXT; - logic HREADYEXT, HRESPEXT; - logic [31:0] HADDR; - logic [`AHBW-1:0] HWDATA; - logic HWRITE; - logic [2:0] HSIZE; - logic [2:0] HBURST; - logic [3:0] HPROT; - logic [1:0] HTRANS; - logic HMASTLOCK; - logic HCLK, HRESETn; - - // pick tests based on modes supported - initial -// tests = {"../../tests/imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark/coremarkcodemod.bare.riscv.memfile", "1000"}; - tests = {"../../benchmarks/riscv-coremark/work/coremark.bare.riscv.memfile", "1000"}; - string signame, memfilename; - logic [31:0] GPIOPinsIn, GPIOPinsOut, GPIOPinsEn; - logic UARTSin, UARTSout; - logic SDCCLK; - logic SDCCmdIn; - logic SDCCmdOut; - logic SDCCmdOE; - logic [3:0] SDCDatIn; - - logic HREADY; - logic HSELEXT; - - assign SDCmd = 1'bz; - assign SDCDat = 4'bz; - - - // instantiate device to be tested - assign GPIOPinsIn = 0; - assign UARTSin = 1; - assign HREADYEXT = 1; - assign HRESPEXT = 0; - assign HRDATAEXT = 0; - wallypipelinedsoc dut(.clk, .reset_ext, .reset(), .HRDATAEXT,.HREADYEXT, .HRESPEXT,.HSELEXT, - .HCLK, .HRESETn, .HADDR, .HWDATA, .HWRITE, .HSIZE, .HBURST, .HPROT, - .HTRANS, .HMASTLOCK, .HREADY, .TIMECLK(1'b0), .GPIOPinsIn, .GPIOPinsOut, .GPIOPinsEn, - .UARTSin, .UARTSout, .SDCCmdIn, .SDCCmdOut, .SDCCmdOE, .SDCDatIn, .SDCCLK); - - logic [31:0] InstrW; - flopenr #(32) InstrWReg(clk, reset, ~dut.core.ieu.dp.StallW, dut.core.ifu.InstrM, InstrW); - - // Track names of instructions - instrTrackerTB it(clk, reset, dut.core.ieu.dp.FlushE, - dut.core.ifu.FinalInstrRawF, - dut.core.ifu.InstrD, dut.core.ifu.InstrE, - dut.core.ifu.InstrM, InstrW, - InstrFName, InstrDName, InstrEName, InstrMName, InstrWName); -/* - instrTrackerTB it(clk, reset, dut.core.ieu.dp.FlushE, - dut.core.ifu.icache.controller.FinalInstrRawF, - dut.core.ifu.InstrD, dut.core.ifu.InstrE, - dut.core.ifu.InstrM, InstrW, - InstrFName, InstrDName, InstrEName, InstrMName, InstrWName); -*/ - logic [`XLEN-1:0] PCW; - flopenr #(`XLEN) PCWReg(clk, reset, ~StallW, dut.core.ifu.PCM, PCW); - - // initialize tests - integer j; - initial - begin - totalerrors = 0; - // read test vectors into memory - memfilename = tests[0]; - $readmemh(memfilename, dut.uncore.ram.ram.RAM); - //for(j=268437955; j < 268566528; j = j+1) - //dut.uncore.ram.RAM[j] = 64'b0; -// ProgramAddrMapFile = "../../imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark/coremark.RV64IM.bare.elf.objdump.addr"; -// ProgramAddrMapFile = "../../imperas-riscv-tests/riscv-ovpsim-plus/examples/CoreMark/coremark.RV64IM.bare.elf.objdump.lab"; - //dut.uncore.ram.RAM[268437713]=64'b1; - reset_ext = 1; # 22; reset_ext = 0; - end - // generate clock to sequence tests - always - begin - clk = 1; # 5; clk = 0; # 5; - end - always @(negedge clk) - begin - if (dut.core.priv.priv.ecallM) begin - #20; - $display("Code ended with ebreakM"); - $stop; - end - end - - initial begin -// $readmemb(`TWO_BIT_PRELOAD, dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.memory); -// $readmemb(`BTB_PRELOAD, dut.core.ifu.bpred.bpred.TargetPredictor.memory.memory); - $readmemb(`TWO_BIT_PRELOAD, dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem); - $readmemb(`BTB_PRELOAD, dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem); - - end - - - -endmodule -/* verilator lint_on STMTDLY */ -/* verilator lint_on WIDTH */ diff --git a/pipelined/testbench/tests.vh b/pipelined/testbench/tests.vh index 985958c5b..7e92741be 100644 --- a/pipelined/testbench/tests.vh +++ b/pipelined/testbench/tests.vh @@ -36,13 +36,10 @@ string tvpaths[] = '{ "../../addins/riscv-arch-test/work/", "../../tests/wally-riscv-arch-test/work/", "../../tests/imperas-riscv-tests/work/", - "../../benchmarks/riscv-coremark/work/", + "../../benchmarks/coremark/work/", "../../addins/embench-iot/bd_speed/src/" }; - - - // *** make sure these are somewhere string coremark[] = '{ `COREMARK, "coremark.bare.riscv"