From 14ebf2360d2b0f48539f37e1d2a1a7be717201d9 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Wed, 4 Jan 2023 23:51:09 -0600 Subject: [PATCH] Simplified gshare. --- pipelined/config/rv64gc/wally-config.vh | 3 +-- pipelined/src/ifu/bpred.sv | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pipelined/config/rv64gc/wally-config.vh b/pipelined/config/rv64gc/wally-config.vh index 41b775e9..65d27aa3 100644 --- a/pipelined/config/rv64gc/wally-config.vh +++ b/pipelined/config/rv64gc/wally-config.vh @@ -140,8 +140,7 @@ `define PLIC_UART_ID 10 `define BPRED_ENABLED 1 -//`define BPTYPE "BPGSHARE" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE -`define BPTYPE "BPGLOBAL" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE +`define BPTYPE "BPGSHARE" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE `define TESTSBP 0 `define BPRED_SIZE 10 diff --git a/pipelined/src/ifu/bpred.sv b/pipelined/src/ifu/bpred.sv index 6d669626..26f7459a 100644 --- a/pipelined/src/ifu/bpred.sv +++ b/pipelined/src/ifu/bpred.sv @@ -101,10 +101,9 @@ module bpred ( .BranchInstrE(InstrClassE[0]), .BranchInstrM(InstrClassM[0]), .PCSrcE); end else if (`BPTYPE == "BPGSHARE") begin:Predictor - gsharePredictor DirPredictor(.clk, .reset, .StallF, .StallE, - .PCNextF, .BPPredF, - .InstrClassE, .BPInstrClassF, .BPInstrClassD, .BPInstrClassE, .BPPredDirWrongE, - .PCE, .PCSrcE, .UpdateBPPredE); + gshare DirPredictor(.clk, .reset, .StallF, .StallD, .StallE, .StallM, .FlushD, .FlushE, .FlushM, + .PCNextF, .PCM, .DirPredictionF(BPPredF), .DirPredictionWrongE(BPPredDirWrongE), + .BranchInstrE(InstrClassE[0]), .BranchInstrM(InstrClassM[0]), .PCSrcE); end else if (`BPTYPE == "BPLOCALPAg") begin:Predictor