From 6cde6beafa86f53ee64df4568679bb46f5d4924e Mon Sep 17 00:00:00 2001
From: Jesse Cirimelli-Low
' + \ 'Git commit id: ' + str(self.git_id) + '
' - + # print port table self.html += 'Ports and Configuration
' -# self.html += in_out(self.io,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">") self.html += self.io_table.to_html() - + + # print operating condidition information self.html += 'Operating Conditions
' -# self.html += operating_conditions(self.operating,table_id='data').__html__() self.html += self.operating_table.to_html() + # check if analytical model is being used self.html += 'Timing Data
' model = '' if self.ANALYTICAL_MODEL: model = "analytical model: results may not be percise" else: model = "spice characterizer" + # display timing data self.html += 'Using '+model+'
' -# self.html += timing_and_current_data(self.timing,table_id='data').__html__() self.html += self.timing_table.to_html() - + # display power data self.html += 'Power Data
' self.html += self.power_table.to_html() - + # display corner information self.html += 'Characterization Corners
' -# self.html += characterization_corners(self.corners,table_id='data').__html__() self.html += self.corners_table.to_html() - + # display deliverables table self.html += 'Deliverables
' -# self.html += deliverables(self.dlv,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">") self.html += self.dlv_table.to_html() diff --git a/compiler/datasheet/datasheet_gen.py b/compiler/datasheet/datasheet_gen.py index 51c636c8..44db3f9b 100644 --- a/compiler/datasheet/datasheet_gen.py +++ b/compiler/datasheet/datasheet_gen.py @@ -4,7 +4,6 @@ This is a script to load data from the characterization and layout processes int a web friendly html datasheet. """ # TODO: -# include power # Diagram generation # Improve css @@ -152,7 +151,7 @@ def parse_characterizer_csv(f, pages): 1000/float(MIN_PERIOD))) except Exception: pass - + # check current .lib file produces the slowest timing results while(True): col_start = col if(row[col].startswith('DIN')): @@ -354,6 +353,8 @@ def parse_characterizer_csv(f, pages): for element in row[col_start: col - 1]: sheet.description.append(str(element)) break + + #check if new power is worse the previous while(True): col_start = col if row[col] == 'power': @@ -368,7 +369,7 @@ def parse_characterizer_csv(f, pages): col += 4 else: break - + # check if new leakge is worse the previous while(True): col_start = col if row[col] == 'leak': @@ -380,7 +381,7 @@ def parse_characterizer_csv(f, pages): else: break - + # add new corner information new_sheet.corners_table.add_row( [PROC, VOLT, TEMP, LIB_NAME.replace(OUT_DIR, '').replace(NAME, '')]) new_sheet.dlv_table.add_row( @@ -427,6 +428,7 @@ def parse_characterizer_csv(f, pages): new_sheet.timing_table = table_gen.table_gen("timing") new_sheet.timing_table.add_row( ['Parameter', 'Min', 'Max', 'Units']) + # parse initial timing information while(True): col_start = col if(row[col].startswith('DIN')): @@ -553,7 +555,7 @@ def parse_characterizer_csv(f, pages): for element in row[col_start:col-1]: sheet.description.append(str(element)) break - + # parse initial power and leakage information while(True): start = col if(row[col].startswith('power')): @@ -618,7 +620,7 @@ 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 not (os.path.isdir(in_dir)): diff --git a/compiler/datasheet/table_gen.py b/compiler/datasheet/table_gen.py index 18590739..8f94e896 100644 --- a/compiler/datasheet/table_gen.py +++ b/compiler/datasheet/table_gen.py @@ -1,24 +1,29 @@ class table_gen: - def __init__(self,name): + """small library of functions to generate the html tables""" + + def __init__(self, name): self.name = name self.rows = [] self.table_id = 'data' - def add_row(self,row): + def add_row(self, row): + """add a row to table_gen object""" self.rows.append(row) def gen_table_head(self): + """generate html table header""" html = '' html += '' html += '