mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Test generation files in common format
This commit is contained in:
		
							parent
							
								
									120994b42b
								
							
						
					
					
						commit
						3ed6b8d1ff
					
				@ -96,6 +96,10 @@ void output(FILE *fptr, int aSign, int aExp, double aFrac, int bSign, int bExp,
 | 
			
		||||
  // Print r in standard double format
 | 
			
		||||
  fprintf(fptr, "%03x", rExp|(rSign<<11));
 | 
			
		||||
  printhex(fptr, rFrac);
 | 
			
		||||
  fprintf(fptr, "_");
 | 
			
		||||
 | 
			
		||||
  // Spacing for testbench, value doesn't matter
 | 
			
		||||
  fprintf(fptr, "%016x", 0);
 | 
			
		||||
  fprintf(fptr, "\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							@ -33,11 +33,7 @@ void main(void)
 | 
			
		||||
  double mans[ENTRIES] = {1, 1.5, 1.25, 1.125, 1.0625,
 | 
			
		||||
			  1.75, 1.875, 1.99999,
 | 
			
		||||
			  1.1, 1.2, 1.01, 1.001, 1.0001,
 | 
			
		||||
<<<<<<< Updated upstream
 | 
			
		||||
			  1/1.1, 1/1.5, 1/1.25, 1/1.125};
 | 
			
		||||
=======
 | 
			
		||||
			  2/1.1, 2/1.5, 2/1.25, 2/1.125};
 | 
			
		||||
>>>>>>> Stashed changes
 | 
			
		||||
  double exps[ENTRIES] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
 | 
			
		||||
        11, 12, 13, 14, 15, 16};
 | 
			
		||||
  int i;
 | 
			
		||||
@ -69,14 +65,23 @@ void main(void)
 | 
			
		||||
 | 
			
		||||
void output(FILE *fptr, int aExp, double aFrac, int rExp, double rFrac)
 | 
			
		||||
{
 | 
			
		||||
  // Print a in standard double format
 | 
			
		||||
  fprintf(fptr, "%03x", aExp);
 | 
			
		||||
  printhex(fptr, aFrac);
 | 
			
		||||
  fprintf(fptr, "_");
 | 
			
		||||
 | 
			
		||||
  // Spacing for testbench, value doesn't matter
 | 
			
		||||
  fprintf(fptr, "%016x", 0);
 | 
			
		||||
  fprintf(fptr, "_");
 | 
			
		||||
 | 
			
		||||
  // Print r in standard double format
 | 
			
		||||
  fprintf(fptr, "%03x", rExp);
 | 
			
		||||
  printhex(fptr, rFrac);
 | 
			
		||||
  fprintf(fptr, "_");
 | 
			
		||||
 | 
			
		||||
  // Spacing for testbench, value doesn't matter
 | 
			
		||||
  fprintf(fptr, "%016x", 0);
 | 
			
		||||
  fprintf(fptr, "\n");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void printhex(FILE *fptr, double m)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user