提交 793fb370 编写于 作者: X Xuan Hu

backend: fix exe unit pipeline error

Add the Busy register in exe units to indicate that new instructions
cannot be received, but it does not allow the exe unit to be pipelinable.
Todo: make exe unit pipelinable.
上级 621007d9
......@@ -40,6 +40,16 @@ class ExeUnitImp(
module
})
val busy = RegInit(false.B)
val robIdx = RegEnable(io.in.bits.robIdx, io.in.fire)
when (robIdx.needFlush(io.flush)) {
busy := false.B
}.elsewhen(io.out.fire) {
busy := false.B
}.elsewhen(io.in.fire) {
busy := true.B
}
// rob flush --> funcUnits
funcUnits.zipWithIndex.foreach { case (fu, i) =>
fu.io.flush <> io.flush
......@@ -52,7 +62,9 @@ class ExeUnitImp(
val in1ToN = Module(new Dispatcher(new ExuInput(exuParams), funcUnits.length, acceptCond))
// ExeUnit.in <---> Dispatcher.in
in1ToN.io.in <> io.in
in1ToN.io.in.valid := io.in.valid && !busy
in1ToN.io.in.bits := io.in.bits
io.in.ready := !busy
// Dispatcher.out <---> FunctionUnits
in1ToN.io.out.zip(funcUnits.map(_.io.in)).foreach {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册