DRC/LVS and errors fixes.

Only enact pdb if assert fails in debug.error.
Only run drc/lvs one time in parse_info by saving result.
Cleanup drc/lvs output.
This commit is contained in:
Matt Guthaus 2020-06-30 07:16:05 -07:00
parent 372a8a728e
commit 9b939c9a1a
5 changed files with 26 additions and 20 deletions

View File

@ -7,7 +7,6 @@
#
import hierarchy_layout
import hierarchy_spice
import verify
import debug
import os
from globals import OPTS
@ -55,6 +54,7 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
def DRC_LVS(self, final_verification=False, force_check=False):
"""Checks both DRC and LVS for a module"""
import verify
# No layout to check
if OPTS.netlist_only:
@ -94,6 +94,8 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
def DRC(self, final_verification=False):
"""Checks DRC for a module"""
import verify
# Unit tests will check themselves.
# Do not run if disabled in options.
@ -117,6 +119,8 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
def LVS(self, final_verification=False):
"""Checks LVS for a module"""
import verify
# Unit tests will check themselves.
# Do not run if disabled in options.

View File

@ -657,8 +657,12 @@ class lib:
))
# information of checks
(drc_errors, lvs_errors) = self.sram.DRC_LVS(final_verification=True)
datasheet.write("{0},{1},".format(drc_errors, lvs_errors))
# run it only the first time
try:
datasheet.write("{0},{1},".format(self.drc_errors, self.lvs_errors))
except AttributeError:
(self.drc_errors, self.lvs_errors) = self.sram.DRC_LVS(final_verification=True)
datasheet.write("{0},{1},".format(self.drc_errors, self.lvs_errors))
# write area
datasheet.write(str(self.sram.width * self.sram.height) + ',')

View File

@ -40,7 +40,7 @@ def error(str, return_value=0):
log("ERROR: file {0}: line {1}: {2}\n".format(
os.path.basename(filename), line_number, str))
if globals.OPTS.debug_level > 0:
if globals.OPTS.debug_level > 0 and return_value != 0:
import pdb
pdb.set_trace()
assert return_value == 0

View File

@ -219,16 +219,14 @@ def run_drc(cell_name, gds_name, extract=False, final_verification=False):
errors = int(re.split(r'\W+', results[2])[5])
# always display this summary
if errors > 0:
debug.error("{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
result_str = "{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
geometries,
rulechecks,
errors))
errors)
if errors > 0:
debug.warning(result_str)
else:
debug.info(1, "{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
geometries,
rulechecks,
errors))
debug.info(1, result_str)
return errors
@ -307,16 +305,15 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
out_errors = len(stdouterrors)
total_errors = summary_errors + out_errors + ext_errors
if total_errors > 0:
debug.error("{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
# always display this summary
result_str = "{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
summary_errors,
out_errors,
ext_errors))
ext_errors)
if total_errors > 0:
debug.warning(result_str)
else:
debug.info(1, "{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
summary_errors,
out_errors,
ext_errors))
debug.info(1, result_str)
return total_errors

View File

@ -200,13 +200,14 @@ def run_drc(cell_name, gds_name, extract=True, final_verification=False):
# always display this summary
result_str = "DRC Errors {0}\t{1}".format(cell_name, errors)
if errors > 0:
for line in results:
if "error tiles" in line:
debug.info(1,line.rstrip("\n"))
debug.error("DRC Errors {0}\t{1}".format(cell_name, errors))
debug.warning(result_str)
else:
debug.info(1, "DRC Errors {0}\t{1}".format(cell_name, errors))
debug.info(1, result_str)
return errors