MulPlugin fix buffer interraction with partial regfile bypass

This commit is contained in:
Dolu1990 2021-02-17 11:35:17 +01:00
parent 8b2a2afb6f
commit 06b7a91de4
2 changed files with 61 additions and 59 deletions

View File

@ -31,6 +31,8 @@ class HazardSimplePlugin(bypassExecute : Boolean = false,
override def build(pipeline: VexRiscv): Unit = {
import pipeline._
import pipeline.config._
pipeline plug new Area {
val src0Hazard = False
val src1Hazard = False
@ -113,6 +115,7 @@ class HazardSimplePlugin(bypassExecute : Boolean = false,
}
}
}
}
class NoHazardPlugin extends Plugin[VexRiscv] with HazardService {

View File

@ -61,10 +61,9 @@ class MulPlugin(var inputBuffer : Boolean = false,
when(arbitration.isValid && input(IS_MUL) && counter =/= delay){
arbitration.haltItself := True
}
when(!arbitration.isStuckByOthers){
counter := counter + 1
}
when(!arbitration.isStuck){
when(!arbitration.isStuck || arbitration.isStuckByOthers){
counter := 0
}
}