mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	coverage improvements for mret when mpp = 3; update imperas config
This commit is contained in:
		
							parent
							
								
									4936496bb9
								
							
						
					
					
						commit
						0c13e14bbf
					
				@ -37,6 +37,8 @@
 | 
			
		||||
# SV39 and SV48 supported
 | 
			
		||||
--override cpu/Sv_modes=768
 | 
			
		||||
 | 
			
		||||
--override cpu/Svinval=T
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#  clarify
 | 
			
		||||
#--override refRoot/cpu/mtvec_sext=F
 | 
			
		||||
 | 
			
		||||
@ -309,7 +309,20 @@ sretdone:
 | 
			
		||||
    .word 0x102F8073
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    j done
 | 
			
		||||
    # cover mret when mpp = 3 and mprv = 1
 | 
			
		||||
    li a0, 3
 | 
			
		||||
    ecall               # enter machine mode
 | 
			
		||||
    bseti t0, zero, 17
 | 
			
		||||
    csrs mstatus, t0    # set MPRV
 | 
			
		||||
    li t1, 0x00001800   
 | 
			
		||||
    csrs mstatus, t1    # set MPP=3
 | 
			
		||||
    la t1, finished
 | 
			
		||||
    csrr t0, mepc       
 | 
			
		||||
    csrw mepc, t1       # set mepc for mret to jump to
 | 
			
		||||
    mret
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
finished: j done
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user