mirror of
https://github.com/olofk/serv.git
synced 2026-03-10 12:18:08 +00:00
Avoid matching misa CSR as mstatus
Reads from the (unimplemented) misa register matched mstatus which in turn caused garbage data to be written to other CSRs. Make the matching mask slightly stricter to avoid this particular issue.
This commit is contained in:
@@ -188,7 +188,7 @@ module serv_decode
|
||||
wire co_rd_csr_en = csr_op;
|
||||
|
||||
wire co_csr_en = csr_op & csr_valid;
|
||||
wire co_csr_mstatus_en = csr_op & !op26 & !op22;
|
||||
wire co_csr_mstatus_en = csr_op & !op26 & !op22 & !op20;
|
||||
wire co_csr_mie_en = csr_op & !op26 & op22 & !op20;
|
||||
wire co_csr_mcause_en = csr_op & op21 & !op20;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user