mirror of https://github.com/VLSIDA/OpenRAM.git
my change
This commit is contained in:
parent
a34a9ecb47
commit
054e4d3c28
|
|
@ -12,13 +12,19 @@ def relative_compare(value1,value2,error_tolerance=0.001):
|
||||||
|
|
||||||
def parse_output(filename, key):
|
def parse_output(filename, key):
|
||||||
"""Parses a hspice output.lis file for a key value"""
|
"""Parses a hspice output.lis file for a key value"""
|
||||||
full_filename="{0}{1}.lis".format(OPTS.openram_temp, filename)
|
if OPTS.spice_version == "xa" :
|
||||||
|
full_filename="{0}xa.meas".format(OPTS.openram_temp)
|
||||||
|
else :
|
||||||
|
full_filename="{0}{1}.lis".format(OPTS.openram_temp, filename)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open(full_filename, "r")
|
f = open(full_filename, "r")
|
||||||
except IOError:
|
except IOError:
|
||||||
debug.error("Unable to open spice output file: {0}".format(full_filename),1)
|
debug.error("Unable to open spice output file: {0}".format(full_filename),1)
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
val = re.search(r"{0}\s*=\s*(-?\d+.?\d*\S*)\s+.*".format(key), contents)
|
# val = re.search(r"{0}\s*=\s*(-?\d+.?\d*\S*)\s+.*".format(key), contents)
|
||||||
|
val = re.search(r"{0}\s*=\s*(-?\d+.?\d*[e]?[-+]?[0-9]*\S*)\s+.*".format(key), contents)
|
||||||
|
|
||||||
if val != None:
|
if val != None:
|
||||||
debug.info(3, "Key = " + key + " Val = " + val.group(1))
|
debug.info(3, "Key = " + key + " Val = " + val.group(1))
|
||||||
return val.group(1)
|
return val.group(1)
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,11 @@ def run_sim():
|
||||||
"""Run hspice in batch mode and output rawfile to parse."""
|
"""Run hspice in batch mode and output rawfile to parse."""
|
||||||
temp_stim = "{0}stim.sp".format(OPTS.openram_temp)
|
temp_stim = "{0}stim.sp".format(OPTS.openram_temp)
|
||||||
|
|
||||||
if OPTS.spice_version == "hspice":
|
|
||||||
|
if OPTS.spice_version == "xa":
|
||||||
|
cmd = "{0} {1} -o {2}xa -mt 20".format(OPTS.spice_exe,temp_stim,OPTS.openram_temp)
|
||||||
|
valid_retcode=0
|
||||||
|
elif OPTS.spice_version == "hspice":
|
||||||
# TODO: Should make multithreading parameter a configuration option
|
# TODO: Should make multithreading parameter a configuration option
|
||||||
cmd = "{0} -mt 2 -i {1} -o {2}timing".format(OPTS.spice_exe,
|
cmd = "{0} -mt 2 -i {1} -o {2}timing".format(OPTS.spice_exe,
|
||||||
temp_stim,
|
temp_stim,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue