Fix fpu csr access on fs===0 now also trap
This commit is contained in:
parent
cbc89093b3
commit
3ae51cdeb8
|
@ -229,13 +229,15 @@ class FpuPlugin(externalFpu : Boolean = false,
|
||||||
service.r(CSR.SSTATUS, 31, sd)
|
service.r(CSR.SSTATUS, 31, sd)
|
||||||
service.r(CSR.MSTATUS, 31, sd)
|
service.r(CSR.MSTATUS, 31, sd)
|
||||||
|
|
||||||
when(fs === 0) {
|
val accessFpuCsr = False
|
||||||
for (csr <- List(CSR.FRM, CSR.FCSR, CSR.FFLAGS)) {
|
for (csr <- List(CSR.FRM, CSR.FCSR, CSR.FFLAGS)) {
|
||||||
service.during(csr) {
|
service.during(csr) {
|
||||||
service.forceFailCsr()
|
accessFpuCsr := True
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
when(accessFpuCsr && fs === 0) {
|
||||||
|
service.forceFailCsr()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
decode plug new Area{
|
decode plug new Area{
|
||||||
|
|
Loading…
Reference in New Issue