Also fix RAW stall on JALR instructions, oops. Runs CoreMark and Dhrystone now

This commit is contained in:
Luke Wren 2021-05-22 11:18:56 +01:00
parent 6692c1f26d
commit 08e986912c
4 changed files with 8 additions and 8 deletions

View File

@ -547,11 +547,11 @@ wire [W_ADDR-1:0] x_jump_target =
x_taken_jump_target;
// Be careful not to take branches whose comparisons depend on a load result
wire x_jump_req =
x_trap_enter || x_trap_exit ||
wire x_jump_req = x_trap_enter || x_trap_exit || !x_stall_raw && (
d_branchcond == BCOND_ALWAYS ||
d_branchcond == BCOND_ZERO && !x_alu_cmp && !x_stall_raw ||
d_branchcond == BCOND_NZERO && x_alu_cmp && !x_stall_raw;
d_branchcond == BCOND_ZERO && !x_alu_cmp ||
d_branchcond == BCOND_NZERO && x_alu_cmp
);
assign f_jump_req = d_jump_req || x_jump_req;
assign f_jump_target = x_jump_target;

View File

@ -24,7 +24,7 @@ LD = riscv32-unknown-elf-gcc
AS = riscv32-unknown-elf-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 = -O3 -g
PORT_CFLAGS = -O3 -g -march=rv32imc -fno-common -funroll-loops -finline-functions --param max-inline-insns-auto=20 -falign-functions=4 -falign-jumps=4 -falign-loops=4
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
#Flag : LFLAGS_END

View File

@ -1,6 +1,6 @@
SRCS := ../common/init.S src/dhrystone_main.c src/dhrystone.c src/util.c
APP := dhrystone
CCFLAGS := -O3 -fno-inline -march=rv32i
CCFLAGS := -O3 -fno-inline -march=rv32im
MAX_CYCLES := 1000000
include ../common/src_only_app.mk

View File

@ -4,8 +4,8 @@ CDEFINES := DUAL_PORT
CPU_RESET_VECTOR := 32'hc0
EXTENSION_C := 1
EXTENSION_M := 1
MULDIV_UNROLL := 1
MUL_FAST := 0
MULDIV_UNROLL := 2
MUL_FAST := 1
REDUCED_BYPASS := 0
.PHONY: clean tb all