forked from Github_Repos/cvw
		
	Test generation files in common format
This commit is contained in:
		
							parent
							
								
									110b762b55
								
							
						
					
					
						commit
						11bb3f0a3e
					
				@ -96,6 +96,10 @@ void output(FILE *fptr, int aSign, int aExp, double aFrac, int bSign, int bExp,
 | 
				
			|||||||
  // Print r in standard double format
 | 
					  // Print r in standard double format
 | 
				
			||||||
  fprintf(fptr, "%03x", rExp|(rSign<<11));
 | 
					  fprintf(fptr, "%03x", rExp|(rSign<<11));
 | 
				
			||||||
  printhex(fptr, rFrac);
 | 
					  printhex(fptr, rFrac);
 | 
				
			||||||
 | 
					  fprintf(fptr, "_");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Spacing for testbench, value doesn't matter
 | 
				
			||||||
 | 
					  fprintf(fptr, "%016x", 0);
 | 
				
			||||||
  fprintf(fptr, "\n");
 | 
					  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,
 | 
					  double mans[ENTRIES] = {1, 1.5, 1.25, 1.125, 1.0625,
 | 
				
			||||||
			  1.75, 1.875, 1.99999,
 | 
								  1.75, 1.875, 1.99999,
 | 
				
			||||||
			  1.1, 1.2, 1.01, 1.001, 1.0001,
 | 
								  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};
 | 
								  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,
 | 
					  double exps[ENTRIES] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
 | 
				
			||||||
        11, 12, 13, 14, 15, 16};
 | 
					        11, 12, 13, 14, 15, 16};
 | 
				
			||||||
  int i;
 | 
					  int i;
 | 
				
			||||||
@ -69,14 +65,23 @@ void main(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void output(FILE *fptr, int aExp, double aFrac, int rExp, double rFrac)
 | 
					void output(FILE *fptr, int aExp, double aFrac, int rExp, double rFrac)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  // Print a in standard double format
 | 
				
			||||||
  fprintf(fptr, "%03x", aExp);
 | 
					  fprintf(fptr, "%03x", aExp);
 | 
				
			||||||
  printhex(fptr, aFrac);
 | 
					  printhex(fptr, aFrac);
 | 
				
			||||||
  fprintf(fptr, "_");
 | 
					  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);
 | 
					  fprintf(fptr, "%03x", rExp);
 | 
				
			||||||
  printhex(fptr, rFrac);
 | 
					  printhex(fptr, rFrac);
 | 
				
			||||||
 | 
					  fprintf(fptr, "_");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Spacing for testbench, value doesn't matter
 | 
				
			||||||
 | 
					  fprintf(fptr, "%016x", 0);
 | 
				
			||||||
  fprintf(fptr, "\n");
 | 
					  fprintf(fptr, "\n");
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void printhex(FILE *fptr, double m)
 | 
					void printhex(FILE *fptr, double m)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user