#60 Fix interrupt causing fetch privilege issues

This commit is contained in:
Charles Papon 2019-04-01 10:47:54 +02:00
parent e74a5a71eb
commit 1dff9aff8a
1 changed files with 2 additions and 4 deletions

View File

@ -767,6 +767,8 @@ class CsrPlugin(config: CsrPluginConfig) extends Plugin[VexRiscv] with Exception
}
when(hadException || interruptJump){
fetcher.haltIt() //Avoid having the fetch confused by the incomming privilege switch
jumpInterface.valid := True
jumpInterface.payload := (if(!xtvecModeGen) xtvec.base @@ "00" else (xtvec.mode === 0 || hadException) ? (xtvec.base @@ "00") | ((xtvec.base + trapCause) @@ "00") )
beforeLastStage.arbitration.flushAll := True
@ -800,10 +802,6 @@ class CsrPlugin(config: CsrPluginConfig) extends Plugin[VexRiscv] with Exception
}
}
//Avoid having the fetch confused by the incomming privilege switch
when(hadException){
fetcher.haltIt()
}
lastStage plug new Area{
import lastStage._