forked from Github_Repos/cvw
		
	Cherry Pick merge of Shreya's localhistory predictor changes into main.
fixed minor bugs in localHistory
This commit is contained in:
		
							parent
							
								
									6d4042e479
								
							
						
					
					
						commit
						0369fc5d1e
					
				@ -98,4 +98,5 @@
 | 
			
		||||
 | 
			
		||||
`define TWO_BIT_PRELOAD "../config/rv32ic/twoBitPredictor.txt"
 | 
			
		||||
`define BTB_PRELOAD "../config/rv32ic/BTBPredictor.txt"
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define TESTSBP 0
 | 
			
		||||
 | 
			
		||||
@ -101,4 +101,5 @@
 | 
			
		||||
 | 
			
		||||
`define TWO_BIT_PRELOAD "../config/rv64ic/twoBitPredictor.txt"
 | 
			
		||||
`define BTB_PRELOAD "../config/rv64ic/BTBPredictor.txt"
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define TESTSBP 0
 | 
			
		||||
 | 
			
		||||
@ -97,4 +97,5 @@
 | 
			
		||||
 | 
			
		||||
`define TWO_BIT_PRELOAD "../config/rv64icfd/twoBitPredictor.txt"
 | 
			
		||||
`define BTB_PRELOAD "../config/rv64icfd/BTBPredictor.txt"
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define BPTYPE "BPGSHARE" // BPLOCALPAg or BPGLOBAL or BPTWOBIT or BPGSHARE
 | 
			
		||||
`define TESTSBP 0
 | 
			
		||||
 | 
			
		||||
@ -102,6 +102,19 @@ module bpred
 | 
			
		||||
				   .PCSrcE(PCSrcE),
 | 
			
		||||
				   .UpdatePrediction(UpdateBPPredE));
 | 
			
		||||
    end 
 | 
			
		||||
    else if (`BPTYPE == "BPLOCALPAg") begin:Predictor
 | 
			
		||||
 | 
			
		||||
      localHistoryPredictor DirPredictor(.clk(clk),
 | 
			
		||||
				   .reset(reset),
 | 
			
		||||
				   .*, // Stalls and flushes
 | 
			
		||||
				   .LookUpPC(PCNextF),
 | 
			
		||||
				   .Prediction(BPPredF),
 | 
			
		||||
				   // update
 | 
			
		||||
				   .UpdatePC(PCE),
 | 
			
		||||
				   .UpdateEN(InstrClassE[0] & ~StallE),
 | 
			
		||||
				   .PCSrcE(PCSrcE),
 | 
			
		||||
				   .UpdatePrediction(UpdateBPPredE));
 | 
			
		||||
    end 
 | 
			
		||||
  endgenerate
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -44,7 +44,7 @@ module localHistoryPredictor
 | 
			
		||||
   );
 | 
			
		||||
 | 
			
		||||
   logic [2**m-1:0][k-1:0] LHRNextF;
 | 
			
		||||
   logic [k-1:0]       LHRD, LHRE, LHRENext, ForwardLHRNext;
 | 
			
		||||
   logic [k-1:0]       LHRF, LHRD, LHRE, LHRENext, ForwardLHRNext;
 | 
			
		||||
   logic [m-1:0] 	   LookUpPCIndex, UpdatePCIndex;
 | 
			
		||||
   logic [1:0] 		   PredictionMemory;
 | 
			
		||||
   logic 		   DoForwarding, DoForwardingF, DoForwardingPHT, DoForwardingPHTF;
 | 
			
		||||
@ -67,7 +67,7 @@ module localHistoryPredictor
 | 
			
		||||
 | 
			
		||||
genvar index;
 | 
			
		||||
generate
 | 
			
		||||
    for (index = 0; index < 2**m; index = index +1) begin:index
 | 
			
		||||
    for (index = 0; index < 2**m; index = index +1) begin
 | 
			
		||||
      
 | 
			
		||||
        flopenr #(k) LocalHistoryRegister(.clk(clk),
 | 
			
		||||
                .reset(reset),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user