From 1b5e63ebe2cda26d27d7955577afe75b768efc95 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 14 Jul 2024 09:49:15 -0700 Subject: [PATCH] Fixed elf handling --- bin/wsim | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/wsim b/bin/wsim index a6fa47e13..85afb7780 100755 --- a/bin/wsim +++ b/bin/wsim @@ -40,13 +40,20 @@ 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: +elif (args.elf != ""): print("ELF file not found: " + args.elf) exit(1) +if(args.testsuite.endswith('.elf')): + if (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.testsuite) + exit(1) + + + # Validate arguments if (args.gui or args.coverage or args.fcov or args.lockstep): if args.sim not in ["questa", "vcs"]: