提交 2c5502c7 编写于 作者: L Lingrui98

Merge remote-tracking branch 'origin/fix-brq-enq' into ifu-timing

......@@ -141,12 +141,13 @@ class Brq extends XSModule with HasCircularQueuePtrHelper {
)
// branch insts enq
val lastCycleRedirect = RegNext(io.memRedirect.valid || io.roqRedirect.valid)
val validEntries = distanceBetween(tailPtr, headPtr)
for(i <- 0 until DecodeWidth){
val offset = if(i == 0) 0.U else PopCount(io.enqReqs.take(i).map(_.valid))
val brTag = tailPtr + offset
val idx = brTag.value
io.enqReqs(i).ready := validEntries <= (BrqSize - (i + 1)).U
io.enqReqs(i).ready := validEntries <= (BrqSize - (i + 1)).U && !lastCycleRedirect
io.brTags(i) := brTag
when (io.enqReqs(i).fire()) {
brQueue(idx).ptrFlag := brTag.flag
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册