Fixed parameterization in testbench.

This commit is contained in:
Ross Thompson 2023-01-31 00:11:01 -06:00
parent b64b3016e2
commit 20e99dce73

View File

@ -471,13 +471,18 @@ logic [3:0] dummy;
genvar adrindex; genvar adrindex;
// Initializing all zeroes into the branch predictor memory. // Initializing all zeroes into the branch predictor memory.
for(adrindex = 0; adrindex < 2**10; adrindex++) begin
initial begin
force dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem[adrindex] = 0;
#1;
release dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem[adrindex];
end
end
for(adrindex = 0; adrindex < 2**`BPRED_SIZE; adrindex++) begin for(adrindex = 0; adrindex < 2**`BPRED_SIZE; adrindex++) begin
initial begin initial begin
force dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem[adrindex] = 0; force dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem[adrindex] = 0;
force dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem[adrindex] = 0;
#1; #1;
release dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem[adrindex]; release dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem[adrindex];
release dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem[adrindex];
end end
end end