Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
2024-06-30 07:54:36 +02:00
15 changed files with 75 additions and 365 deletions

View File

@ -1,11 +1,12 @@
TARGET := dhrystone
ISA?=imc
ITERATIONS?=50000 # 20000 for TGC
ASM_SRCS :=
C_SRCS := dhry_stubs.c dhry_1.c dhry_2.c
HEADERS := dhry.h
BOARD=iss
BOARD?=iss
LINK_TARGET=link
RISCV_ARCH:=rv32$(ISA)
ifneq (,$(findstring e,$(ISA)))
@ -14,9 +15,8 @@ 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 -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
TOOL_DIR=$(dir $(compiler))

View File

@ -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;