Add HazardPessimisticPlugin for light and very good FMAX hazard tracking

This commit is contained in:
Charles Papon 2017-04-17 17:56:47 +02:00
parent 024e14ae58
commit e00bf028cb
2 changed files with 654 additions and 644 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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)
}
}