Added option to output the datasheet.info file.

This commit is contained in:
Hunter Nichols 2021-01-06 12:45:34 -08:00
parent cd84cf1973
commit bb841fc84d
4 changed files with 20 additions and 8 deletions

View File

@ -645,8 +645,11 @@ class lib:
if len(git_id) != 40:
debug.warning("Failed to retrieve git id")
git_id = 'Failed to retruieve'
datasheet = open(OPTS.openram_temp +'/datasheet.info', 'a+')
if OPTS.output_datasheet_info:
datasheet_path = OPTS.output_path
else:
datasheet_path = OPTS.openram_temp
datasheet = open(datasheet_path +'/datasheet.info', 'a+')
current_time = datetime.date.today()
# write static information to be parser later

View File

@ -28,7 +28,11 @@ class datasheet():
# css styling is kept in a seperate file
self.html += datasheet_css.read()
with open(OPTS.openram_temp + "/datasheet.info") as info:
if OPTS.output_datasheet_info:
datasheet_path = OPTS.output_path
else:
datasheet_path = OPTS.openram_temp
with open(datasheet_path + "/datasheet.info") as info:
self.html += '<!--'
for row in info:
self.html += row

View File

@ -633,13 +633,16 @@ def parse_characterizer_csv(f, pages):
class datasheet_gen():
def datasheet_write(name):
"""writes the datasheet to a file"""
in_dir = OPTS.openram_temp
if OPTS.output_datasheet_info:
datasheet_path = OPTS.output_path
else:
datasheet_path = OPTS.openram_temp
if not (os.path.isdir(in_dir)):
os.mkdir(in_dir)
if not (os.path.isdir(datasheet_path)):
os.mkdir(datasheet_path)
datasheets = []
parse_characterizer_csv(in_dir + "/datasheet.info", datasheets)
parse_characterizer_csv(datasheet_path + "/datasheet.info", datasheets)
for sheets in datasheets:
with open(name, 'w+') as f:

View File

@ -104,7 +104,9 @@ class options(optparse.Values):
# Run with extracted parasitics
use_pex = False
# Output config with all options
output_extended_config = True
output_extended_config = False
# Output temporary file used to format HTML page
output_datasheet_info = True
# Determines which analytical model to use.
# Available Models: elmore, linear_regression
model_name = "elmore"