fix(csr): stval只在deleg的情况下更新
This commit is contained in:
parent
2a09884e0f
commit
2bff20053d
|
@ -327,10 +327,10 @@ class Csr(implicit val cpuConfig: CpuConfig) extends Module with HasCSRConst {
|
||||||
|
|
||||||
when(raise_exception) {
|
when(raise_exception) {
|
||||||
val tval = mem_ex.tval(exceptionNO)
|
val tval = mem_ex.tval(exceptionNO)
|
||||||
when(mode === ModeM) {
|
when(delegS) {
|
||||||
mtval := tval
|
|
||||||
}.otherwise {
|
|
||||||
stval := tval
|
stval := tval
|
||||||
|
}.otherwise {
|
||||||
|
mtval := tval
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue