mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-27 15:04:36 +00:00
fixed bugs in global history to read latest GHRE
Cherry pick Shreya's commits into main branch.
This commit is contained in:
parent
ccff1e6c99
commit
3696bf4f2c
@ -99,6 +99,7 @@
|
||||
/* verilator lint_off ASSIGNDLY */
|
||||
/* verilator lint_off PINCONNECTEMPTY */
|
||||
|
||||
`define TWO_BIT_PRELOAD "../config/rv64ic/twoBitPredictor.txt"
|
||||
`define BTB_PRELOAD "../config/rv64ic/BTBPredictor.txt"
|
||||
`define TWO_BIT_PRELOAD "../config/rv64imc/twoBitPredictor.txt"
|
||||
`define BTB_PRELOAD "../config/rv64imc/BTBPredictor.txt"
|
||||
`define BPTYPE "BPGSHARE" // BPGLOBAL or BPTWOBIT or BPGSHARE
|
||||
`define TESTSBP 0
|
||||
|
@ -41,12 +41,13 @@ module globalHistoryPredictor
|
||||
input logic [1:0] UpdatePrediction
|
||||
|
||||
);
|
||||
logic [k-1:0] GHRF, GHRD, GHRE;
|
||||
logic [k-1:0] GHRF, GHRD, GHRE, GHRENext;
|
||||
assign GHRENext = {PCSrcE, GHRE[k-1:1]};
|
||||
|
||||
flopenr #(k) GlobalHistoryRegister(.clk(clk),
|
||||
.reset(reset),
|
||||
.en(UpdateEN),
|
||||
.d({PCSrcE, GHRF[k-1:1] }),
|
||||
.d(GHRENext),
|
||||
.q(GHRF));
|
||||
|
||||
|
||||
@ -66,8 +67,8 @@ module globalHistoryPredictor
|
||||
.reset(reset),
|
||||
.RA1(GHRF),
|
||||
.RD1(PredictionMemory),
|
||||
.REN1(1'b1),
|
||||
.WA1(GHRE),
|
||||
.REN1(~StallF),
|
||||
.WA1(GHRENext),
|
||||
.WD1(UpdatePrediction),
|
||||
.WEN1(UpdateEN),
|
||||
.BitWEN1(2'b11));
|
||||
|
Loading…
Reference in New Issue
Block a user