mirror of
https://github.com/olofk/serv.git
synced 2025-04-20 03:47:09 -04: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:
parent
1fc6e7da9b
commit
40d34d204a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue