提交 40bd8dec 编写于 作者: L Lingrui98

ftq: fix a bug in getPc function

上级 d3f41670
......@@ -70,8 +70,7 @@ class Ftq_RF_Components(implicit p: Parameters) extends XSBundle {
def getHigher(pc: UInt) = pc(VAddrBits-1, log2Ceil(16)+instOffsetBits)
def getOffset(pc: UInt) = pc(log2Ceil(16)+instOffsetBits-1, instOffsetBits)
Cat(getHigher(Mux(isNextMask(offset), fallThruAddr, startAddr)),
getOffset(Mux(isNextMask(offset), fallThruAddr, startAddr))+offset,
0.U(instOffsetBits.W))
getOffset(startAddr)+offset, 0.U(instOffsetBits.W))
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册