From add0e3ad68d7d64c9e9135d800278dca60cf8b08 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Tue, 11 Sep 2018 10:17:24 -0700 Subject: [PATCH] Add none option for verify wrapper with warning messages. --- compiler/verify/__init__.py | 6 +++--- compiler/verify/none.py | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 compiler/verify/none.py diff --git a/compiler/verify/__init__.py b/compiler/verify/__init__.py index 91c52a90..1f0ffaab 100644 --- a/compiler/verify/__init__.py +++ b/compiler/verify/__init__.py @@ -30,7 +30,7 @@ if OPTS.check_lvsdrc and OPTS.tech_name == "freepdk45": debug.check(OPTS.drc_exe[0]!="magic","Magic does not support FreePDK45 for DRC.") if OPTS.drc_exe == None: - pass + from .none import run_drc,print_drc_stats elif "calibre"==OPTS.drc_exe[0]: from .calibre import run_drc,print_drc_stats elif "assura"==OPTS.drc_exe[0]: @@ -41,7 +41,7 @@ else: debug.warning("Did not find a supported DRC tool.") if OPTS.lvs_exe == None: - pass + from .none import run_lvs,print_lvs_stats elif "calibre"==OPTS.lvs_exe[0]: from .calibre import run_lvs,print_lvs_stats elif "assura"==OPTS.lvs_exe[0]: @@ -53,7 +53,7 @@ else: if OPTS.pex_exe == None: - pass + from .none import run_pex,print_pex_stats elif "calibre"==OPTS.pex_exe[0]: from .calibre import run_pex,print_pex_stats elif "magic"==OPTS.pex_exe[0]: diff --git a/compiler/verify/none.py b/compiler/verify/none.py new file mode 100644 index 00000000..531a394d --- /dev/null +++ b/compiler/verify/none.py @@ -0,0 +1,41 @@ +""" +This is a DRC/LVS/PEX interface file the case with no DRC/LVS tools. + +""" +import debug + +# Only print the warning once. +drc_warned = False +lvs_warned = False +pex_warned = False + +def run_drc(cell_name, gds_name, extract=False): + global drc_warned + if not drc_warned: + debug.warning("DRC unable to run.") + drc_warned=True + # Since we warned, return a failing test. + return 1 + +def run_lvs(cell_name, gds_name, sp_name, final_verification=False): + global lvs_warned + if not lvs_warned: + debug.warning("LVS unable to run.") + lvs_warned=True + # Since we warned, return a failing test. + return 1 + +def run_pex(name, gds_name, sp_name, output=None): + global pex_warned + if not pex_warned: + debug.warning("PEX unable to run.") + pex_warned=True + # Since we warned, return a failing test. + return 1 + +def print_drc_stats(): + pass +def print_lvs_stats(): + pass +def print_pex_stats(): + pass