forked from Github_Repos/cvw
		
	Fixed bugs with CSR checking. The parsing algorithm was messing up the token order after the CSR token.
This commit is contained in:
		
							parent
							
								
									e141a00934
								
							
						
					
					
						commit
						32db21659f
					
				@ -210,12 +210,19 @@ module testbench();
 | 
			
		||||
 | 
			
		||||
	  MarkerIndex += 4;
 | 
			
		||||
 | 
			
		||||
	  // parse CSRs
 | 
			
		||||
	  // parse CSRs, because there are 1 or more CSRs after the CSR token
 | 
			
		||||
	  // we check if the CSR token or the number of CSRs is greater than 0.
 | 
			
		||||
	  // if so then we want to parse for a CSR.
 | 
			
		||||
	end else if(ExpectedTokens[MarkerIndex] == "CSR" || NumCSRM > 0) begin
 | 
			
		||||
	  if(ExpectedTokens[MarkerIndex] == "CSR") begin
 | 
			
		||||
	    // all additional CSR's won't have this token.
 | 
			
		||||
	    MarkerIndex++;
 | 
			
		||||
	  end
 | 
			
		||||
	  matchCount = $sscanf(ExpectedTokens[MarkerIndex], "%s", ExpectedCSRArrayM[NumCSRM]);
 | 
			
		||||
	  matchCount = $sscanf(ExpectedTokens[MarkerIndex+1], "%x", ExpectedCSRArrayValueM[NumCSRM]);
 | 
			
		||||
 | 
			
		||||
	  MarkerIndex += 2;
 | 
			
		||||
 | 
			
		||||
	  // if we get an xcause with the interrupt bit set we must generate an interrupt as interrupts
 | 
			
		||||
	  // are imprecise.  Forcing the trap at this time will allow wally to track what qemu does.
 | 
			
		||||
	  // the msb of xcause will be set.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user