Mask LSB of mepc CSR to 0 for writes initiated by software

This commit is contained in:
Pirmin Vogel 2019-06-27 17:05:57 +01:00
parent 07214f626d
commit 2967113edd

View file

@ -308,7 +308,7 @@ module ibex_cs_registers #(
end
// mepc: exception program counter
CSR_MEPC: if (csr_we_int) mepc_n = csr_wdata_int;
CSR_MEPC: if (csr_we_int) mepc_n = {csr_wdata_int[31:1], 1'b0};
// mcause
CSR_MCAUSE: if (csr_we_int) mcause_n = {csr_wdata_int[31], csr_wdata_int[4:0]};