TestFloat running; normal testbench broken

This commit is contained in:
David Harris 2024-04-06 09:28:07 -07:00
parent 4b19f6d542
commit 9ee7544d3c
4 changed files with 10 additions and 11 deletions

View file

@ -29,9 +29,7 @@ tests = [
"arch32zba", "arch32zbb", "arch32zbc", "arch32zbs", "arch32zfh", "arch32zfh_fma", "arch32zba", "arch32zbb", "arch32zbc", "arch32zbs", "arch32zfh", "arch32zfh_fma",
"arch32zfh_divsqrt", "arch32zfaf", "wally32a", "wally32priv", "wally32periph", "arch32zfh_divsqrt", "arch32zfaf", "wally32a", "wally32priv", "wally32periph",
"arch32zbkb", "arch32zbkc", "arch32zbkx", "arch32zknd", "arch32zkne", "arch32zknh"]], # "arch32zcb", "arch32zfad", "arch32zbkb", "arch32zbkc", "arch32zbkx", "arch32zknd", "arch32zkne", "arch32zknh"]], # "arch32zcb", "arch32zfad",
["rv64e", ["arch64e"]],
["rv64i", ["arch64i"]], ["rv64i", ["arch64i"]],
["rv64imc", ["arch64i", "arch64c", "arch64m", "wally64periph"]],
] ]
# Separate out floating-point tests for RV64 to speed up coverage # Separate out floating-point tests for RV64 to speed up coverage
@ -214,15 +212,15 @@ def getBuildrootTC(boot):
def addTests(tests, sim): def addTests(tests, sim):
for test in tests: for test in tests:
config = test[0]; config = test[0];
tests = test[1]; suites = test[1];
if(len(test) >= 4 and test[2] == "configOptions"): if(len(test) >= 4 and test[2] == "configOptions"):
configOptions = test[3] configOptions = test[3]
cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config
else: else:
configOptions = "" configOptions = ""
#cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config #cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config
cmdPrefix="./wsim -s " + sim + " " + config cmdPrefix="wsim -s " + sim + " " + config
for t in tests: for t in suites:
tc = TestCase( tc = TestCase(
name=t, name=t,
variant=config, variant=config,
@ -238,7 +236,7 @@ def search_log_for_text(text, logfile):
def run_test_case(config): def run_test_case(config):
"""Run the given test case, and return 0 if the test suceeds and 1 if it fails""" """Run the given test case, and return 0 if the test suceeds and 1 if it fails"""
logname = "questa/logs/"+config.variant+"_"+config.name+".log" logname = "$WALLY/sim/questa/logs/"+config.variant+"_"+config.name+".log"
# cmd = config.cmd.format(logname) # cmd = config.cmd.format(logname)
cmd = config.cmd + " > " + logname cmd = config.cmd + " > " + logname
print(cmd) print(cmd)

View file

@ -22,8 +22,9 @@ parser.add_argument("--sim", "-s", help="Simulator", choices=["questa", "verilat
parser.add_argument("--tb", "-t", help="Testbench", choices=["testbench", "testbench_fp"], default="testbench") parser.add_argument("--tb", "-t", help="Testbench", choices=["testbench", "testbench_fp"], default="testbench")
parser.add_argument("--gui", "-g", help="Simulate with GUI", action="store_true") parser.add_argument("--gui", "-g", help="Simulate with GUI", action="store_true")
parser.add_argument("--coverage", "-c", help="Code & Functional Coverage", action="store_true") parser.add_argument("--coverage", "-c", help="Code & Functional Coverage", action="store_true")
parser.add_argument("--arg", "-a", help="Optional arguments passed to simulator via $value$plusargs", default="")
args = parser.parse_args() args = parser.parse_args()
print("Config: " + args.config + " tests " + args.testsuite + " sim " + args.sim + " gui " + str(args.gui)) print("Config=" + args.config + " tests=" + args.testsuite + " sim=" + args.sim + " gui=" + str(args.gui) + " arg='" + args.arg + "'")
# Validate arguments # Validate arguments
if (args.gui): if (args.gui):
@ -39,7 +40,7 @@ if (args.coverage):
# Launch selected simulator # Launch selected simulator
cd = "cd $WALLY/sim/" +args.sim cd = "cd $WALLY/sim/" +args.sim
if (args.sim == "questa"): if (args.sim == "questa"):
cmd = "do wally-batch.do " + args.config + " " + args.testsuite + " " + args.tb cmd = "do wally-batch.do " + args.config + " " + args.testsuite + " " + args.tb + " " + args.arg
if (args.coverage): if (args.coverage):
cmd += " -coverage" cmd += " -coverage"
os.system(cd + "; vsim -c -do \"" + cmd + "\"") os.system(cd + "; vsim -c -do \"" + cmd + "\"")

View file

@ -32,7 +32,7 @@ module testbench_fp;
// to run specific precisions (e.g., quad or all) // to run specific precisions (e.g., quad or all)
// parameter string TEST="none"; // parameter string TEST="none";
// parameter string TEST_SIZE="none"; // parameter string TEST_SIZE="none";
parameter string TEST="add"; parameter string TEST="none";
parameter string TEST_SIZE="all"; parameter string TEST_SIZE="all";
`include "parameter-defs.vh" `include "parameter-defs.vh"