2018-10-12 01:03:05 +02:00
|
|
|
from flask_table import *
|
|
|
|
|
from operating_conditions import *
|
|
|
|
|
from characterization_corners import *
|
|
|
|
|
from deliverables import *
|
|
|
|
|
from timing_and_current_data import *
|
2018-10-18 04:27:09 +02:00
|
|
|
from in_out import *
|
2018-11-01 22:02:33 +01:00
|
|
|
from hierarchy_design import total_drc_errors
|
|
|
|
|
from hierarchy_design import total_lvs_errors
|
2018-10-18 04:27:09 +02:00
|
|
|
import os
|
2018-11-14 02:29:43 +01:00
|
|
|
import csv
|
2018-10-18 04:27:09 +02:00
|
|
|
from globals import OPTS
|
2018-10-12 01:03:05 +02:00
|
|
|
|
|
|
|
|
class datasheet():
|
2018-10-31 05:37:30 +01:00
|
|
|
"""
|
|
|
|
|
Defines the layout,but not the data, of the html datasheet
|
|
|
|
|
"""
|
2018-10-12 01:03:05 +02:00
|
|
|
def __init__(self,identifier):
|
2018-10-18 04:27:09 +02:00
|
|
|
self.io = []
|
2018-10-12 01:03:05 +02:00
|
|
|
self.corners = []
|
|
|
|
|
self.timing = []
|
|
|
|
|
self.operating = []
|
|
|
|
|
self.dlv = []
|
|
|
|
|
self.name = identifier
|
|
|
|
|
self.html = ""
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-10-12 01:03:05 +02:00
|
|
|
|
|
|
|
|
def generate_html(self):
|
2018-10-31 05:37:30 +01:00
|
|
|
"""
|
|
|
|
|
Generates html tables using flask-table
|
|
|
|
|
"""
|
2018-10-20 23:13:18 +02:00
|
|
|
with open(os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/datasheet/assets/datasheet.css', 'r') as datasheet_css:
|
2018-10-31 05:37:30 +01:00
|
|
|
#css styling is kept in a seperate file
|
2018-10-20 23:13:18 +02:00
|
|
|
self.html += datasheet_css.read()
|
2018-10-31 20:29:13 +01:00
|
|
|
|
2018-11-01 22:02:33 +01:00
|
|
|
if OPTS.check_lvsdrc:
|
|
|
|
|
|
2018-11-11 15:05:14 +01:00
|
|
|
DRC = str(total_drc_errors) + ' errors'
|
|
|
|
|
LVS = str(total_lvs_errors) + ' errors'
|
2018-11-01 22:02:33 +01:00
|
|
|
PEX = 'n/a'
|
|
|
|
|
else:
|
|
|
|
|
DRC = 'skipped'
|
|
|
|
|
LVS = 'skipped'
|
|
|
|
|
PEX = 'skipped'
|
2018-11-14 02:29:43 +01:00
|
|
|
|
|
|
|
|
with open(OPTS.openram_temp + "/datasheet.info") as info:
|
|
|
|
|
self.html += '<!--'
|
|
|
|
|
for row in info:
|
|
|
|
|
self.html += row
|
|
|
|
|
self.html +='-->'
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-11-20 20:50:55 +01:00
|
|
|
self.html += '<a href="https://vlsida.soe.ucsc.edu/"><img src=' + os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/datasheet/assets/vlsi_logo.png alt="VLSIDA"></a><a href="https://vlsida.github.io/OpenRAM"><img src=' + os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/datasheet/assets/openram_logo_placeholder.png alt="OpenRAM"></a>'
|
2018-11-11 18:27:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.html +='<p style="font-size: 18px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">'+ self.name + '.html' + '</p>'
|
|
|
|
|
self.html +='<p style="font-size: 18px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">'+ 'DRC: ' + str(DRC) + '</p>'
|
|
|
|
|
self.html +='<p style="font-size: 18px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">'+ 'LVS: ' + str(LVS) + '</p>'
|
2018-12-03 19:53:50 +01:00
|
|
|
self.html += '<p style="font-size: 18px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">'+ 'Git commit id: ' + str(self.git_id) + '</p>'
|
2018-11-11 18:27:07 +01:00
|
|
|
|
|
|
|
|
self.html +='<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Ports and Configuration (DEBUG)</p>'
|
2018-10-18 04:27:09 +02:00
|
|
|
self.html += in_out(self.io,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">")
|
|
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
self.html +='<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Operating Conditions</p>'
|
2018-10-12 01:03:05 +02:00
|
|
|
self.html += operating_conditions(self.operating,table_id='data').__html__()
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
self.html += '<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Timing and Current Data</p>'
|
2018-10-12 01:03:05 +02:00
|
|
|
self.html += timing_and_current_data(self.timing,table_id='data').__html__()
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
self.html += '<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Characterization Corners</p>'
|
2018-10-12 01:03:05 +02:00
|
|
|
self.html += characterization_corners(self.corners,table_id='data').__html__()
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
self.html +='<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Deliverables</p>'
|
2018-10-12 01:03:05 +02:00
|
|
|
self.html += deliverables(self.dlv,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">")
|
|
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
self.html +='<p style="font-size: 18px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">*Feature only supported with characterizer</p>'
|
2018-10-18 04:27:09 +02:00
|
|
|
|
2018-11-11 18:27:07 +01:00
|
|
|
|