diff --git a/compiler/characterizer/__init__.py b/compiler/characterizer/__init__.py index a092ac1e..1b6ef642 100644 --- a/compiler/characterizer/__init__.py +++ b/compiler/characterizer/__init__.py @@ -24,7 +24,7 @@ debug.info(1, "Initializing characterizer...") OPTS.spice_exe = "" if not OPTS.analytical_delay: - if OPTS.spice_name != "": + if OPTS.spice_name: # Capitalize Xyce if OPTS.spice_name == "xyce": OPTS.spice_name = "Xyce" @@ -45,7 +45,7 @@ if not OPTS.analytical_delay: if OPTS.spice_name == "ngspice": os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp) - if OPTS.spice_exe == "": + if not OPTS.spice_exe: debug.error("No recognizable spice version found. Unable to perform characterization.", 1) else: debug.info(1, "Finding spice simulator: {} ({})".format(OPTS.spice_name, OPTS.spice_exe)) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index f5b5967f..80ddf4fc 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -276,8 +276,8 @@ class stimuli(): self.sf.write(".OPTIONS MEASURE MEASFAIL=1\n") self.sf.write(".OPTIONS LINSOL type=klu\n") self.sf.write(".TRAN {0}p {1}n\n".format(timestep, end_time)) - else: - debug.error("Unkown spice simulator {}".format(OPTS.spice_name)) + elif OPTS.spice_name: + debug.error("Unkown spice simulator {}".format(OPTS.spice_name), -1) # create plots for all signals if not OPTS.use_pex: # Don't save all for extracted simulations diff --git a/compiler/options.py b/compiler/options.py index 65620c8c..87a30531 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -120,13 +120,13 @@ class options(optparse.Values): # Tool options ################### # Variable to select the variant of spice - spice_name = "" + spice_name = None # The spice executable being used which is derived from the user PATH. - spice_exe = "" + spice_exe = None # Variable to select the variant of drc, lvs, pex - drc_name = "" - lvs_name = "" - pex_name = "" + drc_name = None + lvs_name = None + pex_name = None # The DRC/LVS/PEX executable being used # which is derived from the user PATH. drc_exe = None