Fixed bug with branch predictor.

This commit is contained in:
Ross Thompson 2023-02-17 10:57:50 -06:00
parent c6920ab08e
commit 3398c5156b

View File

@ -222,8 +222,7 @@ module bpred (
assign AnyWrongPredInstrClassD = |WrongPredInstrClassD;
// branch is wrong only if the PC does not match and both the Decode and Fetch stages have valid instructions.
assign BPPredWrongE = (PredictionPCWrongE & |InstrClassE | (AnyWrongPredInstrClassE & ~|InstrClassE));
//assign BPPredWrongE = PredictionPCWrongE & InstrValidE & InstrValidD; // this does not work for cubic benchmark
assign BPPredWrongE = PredictionPCWrongE & InstrValidE & InstrValidD;
// Output the predicted PC or corrected PC on miss-predict.
// Selects the BP or PC+2/4.