Merge pull request #1 from davideschiavone/remove_legacy_80

removed legacy 0x80 offset from bootaddr
This commit is contained in:
Davide Schiavone 2022-07-01 18:30:02 +02:00 committed by GitHub
commit 2ea28638f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,15 +190,15 @@ module ibex_if_stage import ibex_pkg::*; #(
// fetch address selection mux
always_comb begin : fetch_addr_mux
unique case (pc_mux_internal)
PC_BOOT: fetch_addr_n = { boot_addr_i[31:8], 8'h80 };
PC_BOOT: fetch_addr_n = { boot_addr_i[31:8], 8'h00 };
PC_JUMP: fetch_addr_n = branch_target_ex_i;
PC_EXC: fetch_addr_n = exc_pc; // set PC to exception handler
PC_ERET: fetch_addr_n = csr_mepc_i; // restore PC when returning from EXC
PC_DRET: fetch_addr_n = csr_depc_i;
// Without branch predictor will never get pc_mux_internal == PC_BP. We still handle no branch
// predictor case here to ensure redundant mux logic isn't synthesised.
PC_BP: fetch_addr_n = BranchPredictor ? predict_branch_pc : { boot_addr_i[31:8], 8'h80 };
default: fetch_addr_n = { boot_addr_i[31:8], 8'h80 };
PC_BP: fetch_addr_n = BranchPredictor ? predict_branch_pc : { boot_addr_i[31:8], 8'h00 };
default: fetch_addr_n = { boot_addr_i[31:8], 8'h00 };
endcase
end