diff --git a/bare-metal-bsp b/bare-metal-bsp index 9a78fe2..ef001e5 160000 --- a/bare-metal-bsp +++ b/bare-metal-bsp @@ -1 +1 @@ -Subproject commit 9a78fe247376c056cac0e6f716b8ee2a34f46c1d +Subproject commit ef001e55e8973799bc1b3b204b93708976b1e693 diff --git a/benchmarks/coremark/Makefile b/benchmarks/coremark/Makefile index ffc36d0..4586e49 100644 --- a/benchmarks/coremark/Makefile +++ b/benchmarks/coremark/Makefile @@ -1,6 +1,6 @@ TARGET := coremark ISA?=imc -ITERATIONS?=0 +ITERATIONS?=400 ASM_SRCS := C_SRCS := core_list_join.c core_main.c core_matrix.c core_state.c core_util.c core_portme.c ee_printf.c @@ -10,6 +10,7 @@ vpath %.c cm BOARD?=iss LINK_TARGET=link + RISCV_ARCH:=rv32$(ISA) ifeq ($(ISA),e) RISCV_ABI:=ilp32e @@ -30,7 +31,3 @@ TOOL_DIR=$(dir $(compiler)) BSP_BASE = ../../bare-metal-bsp include $(BSP_BASE)/env/common-gcc.mk - - -#riscv64-unknown-elf-gcc -march=rv32imc_zicsr_zifencei -mabi=ilp32 -O3 -DCLOCKS_PER_SEC=10000000 -nostdlib -nostartfiles -nodefaultlibs -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las -flto -g -DBOARD_TGCP -I../tgc -I. -DFLAGS_STR=\""-march=rv32imc_zicsr_zifencei -mabi=ilp32 -O3 -DCLOCKS_PER_SEC=10000000 -nostdlib -nostartfiles -nodefaultlibs -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las -flto -g -DBOARD_TGCP -DPERFORMANCE_RUN=1 -T ../../../bare-metal-bsp/env/TGCP/link.lds"\" -I../../../bare-metal-bsp/env/TGCP -DITERATIONS=0 -DPERFORMANCE_RUN=1 -c ../tgc/ee_printf.c -o ee_printf.o -#riscv64-unknown-elf-gcc -march=rv32imc_zicsr_zifencei -mabi=ilp32 -g ./core_list_join.o ./core_main.o ./core_matrix.o ./core_state.o ./core_util.o ./core_portme.o ./ee_printf.o -o ./coremark.elf -T ../../../bare-metal-bsp/env/TGCP/link.lds diff --git a/benchmarks/dhrystone/Makefile b/benchmarks/dhrystone/Makefile index 4416463..a1f01e0 100644 --- a/benchmarks/dhrystone/Makefile +++ b/benchmarks/dhrystone/Makefile @@ -1,5 +1,6 @@ TARGET := dhrystone ISA?=imc +ITERATIONS?=20000 ASM_SRCS := C_SRCS := dhry_stubs.c dhry_1.c dhry_2.c @@ -14,7 +15,7 @@ else RISCV_ABI:=ilp32 endif # '-lgcc -lm' are needed to add softfloat routines -CFLAGS := -g -march=$(RISCV_ARCH)_zicsr_zifencei -mabi=$(RISCV_ABI) -mcmodel=medlow -O3 -DHZ=32768 -DTIME -DNO_INIT -fno-inline -fno-builtin-printf -fno-common -Wno-implicit \ +CFLAGS := -g -march=$(RISCV_ARCH)_zicsr_zifencei -mabi=$(RISCV_ABI) -mcmodel=medlow -O3 -DITERATIONS=$(ITERATIONS) -DHZ=32768 -DTIME -DNO_INIT -fno-inline -fno-builtin-printf -fno-common -Wno-implicit \ -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las LDFLAGS := -g -march=$(RISCV_ARCH)_zicsr_zifencei -mabi=$(RISCV_ABI) -mcmodel=medlow -Wl,--wrap=scanf -Wl,--wrap=printf -Wl,--wrap=exit -lgcc -lm diff --git a/benchmarks/dhrystone/dhry_stubs.c b/benchmarks/dhrystone/dhry_stubs.c index cbaade5..a3e7b7c 100644 --- a/benchmarks/dhrystone/dhry_stubs.c +++ b/benchmarks/dhrystone/dhry_stubs.c @@ -1,4 +1,7 @@ #include "platform.h" +#ifndef ITERATIONS +#define ITERATIONS 20000 +#endif /* The functions in this file are only meant to support Dhrystone on an * embedded RV32 system and are obviously incorrect in general. */ @@ -11,7 +14,7 @@ long time(void) // set the number of dhrystone iterations void __wrap_scanf(const char* fmt, int* n) { - *n = 20000; + *n = ITERATIONS; } extern volatile uint32_t tohost;