[RTL] Prevent CSR write on any illegal CSR reason

Debug register access sets illegal_csr if not in debug mode but CSR
write still went ahead. This modifies the CSR write to ensure that
anything that results in an illegal CSR instruction being signalled will
prevent a CSR write.
This commit is contained in:
Greg Chadwick 2019-10-15 12:13:44 +01:00
parent bbb688a2aa
commit 2bc785e7d9

View file

@ -552,7 +552,7 @@ module ibex_cs_registers #(
end
// only write CSRs during one clock cycle
assign csr_we_int = csr_wreq & ~illegal_csr_priv & instr_new_id_i;
assign csr_we_int = csr_wreq & ~illegal_csr_insn_o & instr_new_id_i;
assign csr_rdata_o = csr_rdata_int;