mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Fix issue 444 by preventing delegation of misaligned instructions when compressed instructions are supported.
This commit is contained in:
		
							parent
							
								
									09c4aaa5d9
								
							
						
					
					
						commit
						27b8ebb9bd
					
				@ -94,7 +94,8 @@ module csrm  import cvw::*;  #(parameter cvw_t P) (
 | 
				
			|||||||
  localparam DSCRATCH1     = 12'h7B3;
 | 
					  localparam DSCRATCH1     = 12'h7B3;
 | 
				
			||||||
  // Constants
 | 
					  // Constants
 | 
				
			||||||
  localparam ZERO = {(P.XLEN){1'b0}};
 | 
					  localparam ZERO = {(P.XLEN){1'b0}};
 | 
				
			||||||
  localparam MEDELEG_MASK  = 16'hB3FF;
 | 
					  // when C is supported, there can't be misaligned instructions
 | 
				
			||||||
 | 
					  localparam MEDELEG_MASK  = P.C_SUPPORTED ? 16'hB3FE : 16'hB3FF;
 | 
				
			||||||
  localparam MIDELEG_MASK  = 12'h222; // we choose to not make machine interrupts delegable
 | 
					  localparam MIDELEG_MASK  = 12'h222; // we choose to not make machine interrupts delegable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 // There are PMP_ENTRIES = 0, 16, or 64 PMPADDR registers, each of which has its own flop
 | 
					 // There are PMP_ENTRIES = 0, 16, or 64 PMPADDR registers, each of which has its own flop
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user