Skip to content

Commit

Permalink
[rocketv] fix vcsr write.
Browse files Browse the repository at this point in the history
  • Loading branch information
qinjun-li committed Aug 25, 2024
1 parent bd8099d commit e8c51b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rocketv/src/CSR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ class CSR(val parameter: CSRParameter)
val reg_wfi = withClock(io.ungatedClock) { RegInit(false.B) }

val reg_fflags = Reg(UInt(5.W))
val reg_frm = Reg(UInt(3.W))
// todo: need init?
val reg_frm = RegInit(0.U(3.W))

val reg_mcountinhibit = RegInit(0.U((CSR.firstHPM + nPerfCounters).W))
io.inhibitCycle := reg_mcountinhibit(0)
Expand Down Expand Up @@ -1741,6 +1742,10 @@ class CSR(val parameter: CSRParameter)
when(decoded_addr(CSRs.vxrm)) {
vector.get.states("vxrm") := wdata
}
when(decoded_addr(CSRs.vcsr)) {
vector.get.states("vxrm") := wdata(2, 1)
vector.get.states("vxsat") := wdata(0)
}
}
} else {
setVlReadData := 0.U
Expand Down

0 comments on commit e8c51b7

Please sign in to comment.