Possibly working speculative global history.

This commit is contained in:
Ross Thompson 2023-01-08 23:46:53 -06:00
parent a35fb3addd
commit 97feea2f48
4 changed files with 5 additions and 4 deletions

View File

@ -604,7 +604,7 @@ add wave -noupdate /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/Br
add wave -noupdate /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/NewDirPredictionF
add wave -noupdate /testbench/dut/core/ifu/bpred/bpred/Predictor/DirPredictor/NewDirPredictionW
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 2} {314596 ns} 1} {{Cursor 3} {314460 ns} 1} {{Cursor 4} {219681 ns} 1} {{Cursor 4} {341201 ns} 1} {{Cursor 5} {9616 ns} 0}
WaveRestoreCursors {{Cursor 2} {314596 ns} 1} {{Cursor 3} {314460 ns} 1} {{Cursor 4} {219681 ns} 1} {{Cursor 4} {341201 ns} 1} {{Cursor 5} {116741 ns} 0}
quietly wave cursor active 5
configure wave -namecolwidth 250
configure wave -valuecolwidth 194
@ -620,4 +620,4 @@ configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
WaveRestoreZoom {9519 ns} {9917 ns}
WaveRestoreZoom {118528 ns} {128752 ns}

View File

@ -97,7 +97,7 @@ module bpred (
.BranchInstrE(InstrClassE[0]), .BranchInstrM(InstrClassM[0]), .PCSrcE);
end else if (`BPTYPE == "BPSPECULATIVEGLOBAL") begin:Predictor
speculativeglobalhistory #(5) DirPredictor(.clk, .reset, .StallF, .StallD, .StallE, .StallM, .StallW, .FlushD, .FlushE, .FlushM, .FlushW,
speculativeglobalhistory #(10) DirPredictor(.clk, .reset, .StallF, .StallD, .StallE, .StallM, .StallW, .FlushD, .FlushE, .FlushM, .FlushW,
.PCNextF, .PCF, .PCD, .PCE, .PCM, .DirPredictionF, .DirPredictionWrongE,
.BranchInstrF(BPInstrClassF[0]), .BranchInstrD(BPInstrClassD[0]), .BranchInstrE(InstrClassE[0]), .BranchInstrM(InstrClassM[0]),
.BranchInstrW(InstrClassW[0]), .PCSrcE);

View File

@ -79,7 +79,7 @@ module speculativeglobalhistory
assign MatchD = BranchInstrD & ~FlushE & (GHRNextF == GHRD[k-1:0]);
assign MatchE = BranchInstrE & ~FlushM & (GHRNextF == GHRE[k-1:0]);
assign MatchM = BranchInstrM & ~FlushW & (GHRNextF == GHRM[k-1:0]);
assign MatchW = BranchInstrW & (GHRNextF == GHRM[k-1:0]);
assign MatchW = BranchInstrW & (GHRNextF == GHRW[k-1:0]);
assign MatchNextX = MatchF | MatchD | MatchE | MatchM | MatchW;
flopenr #(1) MatchReg(clk, reset, ~StallF, MatchNextX, MatchXF);

View File

@ -83,6 +83,7 @@ one_6:
addi t3, t3, 1
addi t3, t3, 1
addi t3, t3, 1
addi t3, t3, 1
addi t2, t2, -1
bnez t2, loop_6