mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-09 05:05:25 +00:00
Fixed subtle bug in btb.
This commit is contained in:
parent
d4004c2c22
commit
bb89bf82bf
@ -146,7 +146,6 @@ module bpred (
|
|||||||
.UpdateEN(|InstrClassE | PredictionInstrClassWrongE),
|
.UpdateEN(|InstrClassE | PredictionInstrClassWrongE),
|
||||||
.PCE,
|
.PCE,
|
||||||
.IEUAdrE,
|
.IEUAdrE,
|
||||||
.UpdateInvalid(PredictionInstrClassWrongE),
|
|
||||||
.InstrClassE);
|
.InstrClassE);
|
||||||
|
|
||||||
// Part 3 RAS
|
// Part 3 RAS
|
||||||
|
@ -44,8 +44,7 @@ module btb
|
|||||||
input logic UpdateEN,
|
input logic UpdateEN,
|
||||||
input logic [`XLEN-1:0] PCE,
|
input logic [`XLEN-1:0] PCE,
|
||||||
input logic [`XLEN-1:0] IEUAdrE,
|
input logic [`XLEN-1:0] IEUAdrE,
|
||||||
input logic [3:0] InstrClassE,
|
input logic [3:0] InstrClassE
|
||||||
input logic UpdateInvalid
|
|
||||||
);
|
);
|
||||||
|
|
||||||
localparam TotalDepth = 2 ** Depth;
|
localparam TotalDepth = 2 ** Depth;
|
||||||
@ -92,7 +91,7 @@ module btb
|
|||||||
if (reset) begin
|
if (reset) begin
|
||||||
ValidBits <= #1 {TotalDepth{1'b0}};
|
ValidBits <= #1 {TotalDepth{1'b0}};
|
||||||
end else if (UpdateEN & ~StallM & ~FlushM) begin
|
end else if (UpdateEN & ~StallM & ~FlushM) begin
|
||||||
ValidBits[PCEIndex] <= #1 ~ UpdateInvalid;
|
ValidBits[PCEIndex] <= #1 |InstrClassE;
|
||||||
end
|
end
|
||||||
PredValidF = ValidBits[PCNextFIndex];
|
PredValidF = ValidBits[PCNextFIndex];
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user