From 85f44382807e70208f4dc6c6312e2fddf9786f45 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 5 Feb 2018 15:09:21 -0800 Subject: [PATCH] Exit with error if model files are not found. --- compiler/characterizer/stimuli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index e4d81d30..0c6fd7d8 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -272,7 +272,10 @@ def write_control(stim_file, end_time): def write_include(stim_file, models): """Writes include statements, inputs are lists of model files""" for item in list(models): - stim_file.write(".include \"{0}\"\n\n".format(item)) + 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)) def write_supply(stim_file):