from flask_table import * from operating_conditions import * from characterization_corners import * from deliverables import * from timing_and_current_data import * from in_out import * from hierarchy_design import total_drc_errors from hierarchy_design import total_lvs_errors import os from globals import OPTS class datasheet(): """ Defines the layout,but not the data, of the html datasheet """ def __init__(self,identifier): self.io = [] self.corners = [] self.timing = [] self.operating = [] self.dlv = [] self.name = identifier self.html = "" def generate_html(self): """ Generates html tables using flask-table """ with open(os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/datasheet/assets/datasheet.css', 'r') as datasheet_css: #css styling is kept in a seperate file self.html += datasheet_css.read() if OPTS.check_lvsdrc: DRC = total_drc_errors LVS = total_lvs_errors PEX = 'n/a' else: DRC = 'skipped' LVS = 'skipped' PEX = 'skipped' self.html +='
'+ self.name + '.html' + '
' self.html +=''+ 'DRC: ' + str(DRC) + ' errors'+'
' self.html +=''+ 'LVS: ' + str(LVS) + ' errors'+'
' self.html +='Ports and Configuration (DEBUG)
' self.html += in_out(self.io,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">") self.html +='Operating Conditions
' self.html += operating_conditions(self.operating,table_id='data').__html__() self.html += 'Timing and Current Data
' self.html += timing_and_current_data(self.timing,table_id='data').__html__() self.html += 'Characterization Corners
' self.html += characterization_corners(self.corners,table_id='data').__html__() self.html +='Deliverables
' self.html += deliverables(self.dlv,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">") self.html +='*Feature only supported with characterizer
' self.html +='