Add HazardPessimisticPlugin for light and very good FMAX hazard tracking
This commit is contained in:
parent
024e14ae58
commit
e00bf028cb
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
package SpinalRiscv.Plugin
|
||||
|
||||
import SpinalRiscv._
|
||||
import spinal.core._
|
||||
import spinal.lib._
|
||||
|
||||
|
||||
class HazardPessimisticPlugin() extends Plugin[VexRiscv] {
|
||||
import Riscv._
|
||||
override def build(pipeline: VexRiscv): Unit = {
|
||||
import pipeline._
|
||||
import pipeline.config._
|
||||
|
||||
val writesInPipeline = List(execute,memory,writeBack).map(s => s.arbitration.isValid && s.input(REGFILE_WRITE_VALID)) :+ RegNext(writeBack.arbitration.isValid && writeBack.input(REGFILE_WRITE_VALID))
|
||||
decode.arbitration.haltIt.setWhen(decode.arbitration.isValid && writesInPipeline.orR)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue