added DRC/LVS error count to datasheet

This commit is contained in:
Jesse Cirimelli-Low 2018-11-01 14:02:33 -07:00
parent ce5001e0af
commit 3fa1d5522e
2 changed files with 33 additions and 17 deletions

View File

@ -6,6 +6,8 @@ import debug
import os import os
from globals import OPTS from globals import OPTS
total_drc_errors = 0
total_lvs_errors = 0
class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout): class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
""" """
@ -14,7 +16,6 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
""" """
name_map = [] name_map = []
def __init__(self, name): def __init__(self, name):
try: try:
self.gds_file self.gds_file
@ -70,12 +71,18 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
# Unit tests will check themselves. # Unit tests will check themselves.
# Do not run if disabled in options. # Do not run if disabled in options.
if not OPTS.is_unit_test and OPTS.check_lvsdrc: if not OPTS.is_unit_test and OPTS.check_lvsdrc:
global total_drc_errors
global total_lvs_errors
tempspice = OPTS.openram_temp + "/temp.sp" tempspice = OPTS.openram_temp + "/temp.sp"
tempgds = OPTS.openram_temp + "/temp.gds" tempgds = OPTS.openram_temp + "/temp.gds"
self.sp_write(tempspice) self.sp_write(tempspice)
self.gds_write(tempgds) self.gds_write(tempgds)
debug.check(verify.run_drc(self.name, tempgds) == 0,"DRC failed for {0}".format(self.name)) num_drc_errors = verify.run_drc(self.name, tempgds)
debug.check(verify.run_lvs(self.name, tempgds, tempspice, final_verification) == 0,"LVS failed for {0}".format(self.name)) num_lvs_errors = verify.run_lvs(self.name, tempgds, tempspice, final_verification)
debug.check(num_drc_errors == 0,"DRC failed for {0} with {1} error(s)".format(self.name,num_drc_errors))
debug.check(num_lvs_errors == 0,"LVS failed for {0} with {1} errors(s)".format(self.name,num_lvs_errors))
total_drc_errors += num_drc_errors
total_lvs_errors += num_lvs_errors
os.remove(tempspice) os.remove(tempspice)
os.remove(tempgds) os.remove(tempgds)
@ -84,9 +91,12 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
# Unit tests will check themselves. # Unit tests will check themselves.
# Do not run if disabled in options. # Do not run if disabled in options.
if not OPTS.is_unit_test and OPTS.check_lvsdrc: if not OPTS.is_unit_test and OPTS.check_lvsdrc:
global total_drc_errors
tempgds = OPTS.openram_temp + "/temp.gds" tempgds = OPTS.openram_temp + "/temp.gds"
self.gds_write(tempgds) self.gds_write(tempgds)
debug.check(verify.run_drc(self.name, tempgds) == 0,"DRC failed for {0}".format(self.name)) num_errors = verify.run_drc(self.name, tempgds)
total_drc_errors += num_errors
debug.check(num_errors == 0,"DRC failed for {0} with {1} error(s)".format(self.name,num_error))
os.remove(tempgds) os.remove(tempgds)
def LVS(self, final_verification=False): def LVS(self, final_verification=False):
@ -94,11 +104,14 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
# Unit tests will check themselves. # Unit tests will check themselves.
# Do not run if disabled in options. # Do not run if disabled in options.
if not OPTS.is_unit_test and OPTS.check_lvsdrc: if not OPTS.is_unit_test and OPTS.check_lvsdrc:
global total_lvs_errors
tempspice = OPTS.openram_temp + "/temp.sp" tempspice = OPTS.openram_temp + "/temp.sp"
tempgds = OPTS.openram_temp + "/temp.gds" tempgds = OPTS.openram_temp + "/temp.gds"
self.sp_write(tempspice) self.sp_write(tempspice)
self.gds_write(tempgds) self.gds_write(tempgds)
debug.check(verify.run_lvs(self.name, tempgds, tempspice, final_verification) == 0,"LVS failed for {0}".format(self.name)) num_errors = verify.run_lvs(self.name, tempgds, tempspice, final_verification)
total_lvs_errors += num_errors
debug.check(num_errors == 0,"LVS failed for {0} with {1} error(s)".format(self.name,num_errors))
os.remove(tempspice) os.remove(tempspice)
os.remove(tempgds) os.remove(tempgds)

View File

@ -4,6 +4,8 @@ from characterization_corners import *
from deliverables import * from deliverables import *
from timing_and_current_data import * from timing_and_current_data import *
from in_out import * from in_out import *
from hierarchy_design import total_drc_errors
from hierarchy_design import total_lvs_errors
import os import os
from globals import OPTS from globals import OPTS
@ -29,19 +31,20 @@ class datasheet():
#css styling is kept in a seperate file #css styling is kept in a seperate file
self.html += datasheet_css.read() self.html += datasheet_css.read()
# if OPTS.check_lvsdrc: if OPTS.check_lvsdrc:
# DVS = 'checked'
# LVS = 'checked' DRC = total_drc_errors
# PEX = 'checked' LVS = total_lvs_errors
# else: PEX = 'n/a'
# DVS = 'skipped' else:
# LVS = 'skipped' DRC = 'skipped'
# PEX = 'skipped' LVS = 'skipped'
PEX = 'skipped'
self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ self.name + '.html' + '</p>' self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ self.name + '.html' + '</p>'
# self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ 'DVS: ' + DVS + '</p>' self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ 'DRC: ' + str(DRC) + ' errors'+'</p>'
# self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ 'LVS: ' + LVS + '</p>' self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>'+ 'LVS: ' + str(LVS) + ' errors'+'</p>'
self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>Ports and Configuration (DEBUG)</p>' self.html +='<p style=font-size: 20px;font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;>Ports and Configuration (DEBUG)</p>'
self.html += in_out(self.io,table_id='data').__html__().replace('&lt;','<').replace('&#34;','"').replace('&gt;',">") self.html += in_out(self.io,table_id='data').__html__().replace('&lt;','<').replace('&#34;','"').replace('&gt;',">")