mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Fixed tlbNAPOT test to run and makefile to gather coverage stats
This commit is contained in:
		
							parent
							
								
									06ddccd983
								
							
						
					
					
						commit
						9ced88c55c
					
				| @ -17,7 +17,7 @@ all: riscoftests memfiles coveragetests | |||||||
| 
 | 
 | ||||||
| wally-riscv-arch-test: wallyriscoftests memfiles | wally-riscv-arch-test: wallyriscoftests memfiles | ||||||
| 
 | 
 | ||||||
| coverage: | coverage: cov/rv64gc_arch64i.ucdb  | ||||||
| 	#make -C ../tests/coverage --jobs | 	#make -C ../tests/coverage --jobs | ||||||
| 	#iter-elf.bash --cover --search ../tests/coverage | 	#iter-elf.bash --cover --search ../tests/coverage | ||||||
| 	vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb -logfile cov/log | 	vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb -logfile cov/log | ||||||
|  | |||||||
| @ -54,6 +54,8 @@ main: | |||||||
| #    li t4, 0x1000     # address step size | #    li t4, 0x1000     # address step size | ||||||
| #    li a2, 0x80216000 # Test NAPOT pages | #    li a2, 0x80216000 # Test NAPOT pages | ||||||
| #    jal a1, looptest | #    jal a1, looptest | ||||||
|  |     li a0, 3 # switch back to machine mode because code at 0x80000000 may not have clean page table entry | ||||||
|  |     ecall | ||||||
|     j done |     j done | ||||||
| 
 | 
 | ||||||
| looptest: | looptest: | ||||||
| @ -62,15 +64,16 @@ looptest: | |||||||
|     li t3, 35     # Max amount of Loops = 34 |     li t3, 35     # Max amount of Loops = 34 | ||||||
|     li t5, 0x8082 # return instruction opcode |     li t5, 0x8082 # return instruction opcode | ||||||
| 
 | 
 | ||||||
| loop: bge t2, t3, looptesti   # exit loop if i >= loops | loop: bge t2, t3, finished   # exit loop if i >= loops | ||||||
|     sw t5, 0(t0)   # store a return at this address to exercise DTLB |     sw t5, 0(t0)   # store a return at this address to exercise DTLB | ||||||
|     lw t1, 0(t0)   # read it back |     lw t1, 0(t0)   # read it back | ||||||
|     fence.i    # synchronize with I$ |     fence.i    # synchronize with I$ | ||||||
|     jalr ra, t0 # jump to the return statement to exercise the ITLB | #    jalr ra, t0 # jump to the return statement to exercise the ITLB | ||||||
|     add t0, t0, t4 |     add t0, t0, t4 | ||||||
|     addi t2, t2, 1 |     addi t2, t2, 1 | ||||||
|     j loop |     j loop | ||||||
| 
 | 
 | ||||||
|  | /* | ||||||
| looptesti: | looptesti: | ||||||
|     mv t0, a2       # base address |     mv t0, a2       # base address | ||||||
|     li t2, 0             # i = 0 |     li t2, 0             # i = 0 | ||||||
| @ -82,6 +85,7 @@ loopi: bge t2, t3, finished   # exit loop if i >= loops | |||||||
|     add t0, t0, t4 |     add t0, t0, t4 | ||||||
|     addi t2, t2, 1 |     addi t2, t2, 1 | ||||||
|     j loopi |     j loopi | ||||||
|  | */ | ||||||
| 
 | 
 | ||||||
| finished: | finished: | ||||||
|     jr a1 |     jr a1 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user