Skip to content

Commit

Permalink
CSR for RoCC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joonho3020 committed Aug 11, 2023
1 parent 47f7b71 commit 91fa160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/rocket/CSR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ class CSRFile(
(if (usingCompressed) "C" else "")
val isaString = (if (coreParams.useRVE) "E" else "I") +
isaMaskString +
(if (customIsaExt.isDefined) "X" else "") +
(if (customIsaExt.isDefined || usingRoCC) "X" else "") +
(if (usingSupervisor) "S" else "") +
(if (usingHypervisor) "H" else "") +
(if (usingUser) "U" else "")
Expand Down Expand Up @@ -858,6 +858,7 @@ class CSRFile(
io_dec.vector_illegal := io.status.vs === 0.U || reg_mstatus.v && reg_vsstatus.vs === 0.U || !reg_misa('v'-'a')
io_dec.fp_csr := decodeFast(fp_csrs.keys.toList)
io_dec.rocc_illegal := io.status.xs === 0.U || reg_mstatus.v && reg_vsstatus.xs === 0.U || !reg_misa('x'-'a')
dontTouch(io_dec.rocc_illegal)
val csr_addr_legal = reg_mstatus.prv >= CSR.mode(addr) ||
usingHypervisor.B && !reg_mstatus.v && reg_mstatus.prv === PRV.S.U && CSR.mode(addr) === PRV.H.U
val csr_exists = decodeAny(read_mapping)
Expand Down

0 comments on commit 91fa160

Please sign in to comment.