mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	made performance counters count branch misprediction
This commit is contained in:
		
							parent
							
								
									518618ad38
								
							
						
					
					
						commit
						23a7c8cd92
					
				| @ -33,7 +33,7 @@ module csr ( | |||||||
|   input  logic [`XLEN-1:0] PCM, SrcAM, |   input  logic [`XLEN-1:0] PCM, SrcAM, | ||||||
|   input  logic             CSRReadM, CSRWriteM, TrapM, MTrapM, STrapM, UTrapM, mretM, sretM, uretM, |   input  logic             CSRReadM, CSRWriteM, TrapM, MTrapM, STrapM, UTrapM, mretM, sretM, uretM, | ||||||
|   input  logic             TimerIntM, ExtIntM, SwIntM, |   input  logic             TimerIntM, ExtIntM, SwIntM, | ||||||
|   input  logic             InstrValidW, FloatRegWriteW, LoadStallD, |   input  logic             InstrValidW, FloatRegWriteW, LoadStallD, BPPredWrongE, | ||||||
|   input  logic [1:0]       NextPrivilegeModeM, PrivilegeModeW, |   input  logic [1:0]       NextPrivilegeModeM, PrivilegeModeW, | ||||||
|   input  logic [`XLEN-1:0] CauseM, NextFaultMtvalM, |   input  logic [`XLEN-1:0] CauseM, NextFaultMtvalM, | ||||||
|   output logic [1:0]       STATUS_MPP, |   output logic [1:0]       STATUS_MPP, | ||||||
|  | |||||||
| @ -29,7 +29,7 @@ | |||||||
| 
 | 
 | ||||||
| module csrc (  | module csrc (  | ||||||
|     input  logic             clk, reset, |     input  logic             clk, reset, | ||||||
|     input  logic             InstrValidW, LoadStallD, CSRMWriteM, |     input  logic             InstrValidW, LoadStallD, CSRMWriteM, BPPredWrongE, | ||||||
|     input  logic [11:0]      CSRAdrM, |     input  logic [11:0]      CSRAdrM, | ||||||
|     input  logic [1:0]       PrivilegeModeW, |     input  logic [1:0]       PrivilegeModeW, | ||||||
|     input  logic [`XLEN-1:0] CSRWriteValM, |     input  logic [`XLEN-1:0] CSRWriteValM, | ||||||
| @ -62,7 +62,8 @@ module csrc ( | |||||||
|     assign MCOUNTEN[1] = 1'b0; |     assign MCOUNTEN[1] = 1'b0; | ||||||
|     assign MCOUNTEN[2] = InstrValidW; |     assign MCOUNTEN[2] = InstrValidW; | ||||||
|     assign MCOUNTEN[3] = LoadStallD; |     assign MCOUNTEN[3] = LoadStallD; | ||||||
|     assign MCOUNTEN[`COUNTERS:4] = 0;  |     assign MCOUNTEN[4] = BPPredWrongE; | ||||||
|  |     assign MCOUNTEN[`COUNTERS:5] = 0;  | ||||||
| 
 | 
 | ||||||
|     genvar j;        |     genvar j;        | ||||||
|     generate |     generate | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ module privileged ( | |||||||
|   output logic [`XLEN-1:0] CSRReadValW, |   output logic [`XLEN-1:0] CSRReadValW, | ||||||
|   output logic [`XLEN-1:0] PrivilegedNextPCM, |   output logic [`XLEN-1:0] PrivilegedNextPCM, | ||||||
|   output logic             RetM, TrapM, |   output logic             RetM, TrapM, | ||||||
|   input  logic             InstrValidW, FloatRegWriteW, LoadStallD, |   input  logic             InstrValidW, FloatRegWriteW, LoadStallD, BPPredWrongE, | ||||||
|   input  logic             PrivilegedM, |   input  logic             PrivilegedM, | ||||||
|   input  logic             InstrMisalignedFaultM, InstrAccessFaultF, IllegalIEUInstrFaultD, |   input  logic             InstrMisalignedFaultM, InstrAccessFaultF, IllegalIEUInstrFaultD, | ||||||
|   input  logic             LoadMisalignedFaultM, LoadAccessFaultM, |   input  logic             LoadMisalignedFaultM, LoadAccessFaultM, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user