mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
wsim now simulates a single elffile.
This commit is contained in:
parent
08601d7270
commit
3fdfa0f705
7
bin/wsim
7
bin/wsim
@ -18,6 +18,7 @@ import os
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("config", help="Configuration file")
|
||||
parser.add_argument("testsuite", help="Test suite or ELF file")
|
||||
parser.add_argument("--elf", "-e", help="Elf file", action="store_true")
|
||||
parser.add_argument("--sim", "-s", help="Simulator", choices=["questa", "verilator", "vcs"], default="questa")
|
||||
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")
|
||||
@ -26,6 +27,10 @@ parser.add_argument("--args", "-a", help="Optional arguments passed to simulator
|
||||
parser.add_argument("--vcd", "-v", help="Generate testbench.vcd", action="store_true")
|
||||
args = parser.parse_args()
|
||||
print("Config=" + args.config + " tests=" + args.testsuite + " sim=" + args.sim + " gui=" + str(args.gui) + " args='" + args.args + "'")
|
||||
ElfFile=""
|
||||
if(args.elf):
|
||||
ElfFile = "+ElfFile=" + args.testsuite
|
||||
args.testsuite = "none"
|
||||
|
||||
# Validate arguments
|
||||
if (args.gui):
|
||||
@ -55,7 +60,7 @@ cd = "cd $WALLY/sim/" +args.sim
|
||||
if (args.sim == "questa"):
|
||||
if (args.tb == "testbench_fp"):
|
||||
args.args = " -GTEST=\"" + args.testsuite + "\" " + args.args
|
||||
cmd = "do wally.do " + args.config + " " + args.testsuite + " " + args.tb + " " + args.args
|
||||
cmd = "do wally.do " + args.config + " " + args.testsuite + " " + args.tb + " " + args.args + " " + ElfFile
|
||||
if (args.coverage):
|
||||
cmd += " --coverage"
|
||||
if (args.gui): # launch Questa with GUI; add +acc to keep variables accessible
|
||||
|
Loading…
Reference in New Issue
Block a user