mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 17:55:19 +00:00
Significantly simplify lockstepSetup function now that covlog and locksteplog are removed
This commit is contained in:
parent
bd9ca6ada6
commit
9f92572f2b
26
bin/wsim
26
bin/wsim
@ -76,6 +76,7 @@ def elfFileCheck(args):
|
|||||||
|
|
||||||
def prepSim(args, ElfFile):
|
def prepSim(args, ElfFile):
|
||||||
flags = ""
|
flags = ""
|
||||||
|
prefix = ""
|
||||||
if args.vcd:
|
if args.vcd:
|
||||||
args.params += " MAKE_VCD=1 "
|
args.params += " MAKE_VCD=1 "
|
||||||
if args.rvvi:
|
if args.rvvi:
|
||||||
@ -92,33 +93,22 @@ def prepSim(args, ElfFile):
|
|||||||
flags += " --fcov"
|
flags += " --fcov"
|
||||||
if args.gui:
|
if args.gui:
|
||||||
flags += " --gui"
|
flags += " --gui"
|
||||||
prefix, suffix = lockstepSetup(args)
|
if args.lockstep or args.lockstepverbose:
|
||||||
flags += suffix
|
flags += " --lockstep"
|
||||||
|
if args.lockstep or args.lockstepverbose or args.fcov:
|
||||||
|
prefix = lockstepSetup(args)
|
||||||
return flags, prefix
|
return flags, prefix
|
||||||
|
|
||||||
def lockstepSetup(args):
|
def lockstepSetup(args):
|
||||||
prefix = ""
|
imperasicVerbosePath = os.path.join(WALLY, "sim", "imperas-verbose.ic")
|
||||||
suffix = ""
|
|
||||||
ImperasPlusArgs = ""
|
|
||||||
|
|
||||||
if (args.lockstep or args.lockstepverbose or args.fcov):
|
|
||||||
imperasicPath = os.path.join(WALLY, "config", args.config, "imperas.ic")
|
imperasicPath = os.path.join(WALLY, "config", args.config, "imperas.ic")
|
||||||
if not os.path.isfile(imperasicPath): # If config is a derivative, look for imperas.ic in derivative configs
|
if not os.path.isfile(imperasicPath): # If config is a derivative, look for imperas.ic in derivative configs
|
||||||
imperasicPath = os.path.join(WALLY, "config", "deriv", args.config, "imperas.ic")
|
imperasicPath = os.path.join(WALLY, "config", "deriv", args.config, "imperas.ic")
|
||||||
if not os.path.isfile(imperasicPath):
|
if not os.path.isfile(imperasicPath):
|
||||||
print("Error: imperas.ic not found")
|
print("Error: imperas.ic not found")
|
||||||
exit(1)
|
exit(1)
|
||||||
prefix += f"IMPERAS_TOOLS={imperasicPath}"
|
prefix = f"IMPERAS_TOOLS={imperasicPath}{f':{imperasicVerbosePath}' if args.lockstepverbose else ''} "
|
||||||
|
return prefix
|
||||||
if (args.lockstep or args.lockstepverbose):
|
|
||||||
if(args.fcov):
|
|
||||||
ImperasPlusArgs = f" +IDV_TRACE2COV={0} +TRACE2LOG_AFTER={0} +TRACE2COV_ENABLE={0}"
|
|
||||||
else:
|
|
||||||
suffix = "--lockstep"
|
|
||||||
if(args.lockstepverbose):
|
|
||||||
prefix += f":{WALLY}/sim/imperas-verbose.ic"
|
|
||||||
args.args += ImperasPlusArgs
|
|
||||||
return prefix, suffix
|
|
||||||
|
|
||||||
def createDirs(args):
|
def createDirs(args):
|
||||||
for d in ["logs", "wkdir", "cov", "ucdb", "fcov", "fcov_ucdb"]:
|
for d in ["logs", "wkdir", "cov", "ucdb", "fcov", "fcov_ucdb"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user