mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Restore testbench_fp to load from vectors directory
This commit is contained in:
		
							parent
							
								
									a3214e1682
								
							
						
					
					
						commit
						716bee3d26
					
				@ -35,21 +35,6 @@ module testbench_fp;
 | 
			
		||||
 | 
			
		||||
  `include "parameter-defs.vh"
 | 
			
		||||
 | 
			
		||||
`ifdef VERILATOR
 | 
			
		||||
    import "DPI-C" function string getenvval(input string env_name);
 | 
			
		||||
    string       WALLY_DIR = getenvval("WALLY");
 | 
			
		||||
`elsif VCS
 | 
			
		||||
    import "DPI-C" function string getenv(input string env_name);
 | 
			
		||||
    string       WALLY_DIR = getenv("WALLY");
 | 
			
		||||
`else
 | 
			
		||||
    string       WALLY_DIR = "$WALLY";
 | 
			
		||||
`endif
 | 
			
		||||
 | 
			
		||||
  string FP_TESTS = {WALLY_DIR, "/tests/fp/vectors"};
 | 
			
		||||
  string pp;
 | 
			
		||||
  if (P.IEEE754) assign pp = {FP_TESTS, "/ieee/"};
 | 
			
		||||
  else assign pp = {FP_TESTS, "/riscv/"};
 | 
			
		||||
 | 
			
		||||
  parameter MAXVECTORS = 8388610;
 | 
			
		||||
 | 
			
		||||
  // FIXME: needs cleaning of unused variables (jes)
 | 
			
		||||
@ -671,6 +656,7 @@ module testbench_fp;
 | 
			
		||||
 | 
			
		||||
  // Read the first test
 | 
			
		||||
  initial begin
 | 
			
		||||
    static string pp = `PATH;
 | 
			
		||||
    string testname;
 | 
			
		||||
    string tt0;
 | 
			
		||||
    tt0 = $sformatf("%s", Tests[TestNum]);
 | 
			
		||||
@ -1009,7 +995,7 @@ module testbench_fp;
 | 
			
		||||
      // clear the vectors
 | 
			
		||||
      for(int i=0; i<MAXVECTORS; i++) TestVectors[i] = '1;
 | 
			
		||||
      // read next files
 | 
			
		||||
      $readmemh({pp, Tests[TestNum]}, TestVectors);
 | 
			
		||||
      $readmemh({`PATH, Tests[TestNum]}, TestVectors);
 | 
			
		||||
      // set the vector index back to 0
 | 
			
		||||
      VectorNum = 0;
 | 
			
		||||
      // incemet the operation if all the rounding modes have been tested
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,7 @@
 | 
			
		||||
// and limitations under the License.
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
`define PATH "../../tests/fp/vectors/"
 | 
			
		||||
`define ADD_OPCTRL     3'b110
 | 
			
		||||
`define MUL_OPCTRL     3'b100
 | 
			
		||||
`define SUB_OPCTRL     3'b111
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user