Skip to content

Commit

Permalink
[rtl] Flush pipe on MSECCFG CSR write
Browse files Browse the repository at this point in the history
Without this an instruction executed immediately after the MSECCFG write
doesn't have the new MSECCFG setup applied to its execute permission.
  • Loading branch information
GregAC committed Nov 17, 2022
1 parent fb32236 commit 726eb97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rtl/ibex_id_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ module ibex_id_stage #(
if (csr_op_en_o == 1'b1 && (csr_op_o == CSR_OP_WRITE || csr_op_o == CSR_OP_SET)) begin
if (csr_num_e'(instr_rdata_i[31:20]) == CSR_MSTATUS ||
csr_num_e'(instr_rdata_i[31:20]) == CSR_MIE ||
csr_num_e'(instr_rdata_i[31:20]) == CSR_MSECCFG ||
// To catch all PMPCFG/PMPADDR registers, get the shared top most 7 bits.
instr_rdata_i[31:25] == 7'h1D) begin
csr_pipe_flush = 1'b1;
Expand Down

0 comments on commit 726eb97

Please sign in to comment.