Apply DYNAMIC_TARGET correction all the time

This commit is contained in:
Charles Papon 2020-02-17 21:43:02 +01:00
parent e23295f06e
commit 0e0a568743
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ abstract class IBusFetcherImpl(val resetVector : BigInt,
} }
case DYNAMIC_TARGET => { case DYNAMIC_TARGET => {
fetchPrediction = pipeline.service(classOf[PredictionInterface]).askFetchPrediction() fetchPrediction = pipeline.service(classOf[PredictionInterface]).askFetchPrediction()
if(compressedGen && cmdToRspStageCount > 1){ if(compressedGen){
dynamicTargetFailureCorrection = createJumpInterface(pipeline.decode) dynamicTargetFailureCorrection = createJumpInterface(pipeline.decode)
} }
} }
@ -575,13 +575,13 @@ abstract class IBusFetcherImpl(val resetVector : BigInt,
val predictionFailure = ifGen(compressedGen && cmdToRspStageCount > 1)(new Area{ val predictionFailure = ifGen(compressedGen)(new Area{
val predictionBranch = decompressorContext.hit && !decompressorContext.hazard && decompressorContext.line.branchWish(1) val predictionBranch = decompressorContext.hit && !decompressorContext.hazard && decompressorContext.line.branchWish(1)
val unalignedWordIssue = decompressor.bufferFill && decompressor.input.rsp.inst(17 downto 16) === 3 && predictionBranch val unalignedWordIssue = decompressor.bufferFill && decompressor.input.rsp.inst(17 downto 16) === 3 && predictionBranch
val decompressorFailure = RegInit(False) setWhen(unalignedWordIssue) clearWhen(fetcherflushIt) val decompressorFailure = RegInit(False) setWhen(unalignedWordIssue) clearWhen(fetcherflushIt)
val injectorFailure = Delay(decompressorFailure, cycleCount=if(injectorStage) 1 else 0, when=injector.decodeInput.ready) val injectorFailure = Delay(decompressorFailure, cycleCount=if(injectorStage) 1 else 0, when=injector.decodeInput.ready)
val bypassFailure = if(!injectorStage) False else decompressorFailure && !injector.decodeInput.valid val bypassFailure = if(!injectorStage) False else decompressorFailure && !injector.decodeInput.valid
???
dynamicTargetFailureCorrection.valid := False dynamicTargetFailureCorrection.valid := False
dynamicTargetFailureCorrection.payload := decode.input(PC) dynamicTargetFailureCorrection.payload := decode.input(PC)
when(injectorFailure || bypassFailure){ when(injectorFailure || bypassFailure){