mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-24 13:57:07 -04:00
TestFloat running; normal testbench broken
This commit is contained in:
parent
4b19f6d542
commit
9ee7544d3c
4 changed files with 10 additions and 11 deletions
|
@ -29,9 +29,7 @@ tests = [
|
|||
"arch32zba", "arch32zbb", "arch32zbc", "arch32zbs", "arch32zfh", "arch32zfh_fma",
|
||||
"arch32zfh_divsqrt", "arch32zfaf", "wally32a", "wally32priv", "wally32periph",
|
||||
"arch32zbkb", "arch32zbkc", "arch32zbkx", "arch32zknd", "arch32zkne", "arch32zknh"]], # "arch32zcb", "arch32zfad",
|
||||
["rv64e", ["arch64e"]],
|
||||
["rv64i", ["arch64i"]],
|
||||
["rv64imc", ["arch64i", "arch64c", "arch64m", "wally64periph"]],
|
||||
]
|
||||
|
||||
# Separate out floating-point tests for RV64 to speed up coverage
|
||||
|
@ -214,15 +212,15 @@ def getBuildrootTC(boot):
|
|||
def addTests(tests, sim):
|
||||
for test in tests:
|
||||
config = test[0];
|
||||
tests = test[1];
|
||||
suites = test[1];
|
||||
if(len(test) >= 4 and test[2] == "configOptions"):
|
||||
configOptions = test[3]
|
||||
cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config
|
||||
else:
|
||||
configOptions = ""
|
||||
#cmdPrefix = "vsim > {} -c <<!\ndo wally-batch.do "+config
|
||||
cmdPrefix="./wsim -s " + sim + " " + config
|
||||
for t in tests:
|
||||
cmdPrefix="wsim -s " + sim + " " + config
|
||||
for t in suites:
|
||||
tc = TestCase(
|
||||
name=t,
|
||||
variant=config,
|
||||
|
@ -238,7 +236,7 @@ def search_log_for_text(text, logfile):
|
|||
|
||||
def run_test_case(config):
|
||||
"""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 + " > " + logname
|
||||
print(cmd)
|
||||
|
|
5
bin/wsim
5
bin/wsim
|
@ -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("--gui", "-g", help="Simulate with GUI", 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()
|
||||
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
|
||||
if (args.gui):
|
||||
|
@ -39,7 +40,7 @@ if (args.coverage):
|
|||
# Launch selected simulator
|
||||
cd = "cd $WALLY/sim/" +args.sim
|
||||
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):
|
||||
cmd += " -coverage"
|
||||
os.system(cd + "; vsim -c -do \"" + cmd + "\"")
|
||||
|
|
|
@ -77,7 +77,7 @@ vlog -lint -work ${WKDIR} +incdir+${CONFIG}/$1 +incdir+${CONFIG}/deriv/$1 +incdi
|
|||
# start and run simulation
|
||||
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
||||
vopt wkdir/${CFG}_${TESTSUITE}.${TESTBENCH} -work ${WKDIR} -G TEST=$2 ${configOptions} -o testbenchopt ${CoverageVoptArg}
|
||||
vsim -lib ${WKDIR} testbenchopt -fatal 7 -suppress 3829 ${CoverageVsimArg}
|
||||
vsim -lib ${WKDIR} testbenchopt -fatal 7 -suppress 3829 ${CoverageVsimArg}
|
||||
|
||||
# vsim -lib wkdir/work_${1}_${2} testbenchopt -fatal 7 -suppress 3829
|
||||
# power add generates the logging necessary for said generation.
|
||||
|
|
|
@ -32,7 +32,7 @@ module testbench_fp;
|
|||
// to run specific precisions (e.g., quad or all)
|
||||
// parameter string TEST="none";
|
||||
// parameter string TEST_SIZE="none";
|
||||
parameter string TEST="add";
|
||||
parameter string TEST="none";
|
||||
parameter string TEST_SIZE="all";
|
||||
|
||||
`include "parameter-defs.vh"
|
||||
|
@ -156,7 +156,7 @@ module testbench_fp;
|
|||
// $display("This simulation for TEST is %s", TEST);
|
||||
// $display("This simulation for TEST is of the operand size of %s", TEST_SIZE);
|
||||
|
||||
if (P.Q_SUPPORTED & (TEST_SIZE == "QP" | TEST_SIZE == "all")) begin // if Quad percision is supported
|
||||
if (P.Q_SUPPORTED & (TEST_SIZE == "QP" | TEST_SIZE == "all")) begin // if Quad percision is supported
|
||||
if (TEST === "cvtint" | TEST === "all") begin // if testing integer conversion
|
||||
// add the 128-bit cvtint tests to the to-be-tested list
|
||||
Tests = {Tests, f128rv32cvtint};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue