moved flask_table warning from sram.py to datasheet_gen.py

This commit is contained in:
Jesse Cirimelli-Low 2018-10-18 09:58:19 -07:00
parent b9990609bf
commit 1b4383b945
3 changed files with 36 additions and 31 deletions

View File

@ -8,18 +8,24 @@ Locate all timing elements in .lib
Diagram generation
Improve css
"""
import os, math
import optparse
from flask_table import *
import csv
import debug
from globals import OPTS
from deliverables import *
from operating_conditions import *
from timing_and_current_data import *
from characterization_corners import *
from datasheet import *
from in_out import *
if OPTS.datasheet_gen:
import flask_table
import os, math
import optparse
import csv
from deliverables import *
from operating_conditions import *
from timing_and_current_data import *
from characterization_corners import *
from datasheet import *
from in_out import *
else:
debug.warning("Python library flask_table not found. Skipping html datasheet generation. This can be installed with pip install flask-table.")
def process_name(corner):
if corner == "TT":
@ -132,6 +138,7 @@ def parse_file(f,pages):
class datasheet_gen():
def datasheet_write(name):
if OPTS.datasheet_gen:
in_dir = OPTS.openram_temp
if not (os.path.isdir(in_dir)):

View File

@ -109,7 +109,6 @@ def check_versions():
import flask_table
OPTS.datasheet_gen = 1
except:
debug.warning("flask_table is not installed. HTML datasheet will not be generated")
OPTS.datasheet_gen = 0

View File

@ -109,7 +109,6 @@ class sram():
print_time("LEF", datetime.datetime.now(), start_time)
# Write the datasheet
if OPTS.datasheet_gen:
start_time = datetime.datetime.now()
from datasheet_gen import datasheet_gen
dname = OPTS.output_path + self.s.name + ".html"