From 3e2d4d631ddd55b8551abba4f169d29c421477d3 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 31 Jan 2018 16:21:43 -0800 Subject: [PATCH] Do not require hspice during tests. Check if a valid simulator is found, however. --- compiler/characterizer/stimuli.py | 1 + compiler/tests/22_sram_func_test.py | 5 +++++ compiler/tests/23_lib_sram_prune_test.py | 5 +++++ compiler/tests/23_lib_sram_test.py | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/compiler/characterizer/stimuli.py b/compiler/characterizer/stimuli.py index 69a0bb32..6cba2015 100644 --- a/compiler/characterizer/stimuli.py +++ b/compiler/characterizer/stimuli.py @@ -282,6 +282,7 @@ def run_sim(): temp_stim = "{0}stim.sp".format(OPTS.openram_temp) import datetime start_time = datetime.datetime.now() + debug.check(OPTS.spice_exe!="","No spice simulator has been found.") if OPTS.spice_name == "xa": # Output the xa configurations here. FIXME: Move this to write it once. diff --git a/compiler/tests/22_sram_func_test.py b/compiler/tests/22_sram_func_test.py index 4e42a775..ec6eabf2 100644 --- a/compiler/tests/22_sram_func_test.py +++ b/compiler/tests/22_sram_func_test.py @@ -16,10 +16,15 @@ class sram_func_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) OPTS.check_lvsdrc = False + OPTS.spice_name="" # Unset to use any simulator OPTS.analytical_delay = False + + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) from characterizer import delay + if not OPTS.spice_exe: + debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) import sram diff --git a/compiler/tests/23_lib_sram_prune_test.py b/compiler/tests/23_lib_sram_prune_test.py index 71b6bd38..9c9f6667 100644 --- a/compiler/tests/23_lib_sram_prune_test.py +++ b/compiler/tests/23_lib_sram_prune_test.py @@ -16,11 +16,16 @@ class lib_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) OPTS.check_lvsdrc = False + OPTS.spice_name="" # Unset to use any simulator OPTS.analytical_delay = False OPTS.trim_netlist = True + + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) from characterizer import lib + if not OPTS.spice_exe: + debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) import sram diff --git a/compiler/tests/23_lib_sram_test.py b/compiler/tests/23_lib_sram_test.py index 2c24bbc7..c1d2eb6a 100644 --- a/compiler/tests/23_lib_sram_test.py +++ b/compiler/tests/23_lib_sram_test.py @@ -16,11 +16,16 @@ class lib_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) OPTS.check_lvsdrc = False + OPTS.spice_name="" # Unset to use any simulator OPTS.analytical_delay = False OPTS.trim_netlist = False + + # This is a hack to reload the characterizer __init__ with the spice version import characterizer reload(characterizer) from characterizer import lib + if not OPTS.spice_exe: + debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) import sram