diff --git a/wally-pipelined/src/ifu/bpred.sv b/wally-pipelined/src/ifu/bpred.sv index fda263edd..de0f8143b 100644 --- a/wally-pipelined/src/ifu/bpred.sv +++ b/wally-pipelined/src/ifu/bpred.sv @@ -75,6 +75,7 @@ module bpred if (`BPTYPE == "BPTWOBIT") begin:Predictor twoBitPredictor DirPredictor(.clk(clk), .reset(reset), + .StallF(StallF), .LookUpPC(PCNextF), .Prediction(BPPredF), // update diff --git a/wally-pipelined/src/ifu/twoBitPredictor.sv b/wally-pipelined/src/ifu/twoBitPredictor.sv index f01f48dc8..af4942781 100644 --- a/wally-pipelined/src/ifu/twoBitPredictor.sv +++ b/wally-pipelined/src/ifu/twoBitPredictor.sv @@ -32,6 +32,7 @@ module twoBitPredictor ) (input logic clk, input logic reset, + input logic StallF, input logic [`XLEN-1:0] LookUpPC, output logic [1:0] Prediction, // update @@ -54,11 +55,11 @@ module twoBitPredictor assign LookUpPCIndex = {LookUpPC[Depth+1] ^ LookUpPC[1], LookUpPC[Depth:2]}; - SRAM2P1R1W #(Depth, 2) memory(.clk(clk), + SRAM2P1R1W #(Depth, 2) PHT(.clk(clk), .reset(reset), .RA1(LookUpPCIndex), .RD1(PredictionMemory), - .REN1(1'b1), + .REN1(~StallF), .WA1(UpdatePCIndex), .WD1(UpdatePrediction), .WEN1(UpdateEN),