From 3398c5156b0ee500227c601ecc431f5917fa3832 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Fri, 17 Feb 2023 10:57:50 -0600 Subject: [PATCH] Fixed bug with branch predictor. --- src/ifu/bpred/bpred.sv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ifu/bpred/bpred.sv b/src/ifu/bpred/bpred.sv index f50232527..3240a29c9 100644 --- a/src/ifu/bpred/bpred.sv +++ b/src/ifu/bpred/bpred.sv @@ -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.