linux: start using internal branch predictor signal

This commit is contained in:
Noah Boorstin 2021-04-26 14:34:38 -04:00
parent a7e4d39ea1
commit 24bbb674d3
2 changed files with 5 additions and 3 deletions

View File

@ -21,6 +21,7 @@ add wave -hex /testbench/dut/hart/ifu/InstrRawD
add wave /testbench/CheckInstrD
add wave /testbench/lastCheckInstrD
add wave /testbench/speculative
add wave /testbench/dut/hart/ifu/bpred/BPPredWrongE
add wave /testbench/lastPC2
add wave -divider
add wave -divider
@ -125,4 +126,4 @@ configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
set DefaultRadix hexadecimal
set DefaultRadix hexadecimal

View File

@ -554,12 +554,13 @@ module testbench();
endcase
//check things!
if ((~speculative) && (~equal(dut.hart.ifu.PCD,pcExpected,3))) begin
if ((~dut.hart.ifu.bpred.BPPredWrongE) && (~equal(dut.hart.ifu.PCD,pcExpected,3))) begin
//if ((~speculative) && (~equal(dut.hart.ifu.PCD,pcExpected,3))) begin
$display("%0t ps, instr %0d: PC does not equal PC expected: %x, %x", $time, instrs, dut.hart.ifu.PCD, pcExpected);
`ERROR
end
InstrMask = CheckInstrD[1:0] == 2'b11 ? 32'hFFFFFFFF : 32'h0000FFFF;
if ((~forcedInstr) && (~speculative) && ((InstrMask & dut.hart.ifu.InstrRawD) !== (InstrMask & CheckInstrD))) begin
if ((~forcedInstr) && (~dut.hart.ifu.bpred.BPPredWrongE) && ((InstrMask & dut.hart.ifu.InstrRawD) !== (InstrMask & CheckInstrD))) begin
$display("%0t ps, instr %0d: InstrD does not equal CheckInstrD: %x, %x, PC: %x", $time, instrs, dut.hart.ifu.InstrRawD, CheckInstrD, dut.hart.ifu.PCD);
`ERROR
end