From 26d4fbcc19f0e33c83acac96aa2577490a7c2ccc Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 13 Jul 2024 21:42:14 -0700 Subject: [PATCH 1/3] Switched ImperasDV to RV64GCK model to support crypto (issue #872) --- testbench/testbench.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbench/testbench.sv b/testbench/testbench.sv index e65fed554..a0417808e 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -715,7 +715,7 @@ end void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VENDOR, "riscv.ovpworld.org")); void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_NAME, "riscv")); - void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VARIANT, "RV64GC")); + void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VARIANT, "RV64GCK")); void'(rvviRefConfigSetInt(IDV_CONFIG_MODEL_ADDRESS_BUS_WIDTH, 56)); void'(rvviRefConfigSetInt(IDV_CONFIG_MAX_NET_LATENCY_RETIREMENTS, 6)); From 904a081218ad01ca0d1f3eee4617ff27f0a7cde0 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 13 Jul 2024 21:59:26 -0700 Subject: [PATCH 2/3] allow wsim to take .elf in testsuite argument; print error if ELF not found --- bin/wsim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/wsim b/bin/wsim index 169f76a7a..a6fa47e13 100755 --- a/bin/wsim +++ b/bin/wsim @@ -21,8 +21,8 @@ import os # Parse arguments 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 name", default="") +parser.add_argument("testsuite", help="Test suite or path to .elf file") +parser.add_argument("--elf", "-e", help="ELF File name; use if name does not end in .elf", default="") 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") @@ -36,11 +36,16 @@ parser.add_argument("--covlog", "-d", help="Log coverage after n instructions.", args = parser.parse_args() print("Config=" + args.config + " tests=" + args.testsuite + " sim=" + args.sim + " gui=" + str(args.gui) + " args='" + args.args + "'") ElfFile="" -DirectorMode = 0 WALLY = os.environ.get('WALLY') if(os.path.isfile(args.elf)): ElfFile = "+ElfFile=" + os.path.abspath(args.elf) +elif(args.testsuite.endswith('.elf') and os.path.isfile(args.testsuite)): + ElfFile = "+ElfFile=" + os.path.abspath(args.testsuite) + args.testsuite=args.testsuite.rsplit('/', 1)[1] +else: + print("ELF file not found: " + args.elf) + exit(1) # Validate arguments if (args.gui or args.coverage or args.fcov or args.lockstep): From 779458f14afe497877f3f82ed7d3b8e71cc07113 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 13 Jul 2024 22:08:57 -0700 Subject: [PATCH 3/3] Waive CBO failures in iterelf because ImperasDV does not handle them properly yet --- bin/iterelf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/iterelf b/bin/iterelf index af284a858..ad39b69da 100755 --- a/bin/iterelf +++ b/bin/iterelf @@ -48,6 +48,10 @@ def run_test_case(elf): if search_log_for_mismatches(logfile): print(f"{bcolors.OKGREEN}%s: Success{bcolors.ENDC}" % (cmd)) return 0 + elif("WALLY-cbom-01" in elf): + # Remove this when CBO instructions are modeled in ImperasDV + print(f"{bcolors.OKCYAN}%s: Expected mismatch because ImperasDV does not yet model cache for CBO instructions {bcolors.ENDC}" % (cmd)) + return 0 else: print(f"{bcolors.FAIL}%s: Failures detected in output{bcolors.ENDC}" % (cmd)) print(" Check %s" % logfile)