From 4505c0f74e7e3c338ac1bd4c68a6fef33a3323f0 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 5 Feb 2018 15:12:12 -0800 Subject: [PATCH] Improve error to setup model dir path. Use it to override FreePDK45 too. --- compiler/characterizer/stimuli.py | 2 +- technology/setup_scripts/setup_openram_freepdk45.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index 0c6fd7d8..7986f11e 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -275,7 +275,7 @@ def write_include(stim_file, models): if os.path.isfile(item): stim_file.write(".include \"{0}\"\n\n".format(item)) else: - debug.error("Could not find spice model: {0}".format(item)) + debug.error("Could not find spice model: {0}\nSet SPICE_MODEL_DIR to over-ride path.\n".format(item)) def write_supply(stim_file): diff --git a/technology/setup_scripts/setup_openram_freepdk45.py b/technology/setup_scripts/setup_openram_freepdk45.py index 7b40357e..93631a92 100644 --- a/technology/setup_scripts/setup_openram_freepdk45.py +++ b/technology/setup_scripts/setup_openram_freepdk45.py @@ -28,10 +28,10 @@ except: DRCLVS_HOME= PDK_DIR+"/ncsu_basekit/techfile/calibre" os.environ["DRCLVS_HOME"] = DRCLVS_HOME -# try: -# SPICE_MODEL_DIR = os.path.abspath(os.environ.get("SPICE_MODEL_DIR")) -# except: -os.environ["SPICE_MODEL_DIR"] = PDK_DIR+"/ncsu_basekit/models/hspice/tran_models/models_nom" +try: + SPICE_MODEL_DIR = os.path.abspath(os.environ.get("SPICE_MODEL_DIR")) +except: + os.environ["SPICE_MODEL_DIR"] = PDK_DIR+"/ncsu_basekit/models/hspice/tran_models/models_nom" ########################## #Paths required for OPENRAM to function