From 39d6007ca7e3b27e8230db6690faa7469ca62cb2 Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Fri, 20 Mar 2020 16:18:55 -0500 Subject: fpga: tools: Add ModelSim to run_testbenches.py This adds the "modelsim" simulator option to run_testbenches.py to allow for regression testing of the native ModelSim simulation target. --- fpga/usrp3/tools/utils/run_testbenches.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'fpga/usrp3/tools/utils/run_testbenches.py') diff --git a/fpga/usrp3/tools/utils/run_testbenches.py b/fpga/usrp3/tools/utils/run_testbenches.py index bcfb7e5c6..70cafeffd 100755 --- a/fpga/usrp3/tools/utils/run_testbenches.py +++ b/fpga/usrp3/tools/utils/run_testbenches.py @@ -133,20 +133,20 @@ def parse_output(simout): # test executors. tb_match_fmt0 = ([ b'.*TESTBENCH FINISHED: (.+)\n', - b' - Time elapsed: (.+) ns.*\n', - b' - Tests Expected: (.+)\n', - b' - Tests Run: (.+)\n', - b' - Tests Passed: (.+)\n', - b'Result: (PASSED|FAILED).*', + b'(?:# )? - Time elapsed: (.+) ns.*\n', + b'(?:# )? - Tests Expected: (.+)\n', + b'(?:# )? - Tests Run: (.+)\n', + b'(?:# )? - Tests Passed: (.+)\n', + b'(?:# )?Result: (PASSED|FAILED).*', ]) m_fmt0 = re.match(b''.join(tb_match_fmt0), simout, re.DOTALL) tb_match_fmt1 = ([ b'.*TESTBENCH FINISHED: (.*)\n', - b' - Time elapsed: (.+) ns.*\n', - b' - Tests Run: (.+)\n', - b' - Tests Passed: (.+)\n', - b' - Tests Failed: (.+)\n', - b'Result: (PASSED|FAILED).*', + b'(?:# )? - Time elapsed: (.+) ns.*\n', + b'(?:# )? - Tests Run: (.+)\n', + b'(?:# )? - Tests Passed: (.+)\n', + b'(?:# )? - Tests Failed: (.+)\n', + b'(?:# )?Result: (PASSED|FAILED).*', ]) m_fmt1 = re.match(b''.join(tb_match_fmt1), simout, re.DOTALL) @@ -368,7 +368,7 @@ def do_report(args): def get_options(): parser = argparse.ArgumentParser(description='Batch testbench execution script') parser.add_argument('-d', '--basedir', default=BASE_DIR, help='Base directory for the usrp3 codebase') - parser.add_argument('-s', '--simulator', choices=['xsim', 'vsim'], default='xsim', help='Simulator name') + parser.add_argument('-s', '--simulator', choices=['xsim', 'vsim', 'modelsim'], default='xsim', help='Simulator name') parser.add_argument('-e', '--setupenv', default=None, help='Optional environment setup script to run for each TB') parser.add_argument('-r', '--report', default='testbench_report.csv', help='Name of the output report file') parser.add_argument('-x', '--excludes', default=None, help='Name of the excludes file. It contains all targets to exlude.') -- cgit v1.2.3