Skip to content

Commit 726eb97

Browse files
committed
[rtl] Flush pipe on MSECCFG CSR write
Without this an instruction executed immediately after the MSECCFG write doesn't have the new MSECCFG setup applied to its execute permission.
1 parent fb32236 commit 726eb97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rtl/ibex_id_stage.sv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ module ibex_id_stage #(
522522
if (csr_op_en_o == 1'b1 && (csr_op_o == CSR_OP_WRITE || csr_op_o == CSR_OP_SET)) begin
523523
if (csr_num_e'(instr_rdata_i[31:20]) == CSR_MSTATUS ||
524524
csr_num_e'(instr_rdata_i[31:20]) == CSR_MIE ||
525+
csr_num_e'(instr_rdata_i[31:20]) == CSR_MSECCFG ||
525526
// To catch all PMPCFG/PMPADDR registers, get the shared top most 7 bits.
526527
instr_rdata_i[31:25] == 7'h1D) begin
527528
csr_pipe_flush = 1'b1;

0 commit comments

Comments
 (0)