mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-06-28 09:36:01 -04:00
Merge branch 'dev' of github.com:jordancarlin/cvw; branch 'main' of github.com:openhwgroup/cvw into dev
This commit is contained in:
commit
81642005b0
2 changed files with 14 additions and 8 deletions
10
bin/wsim
10
bin/wsim
|
@ -44,8 +44,14 @@ def validateArgs(args):
|
||||||
if (args.lockstep or args.lockstepverbose) and not ((args.testsuite and args.testsuite.endswith(".elf")) or args.elf) and args.testsuite != "buildroot":
|
if (args.lockstep or args.lockstepverbose) and not ((args.testsuite and args.testsuite.endswith(".elf")) or args.elf) and args.testsuite != "buildroot":
|
||||||
print(f"Invalid Options. Cannot run a testsuite, {args.testsuite} with lockstep. Must run a single elf or buildroot.")
|
print(f"Invalid Options. Cannot run a testsuite, {args.testsuite} with lockstep. Must run a single elf or buildroot.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif any([args.gui, args.ccov, args.fcov, args.lockstep, args.lockstepverbose]) and args.sim not in ["questa", "vcs"]:
|
elif args.gui and args.sim != "questa":
|
||||||
print("Option only supported for Questa and VCS")
|
print("GUI only supported by Questa")
|
||||||
|
sys.exit(1)
|
||||||
|
elif any([args.gui, args.ccov, args.fcov]) and args.sim != "questa":
|
||||||
|
print("Coverage only supported by Questa")
|
||||||
|
sys.exit(1)
|
||||||
|
elif any([args.lockstep, args.lockstepverbose]) and args.sim not in ["questa", "vcs"]:
|
||||||
|
print("Lockstep only supported by Questa and VCS")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif args.tb == "testbench_fp" and args.sim != "questa":
|
elif args.tb == "testbench_fp" and args.sim != "questa":
|
||||||
print("Error: testbench_fp presently only supported by Questa, not VCS or Verilator, because of a touchy testbench")
|
print("Error: testbench_fp presently only supported by Questa, not VCS or Verilator, because of a touchy testbench")
|
||||||
|
|
|
@ -33,8 +33,8 @@ def parseArgs():
|
||||||
parser.add_argument("config", help="Configuration file")
|
parser.add_argument("config", help="Configuration file")
|
||||||
parser.add_argument("testsuite", help="Test suite (or none, when running a single ELF file) ")
|
parser.add_argument("testsuite", help="Test suite (or none, when running a single ELF file) ")
|
||||||
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("--ccov", "-c", help="Code Coverage", action="store_true")
|
# parser.add_argument("--ccov", "-c", help="Code Coverage", action="store_true") # Not yet implemented
|
||||||
parser.add_argument("--fcov", "-f", help="Functional Coverage", action="store_true")
|
# parser.add_argument("--fcov", "-f", help="Functional Coverage", action="store_true") # Not yet implemented
|
||||||
parser.add_argument("--args", "-a", help="Optional arguments passed to simulator via $value$plusargs", default="")
|
parser.add_argument("--args", "-a", help="Optional arguments passed to simulator via $value$plusargs", default="")
|
||||||
parser.add_argument("--params", "-p", help="Optional top-level parameter overrides of the form param=value", default="")
|
parser.add_argument("--params", "-p", help="Optional top-level parameter overrides of the form param=value", default="")
|
||||||
parser.add_argument("--define", "-d", help="Optional define macros passed to simulator", default="")
|
parser.add_argument("--define", "-d", help="Optional define macros passed to simulator", default="")
|
||||||
|
@ -67,8 +67,8 @@ def processArgs(wkdir, args):
|
||||||
"$IMPERAS_HOME/ImpPublic/source/host/rvvi/*.sv",
|
"$IMPERAS_HOME/ImpPublic/source/host/rvvi/*.sv",
|
||||||
"$IMPERAS_HOME/ImpProprietary/source/host/idv/*.sv"])
|
"$IMPERAS_HOME/ImpProprietary/source/host/idv/*.sv"])
|
||||||
simvOptions.append("-sv_lib $IMPERAS_HOME/lib/Linux64/ImperasLib/imperas.com/verification/riscv/1.0/model")
|
simvOptions.append("-sv_lib $IMPERAS_HOME/lib/Linux64/ImperasLib/imperas.com/verification/riscv/1.0/model")
|
||||||
if args.ccov:
|
# if args.ccov:
|
||||||
compileOptions.extend(["-cm line+cond+branch+fsm+tgl", f"-cm_log {wkdir}/coverage.log", f"-cm_dir {wkdir}/coverage"])
|
# compileOptions.extend(["-cm line+cond+branch+fsm+tgl", f"-cm_log {wkdir}/coverage.log", f"-cm_dir {wkdir}/coverage"])
|
||||||
if args.params:
|
if args.params:
|
||||||
compileOptions.append(setupParamOverrides(wkdir, args))
|
compileOptions.append(setupParamOverrides(wkdir, args))
|
||||||
if args.define:
|
if args.define:
|
||||||
|
@ -111,8 +111,8 @@ def main(args):
|
||||||
compileOptions, simvOptions = processArgs(wkdir, args)
|
compileOptions, simvOptions = processArgs(wkdir, args)
|
||||||
vcsCMD, simvCMD = setupCommands(wkdir, rtlFiles, compileOptions, simvOptions, args)
|
vcsCMD, simvCMD = setupCommands(wkdir, rtlFiles, compileOptions, simvOptions, args)
|
||||||
runVCS(vcsCMD, simvCMD)
|
runVCS(vcsCMD, simvCMD)
|
||||||
if args.ccov:
|
# if args.ccov:
|
||||||
runCoverage(wkdir, args.config, args.testsuite)
|
# runCoverage(wkdir, args.config, args.testsuite)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = parseArgs()
|
args = parseArgs()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue