mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Modified the branch log to include markers for the start and end of tests with exclusion of warmup period.
This commit is contained in:
		
							parent
							
								
									ada099c58b
								
							
						
					
					
						commit
						187752a339
					
				| @ -69,6 +69,7 @@ logic [3:0] dummy; | |||||||
| 
 | 
 | ||||||
|   logic 	    DCacheFlushDone, DCacheFlushStart; |   logic 	    DCacheFlushDone, DCacheFlushStart; | ||||||
|   logic riscofTest;  |   logic riscofTest;  | ||||||
|  |   logic StartSample, EndSample; | ||||||
|      |      | ||||||
|   flopenr #(`XLEN) PCWReg(clk, reset, ~dut.core.ieu.dp.StallW, dut.core.ifu.PCM, PCW); |   flopenr #(`XLEN) PCWReg(clk, reset, ~dut.core.ieu.dp.StallW, dut.core.ifu.PCM, PCW); | ||||||
|   flopenr  #(32)   InstrWReg(clk, reset, ~dut.core.ieu.dp.StallW,  dut.core.ifu.InstrM, InstrW); |   flopenr  #(32)   InstrWReg(clk, reset, ~dut.core.ieu.dp.StallW,  dut.core.ifu.InstrM, InstrW); | ||||||
| @ -405,8 +406,7 @@ logic [3:0] dummy; | |||||||
|     integer HPMCindex; |     integer HPMCindex; | ||||||
| 	logic 	StartSampleFirst; | 	logic 	StartSampleFirst; | ||||||
| 	logic 	StartSampleDelayed; | 	logic 	StartSampleDelayed; | ||||||
| 	logic 	StartSample; | 	logic 	EndSampleFirst, EndSampleDelayed; | ||||||
| 	logic 	EndSample, EndSampleFirst, EndSampleDelayed; |  | ||||||
| 	logic [`XLEN-1:0] InitialHPMCOUNTERH[`COUNTERS-1:0]; | 	logic [`XLEN-1:0] InitialHPMCOUNTERH[`COUNTERS-1:0]; | ||||||
| 
 | 
 | ||||||
|     string  HPMCnames[] = '{"Mcycle", |     string  HPMCnames[] = '{"Mcycle", | ||||||
| @ -549,10 +549,12 @@ logic [3:0] dummy; | |||||||
|         file = $fopen("branch.log", "w"); |         file = $fopen("branch.log", "w"); | ||||||
| 	  end | 	  end | ||||||
|       always @(posedge clk) begin |       always @(posedge clk) begin | ||||||
|  | 		if(StartSample) $fwrite(file, "BEGIN %s\n", memfilename); | ||||||
| 		if(dut.core.ifu.InstrClassM[0] & ~dut.core.StallW & ~dut.core.FlushW & dut.core.InstrValidM) begin | 		if(dut.core.ifu.InstrClassM[0] & ~dut.core.StallW & ~dut.core.FlushW & dut.core.InstrValidM) begin | ||||||
| 		  direction = PCSrcM ? "t" : "n"; | 		  direction = PCSrcM ? "t" : "n"; | ||||||
| 		  $fwrite(file, "%h %s\n", dut.core.PCM, direction); | 		  $fwrite(file, "%h %s\n", dut.core.PCM, direction); | ||||||
| 		end | 		end | ||||||
|  | 		if(EndSample) $fwrite(file, "END %s\n", memfilename); | ||||||
| 	  end | 	  end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user