Line 23... |
Line 23... |
|
|
def print_help ():
|
def print_help ():
|
print "Usage: run [-th] [-d ###] "
|
print "Usage: run [-th] [-d ###] "
|
print " -t : instruction decode (trace)"
|
print " -t : instruction decode (trace)"
|
print " -d : enable dumping start at time ###"
|
print " -d : enable dumping start at time ###"
|
|
print " -c : enable code coverage"
|
print " -h : option help (this list)"
|
print " -h : option help (this list)"
|
sys.exit(0)
|
sys.exit(0)
|
|
|
# parse command line options
|
# parse command line options
|
# t : instruction trace
|
# t : instruction trace
|
# d : dump starting at
|
# d : dump starting at
|
# h : help
|
# h : help
|
(options, args) = getopt.getopt (sys.argv[1:], "thd:")
|
(options, args) = getopt.getopt (sys.argv[1:], "thcd:")
|
if len(args) == 0:
|
if len(args) == 0:
|
print_help()
|
print_help()
|
testname = args[0]
|
testname = args[0]
|
simulator = "vcs +v2k -full64 -R -I +define+VCS=1 "
|
simulator = "vcs +v2k -full64 -R -I +vcs+lic+wait "
|
|
|
filelist = " -f env/tb.vf"
|
filelist = " -f env/tb.vf"
|
testdef = " +incdir+env -l logs/%s.log +define+DUMPFILE_NAME=\\\"logs/%s.dump\\\" +define+PROGRAM_FILE=\\\"tests/%s.vmem\\\"" % (testname, testname, testname)
|
testdef = " +incdir+env -l logs/%s.log +define+DUMPFILE_NAME=\\\"logs/%s.dump\\\" +define+PROGRAM_FILE=\\\"tests/%s.vmem\\\"" % (testname, testname, testname)
|
|
|
for option in options:
|
for option in options:
|
if option[0] == "-t":
|
if option[0] == "-t":
|
print "Adding TV80_INSTRUCTION_DECODE"
|
print "Adding TV80_INSTRUCTION_DECODE"
|
testdef += " +define+TV80_INSTRUCTION_DECODE=1"
|
testdef += " +define+TV80_INSTRUCTION_DECODE=1"
|
elif option[0] == "-d":
|
elif option[0] == "-d":
|
testdef += " +define+DUMP_START=%s" % option[1]
|
testdef += " +define+DUMP_START=%s" % option[1]
|
|
elif option[0] == "-c":
|
|
# enable VCS code coverage
|
|
testdef += " -cm line+branch -cm_dir cov/"+testname+" -cm_hier env/cov.vf"
|
elif option[0] == "-h":
|
elif option[0] == "-h":
|
print_help()
|
print_help()
|
else:
|
else:
|
print_help()
|
print_help()
|
|
|