diff --git a/src/main/scala/xiangshan/backend/decode/DecodeStage.scala b/src/main/scala/xiangshan/backend/decode/DecodeStage.scala index c8cfc0b42b500e53a6af8f8ea7c26e3df149995c..6fc5349f20c4ede6fbcc5fcca1972f13dad64b4f 100644 --- a/src/main/scala/xiangshan/backend/decode/DecodeStage.scala +++ b/src/main/scala/xiangshan/backend/decode/DecodeStage.scala @@ -42,7 +42,7 @@ class DecodeStage extends XSModule { io.out(i).bits := decoderToDecBuffer(i) val thisReady = io.out(i).ready && io.toBrq(i).ready - val thisBrqValid = io.in(i).valid && decoders(i).io.out.cf.brUpdate.pd.isBr && io.out(i).ready + val thisBrqValid = io.in(i).valid && !decoders(i).io.out.cf.brUpdate.pd.notCFI && io.out(i).ready val thisOutValid = io.in(i).valid && io.toBrq(i).ready io.in(i).ready := { if (i == 0) thisReady else io.in(i-1).ready && thisReady } io.out(i).valid := { if (i == 0) thisOutValid else io.in(i-1).ready && thisOutValid } diff --git a/src/main/scala/xiangshan/frontend/PreDecode.scala b/src/main/scala/xiangshan/frontend/PreDecode.scala index 09329be1678d66507b670bc4c8a1cf62a33a89ae..121610fb9ebc7ba98b8d51db75d8e583bf42e4e2 100644 --- a/src/main/scala/xiangshan/frontend/PreDecode.scala +++ b/src/main/scala/xiangshan/frontend/PreDecode.scala @@ -41,6 +41,7 @@ class PreDecodeInfo extends XSBundle { // 8 bit def isBr = brType === BrType.branch def isJal = brType === BrType.jal def isJalr = brType === BrType.jalr + def notCFI = brType === BrType.notBr } class PreDecodeResp extends XSBundle {