From bb841fc84db5269c369410424138d4227ee30d84 Mon Sep 17 00:00:00 2001 From: Hunter Nichols Date: Wed, 6 Jan 2021 12:45:34 -0800 Subject: [PATCH] Added option to output the datasheet.info file. --- compiler/characterizer/lib.py | 7 +++++-- compiler/datasheet/datasheet.py | 6 +++++- compiler/datasheet/datasheet_gen.py | 11 +++++++---- compiler/options.py | 4 +++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/compiler/characterizer/lib.py b/compiler/characterizer/lib.py index 8e16abbb..6f1ec3ba 100644 --- a/compiler/characterizer/lib.py +++ b/compiler/characterizer/lib.py @@ -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 diff --git a/compiler/datasheet/datasheet.py b/compiler/datasheet/datasheet.py index 35091d36..845f542f 100644 --- a/compiler/datasheet/datasheet.py +++ b/compiler/datasheet/datasheet.py @@ -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 += '