mirror of https://github.com/VLSIDA/OpenRAM.git
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:
parent
372a8a728e
commit
9b939c9a1a
|
|
@ -7,7 +7,6 @@
|
||||||
#
|
#
|
||||||
import hierarchy_layout
|
import hierarchy_layout
|
||||||
import hierarchy_spice
|
import hierarchy_spice
|
||||||
import verify
|
|
||||||
import debug
|
import debug
|
||||||
import os
|
import os
|
||||||
from globals import OPTS
|
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):
|
def DRC_LVS(self, final_verification=False, force_check=False):
|
||||||
"""Checks both DRC and LVS for a module"""
|
"""Checks both DRC and LVS for a module"""
|
||||||
|
import verify
|
||||||
|
|
||||||
# No layout to check
|
# No layout to check
|
||||||
if OPTS.netlist_only:
|
if OPTS.netlist_only:
|
||||||
|
|
@ -94,6 +94,8 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
||||||
|
|
||||||
def DRC(self, final_verification=False):
|
def DRC(self, final_verification=False):
|
||||||
"""Checks DRC for a module"""
|
"""Checks DRC for a module"""
|
||||||
|
import verify
|
||||||
|
|
||||||
# Unit tests will check themselves.
|
# Unit tests will check themselves.
|
||||||
# Do not run if disabled in options.
|
# 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):
|
def LVS(self, final_verification=False):
|
||||||
"""Checks LVS for a module"""
|
"""Checks LVS for a module"""
|
||||||
|
import verify
|
||||||
|
|
||||||
# Unit tests will check themselves.
|
# Unit tests will check themselves.
|
||||||
# Do not run if disabled in options.
|
# Do not run if disabled in options.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -657,8 +657,12 @@ class lib:
|
||||||
))
|
))
|
||||||
|
|
||||||
# information of checks
|
# information of checks
|
||||||
(drc_errors, lvs_errors) = self.sram.DRC_LVS(final_verification=True)
|
# run it only the first time
|
||||||
datasheet.write("{0},{1},".format(drc_errors, lvs_errors))
|
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
|
# write area
|
||||||
datasheet.write(str(self.sram.width * self.sram.height) + ',')
|
datasheet.write(str(self.sram.width * self.sram.height) + ',')
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ def error(str, return_value=0):
|
||||||
log("ERROR: file {0}: line {1}: {2}\n".format(
|
log("ERROR: file {0}: line {1}: {2}\n".format(
|
||||||
os.path.basename(filename), line_number, str))
|
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
|
import pdb
|
||||||
pdb.set_trace()
|
pdb.set_trace()
|
||||||
assert return_value == 0
|
assert return_value == 0
|
||||||
|
|
|
||||||
|
|
@ -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])
|
errors = int(re.split(r'\W+', results[2])[5])
|
||||||
|
|
||||||
# always display this summary
|
# always display this summary
|
||||||
if errors > 0:
|
result_str = "{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
|
||||||
debug.error("{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
|
|
||||||
geometries,
|
geometries,
|
||||||
rulechecks,
|
rulechecks,
|
||||||
errors))
|
errors)
|
||||||
|
if errors > 0:
|
||||||
|
debug.warning(result_str)
|
||||||
else:
|
else:
|
||||||
debug.info(1, "{0}\tGeometries: {1}\tChecks: {2}\tErrors: {3}".format(cell_name,
|
debug.info(1, result_str)
|
||||||
geometries,
|
|
||||||
rulechecks,
|
|
||||||
errors))
|
|
||||||
return errors
|
return errors
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -307,16 +305,15 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
|
||||||
out_errors = len(stdouterrors)
|
out_errors = len(stdouterrors)
|
||||||
total_errors = summary_errors + out_errors + ext_errors
|
total_errors = summary_errors + out_errors + ext_errors
|
||||||
|
|
||||||
if total_errors > 0:
|
# always display this summary
|
||||||
debug.error("{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
|
result_str = "{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
|
||||||
summary_errors,
|
summary_errors,
|
||||||
out_errors,
|
out_errors,
|
||||||
ext_errors))
|
ext_errors)
|
||||||
|
if total_errors > 0:
|
||||||
|
debug.warning(result_str)
|
||||||
else:
|
else:
|
||||||
debug.info(1, "{0}\tSummary: {1}\tOutput: {2}\tExtraction: {3}".format(cell_name,
|
debug.info(1, result_str)
|
||||||
summary_errors,
|
|
||||||
out_errors,
|
|
||||||
ext_errors))
|
|
||||||
|
|
||||||
return total_errors
|
return total_errors
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -200,13 +200,14 @@ def run_drc(cell_name, gds_name, extract=True, final_verification=False):
|
||||||
|
|
||||||
|
|
||||||
# always display this summary
|
# always display this summary
|
||||||
|
result_str = "DRC Errors {0}\t{1}".format(cell_name, errors)
|
||||||
if errors > 0:
|
if errors > 0:
|
||||||
for line in results:
|
for line in results:
|
||||||
if "error tiles" in line:
|
if "error tiles" in line:
|
||||||
debug.info(1,line.rstrip("\n"))
|
debug.info(1,line.rstrip("\n"))
|
||||||
debug.error("DRC Errors {0}\t{1}".format(cell_name, errors))
|
debug.warning(result_str)
|
||||||
else:
|
else:
|
||||||
debug.info(1, "DRC Errors {0}\t{1}".format(cell_name, errors))
|
debug.info(1, result_str)
|
||||||
|
|
||||||
return errors
|
return errors
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue