Fix xtval when no exception and read_only

This commit is contained in:
Charles Papon 2020-01-06 20:07:23 +01:00
parent 2a06907902
commit 4c7025b964
1 changed files with 4 additions and 0 deletions

View File

@ -866,6 +866,10 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
}
}
if(exceptionPortCtrl == null){
if(mbadaddrAccess == CsrAccess.READ_ONLY) mtval := 0
if(sbadaddrAccess == CsrAccess.READ_ONLY) stval := 0
}
lastStage plug new Area{
import lastStage._