提交 544c8f4b 编写于 作者: J jinyue

ALU/BRU: add temporary redirect.hist and redirect.isCall

上级 d5a4fe48
......@@ -99,6 +99,9 @@ class Alu extends Exu(alu.litValue(), hasRedirect = true) {
io.in.ready := io.out.ready
val pcLatchSlot = Mux(isRVC, pc + 2.U, pc + 4.U)
//TODO fix me
io.out.bits.redirect := DontCare
io.out.bits.redirectValid := io.out.valid && isBru//isBranch
io.out.bits.redirect.pc := uop.cf.pc
io.out.bits.redirect.target := Mux(!taken && isBranch, pcLatchSlot, target)
......
......@@ -35,6 +35,9 @@ class Bru extends Exu(FuType.bru.litValue(), writeFpRf = true, hasRedirect = tru
val pcDelaySlot = Mux(isRVC, pc + 2.U, pc + 4.U)
val target = src1 + offset // NOTE: src1 is (pc/rf(rs1)), src2 is (offset)
//TODO fix me
io.out.bits.redirect := DontCare
io.out.bits.redirectValid := valid && isJUMP
io.out.bits.redirect.pc := io.in.bits.uop.cf.pc
io.out.bits.redirect.target := target
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册