diff --git a/hdl/hazard3_decode.v b/hdl/hazard3_decode.v index 9fe7a90..4db61ab 100644 --- a/hdl/hazard3_decode.v +++ b/hdl/hazard3_decode.v @@ -146,8 +146,9 @@ always @ (posedge clk or negedge rst_n) begin // branch, it *must* be a valid branch instruction, because executing // the branch is how we recover from misprediction `ifdef FORMAL - // This can be defeated if you branch backward halfway into a 32-bit instruction that immediately precedes the branch. - if (predicted_branch && !d_starved && !debug_mode) begin + // This can be defeated if you branch backward halfway into a 32-bit + // instruction that immediately precedes the branch. + if (predicted_branch && !d_starved && !debug_mode && !d_except_instr_bus_fault) begin assert(!d_invalid); assert(d_branchcond == BCOND_ZERO || d_branchcond == BCOND_NZERO); end diff --git a/hdl/hazard3_frontend.v b/hdl/hazard3_frontend.v index 51b1e20..2044e96 100644 --- a/hdl/hazard3_frontend.v +++ b/hdl/hazard3_frontend.v @@ -348,6 +348,7 @@ always @ (posedge clk or negedge rst_n) begin if (jump_now) begin if (|EXTENSION_C) begin if (mem_addr_rdy) begin + mem_aph_hwvld <= 2'b11; mem_data_hwvld <= {1'b1, !jump_target[1]}; end else begin mem_aph_hwvld <= {1'b1, !jump_target[1]}; diff --git a/test/sim/coremark/dist/barebones/core_portme.mak b/test/sim/coremark/dist/barebones/core_portme.mak index e72ad5d..19b8e44 100755 --- a/test/sim/coremark/dist/barebones/core_portme.mak +++ b/test/sim/coremark/dist/barebones/core_portme.mak @@ -35,7 +35,7 @@ SEPARATE_COMPILE=1 # You must also define below how to create an object file, and how to link. OBJOUT = -o LFLAGS = -T ../../common/memmap.ld -ASFLAGS = -c -march=rv32imc_zicsr +ASFLAGS = -c -march=rv32im_zicsr OFLAG = -o COUT = -c