Fixed subtle bug in btb.

This commit is contained in:
Ross Thompson 2023-01-25 15:16:53 -06:00
parent d4004c2c22
commit bb89bf82bf
2 changed files with 2 additions and 4 deletions

View File

@ -146,7 +146,6 @@ module bpred (
.UpdateEN(|InstrClassE | PredictionInstrClassWrongE),
.PCE,
.IEUAdrE,
.UpdateInvalid(PredictionInstrClassWrongE),
.InstrClassE);
// Part 3 RAS

View File

@ -44,8 +44,7 @@ module btb
input logic UpdateEN,
input logic [`XLEN-1:0] PCE,
input logic [`XLEN-1:0] IEUAdrE,
input logic [3:0] InstrClassE,
input logic UpdateInvalid
input logic [3:0] InstrClassE
);
localparam TotalDepth = 2 ** Depth;
@ -92,7 +91,7 @@ module btb
if (reset) begin
ValidBits <= #1 {TotalDepth{1'b0}};
end else if (UpdateEN & ~StallM & ~FlushM) begin
ValidBits[PCEIndex] <= #1 ~ UpdateInvalid;
ValidBits[PCEIndex] <= #1 |InstrClassE;
end
PredValidF = ValidBits[PCNextFIndex];
end