diff --git a/.gitignore b/.gitignore index 1aa2b562d..e298f0ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,8 @@ tests/riscof/config32e.ini tests/riscof/config64.ini tests/riscof/riscof_work/ tests/wally-riscv-arch-test/riscv-test-suite/*/I/*/** -tests/fp/vectors/*.tv -tests/fp/vectors/sed* +tests/fp/vectors/**/*.tv +tests/fp/vectors/**/sed* tests/fp/combined_IF_vectors/IF_vectors/*.tv tests/custom/*/*/ tests/custom/*/*/*.memfile diff --git a/testbench/testbench_fp.sv b/testbench/testbench_fp.sv index 58d37ba29..c6b91ad10 100644 --- a/testbench/testbench_fp.sv +++ b/testbench/testbench_fp.sv @@ -35,6 +35,21 @@ 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) @@ -657,8 +672,6 @@ module testbench_fp; // Read the first test initial begin - //string testname = {`PATH, Tests[TestNum]}; - static string pp = `PATH; string testname; string tt0; tt0 = $sformatf("%s", Tests[TestNum]); @@ -1004,7 +1017,7 @@ module testbench_fp; // clear the vectors for(int i=0; i