Fix DYNAMIC_TARGET by fixing decode PC updates

This commit is contained in:
Charles Papon 2019-06-11 19:56:33 +02:00
parent afbf0ea777
commit 21ec368927
2 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ class BranchPlugin(earlyBranch : Boolean,
val branchAdder = branch_src1 + branch_src2
insert(BRANCH_CALC) := branchAdder(31 downto 1) @@ "0"
insert(NEXT_PC) := input(PC) + (if(pipeline(RVC_GEN)) ((input(IS_RVC)) ? U(2) | U(4)) else 4)
insert(TARGET_MISSMATCH) := input(PC) =/= input(BRANCH_CALC)
insert(TARGET_MISSMATCH) := decode.input(PC) =/= input(BRANCH_CALC)
}
//Apply branchs (JAL,JALR, Bxx)

View File

@ -185,7 +185,7 @@ abstract class IBusFetcherImpl(val resetVector : BigInt,
}
//application of the selected jump request
when(jump.pcLoad.valid && (!decode.arbitration.isValid || !decode.arbitration.isStuck || decode.arbitration.isRemoved)) {
when(jump.pcLoad.valid && (!decode.arbitration.isStuck || decode.arbitration.isRemoved)) {
pcReg := jump.pcLoad.payload
}
})