From d1701b8a2a53827824d3dc4fcc91ae8b92e9a5d4 Mon Sep 17 00:00:00 2001 From: Michael Timothy Grimes Date: Fri, 12 Oct 2018 06:29:59 -0700 Subject: [PATCH] Removing extra functional test and changing name to a more general form. Spice exe can just be selected from the command line with -s. --- compiler/tests/22_ngspice_psram_func_test.py | 64 ------------------- compiler/tests/22_ngspice_sram_func_test.py | 56 ---------------- ...ram_func_test.py => 22_psram_func_test.py} | 4 +- ...sram_func_test.py => 22_sram_func_test.py} | 4 +- 4 files changed, 4 insertions(+), 124 deletions(-) delete mode 100644 compiler/tests/22_ngspice_psram_func_test.py delete mode 100644 compiler/tests/22_ngspice_sram_func_test.py rename compiler/tests/{22_hspice_psram_func_test.py => 22_psram_func_test.py} (96%) rename compiler/tests/{22_hspice_sram_func_test.py => 22_sram_func_test.py} (95%) diff --git a/compiler/tests/22_ngspice_psram_func_test.py b/compiler/tests/22_ngspice_psram_func_test.py deleted file mode 100644 index 612bfbcf..00000000 --- a/compiler/tests/22_ngspice_psram_func_test.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python3 -""" -Run a regression test on various srams -""" - -import unittest -from testutils import header,openram_test -import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) -import globals -from globals import OPTS -import debug - -#@unittest.skip("SKIPPING 22_psram_func_test") -class psram_func_test(openram_test): - - def runTest(self): - globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - OPTS.spice_name="ngspice" - OPTS.analytical_delay = False - OPTS.netlist_only = True - OPTS.bitcell = "pbitcell" - OPTS.replica_bitcell="replica_pbitcell" - - # This is a hack to reload the characterizer __init__ with the spice version - from importlib import reload - import characterizer - reload(characterizer) - from characterizer import functional - if not OPTS.spice_exe: - debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) - - from sram import sram - from sram_config import sram_config - c = sram_config(word_size=4, - num_words=32, - num_banks=1) - c.words_per_row=2 - - OPTS.num_rw_ports = 1 - OPTS.num_w_ports = 1 - OPTS.num_r_ports = 1 - - debug.info(1, "Functional test for 1bit, 16word SRAM, with 1 bank. Multiport with {}RW {}W {}R.".format(OPTS.num_rw_ports, OPTS.num_w_ports, OPTS.num_r_ports)) - s = sram(c, name="sram1") - - tempspice = OPTS.openram_temp + "temp.sp" - s.sp_write(tempspice) - - corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0]) - f = functional(s.s, tempspice, corner) - f.num_cycles = 5 - (fail,error) = f.run() - - self.assertTrue(fail,error) - - globals.end_openram() - -# instantiate a copdsay of the class to actually run the test -if __name__ == "__main__": - (OPTS, args) = globals.parse_args() - del sys.argv[1:] - header(__file__, OPTS.tech_name) - unittest.main() diff --git a/compiler/tests/22_ngspice_sram_func_test.py b/compiler/tests/22_ngspice_sram_func_test.py deleted file mode 100644 index 895729e2..00000000 --- a/compiler/tests/22_ngspice_sram_func_test.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -""" -Run a regression test on various srams -""" - -import unittest -from testutils import header,openram_test -import sys,os -sys.path.append(os.path.join(sys.path[0],"..")) -import globals -from globals import OPTS -import debug - -#@unittest.skip("SKIPPING 22_sram_func_test") -class sram_func_test(openram_test): - - def runTest(self): - globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - OPTS.spice_name="ngspice" - OPTS.analytical_delay = False - - # This is a hack to reload the characterizer __init__ with the spice version - from importlib import reload - import characterizer - reload(characterizer) - from characterizer import functional - if not OPTS.spice_exe: - debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) - - from sram import sram - from sram_config import sram_config - c = sram_config(word_size=4, - num_words=32, - num_banks=1) - c.words_per_row=2 - debug.info(1, "Functional test for 1bit, 16word SRAM, with 1 bank") - s = sram(c, name="sram1") - - tempspice = OPTS.openram_temp + "temp.sp" - s.sp_write(tempspice) - - corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0]) - f = functional(s.s, tempspice, corner) - f.num_cycles = 10 - (fail, error) = f.run() - - self.assertTrue(fail,error) - - globals.end_openram() - -# instantiate a copdsay of the class to actually run the test -if __name__ == "__main__": - (OPTS, args) = globals.parse_args() - del sys.argv[1:] - header(__file__, OPTS.tech_name) - unittest.main() diff --git a/compiler/tests/22_hspice_psram_func_test.py b/compiler/tests/22_psram_func_test.py similarity index 96% rename from compiler/tests/22_hspice_psram_func_test.py rename to compiler/tests/22_psram_func_test.py index 0d2f775f..e56c3a58 100644 --- a/compiler/tests/22_hspice_psram_func_test.py +++ b/compiler/tests/22_psram_func_test.py @@ -16,7 +16,7 @@ class psram_func_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - OPTS.spice_name="hspice" + #OPTS.spice_name="hspice" OPTS.analytical_delay = False OPTS.netlist_only = True OPTS.bitcell = "pbitcell" @@ -33,7 +33,7 @@ class psram_func_test(openram_test): from sram import sram from sram_config import sram_config c = sram_config(word_size=4, - num_words=32, + num_words=64, num_banks=1) c.words_per_row=2 diff --git a/compiler/tests/22_hspice_sram_func_test.py b/compiler/tests/22_sram_func_test.py similarity index 95% rename from compiler/tests/22_hspice_sram_func_test.py rename to compiler/tests/22_sram_func_test.py index b8b0969e..a2f3787e 100644 --- a/compiler/tests/22_hspice_sram_func_test.py +++ b/compiler/tests/22_sram_func_test.py @@ -16,7 +16,7 @@ class sram_func_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - OPTS.spice_name="hspice" + #OPTS.spice_name="hspice" OPTS.analytical_delay = False # This is a hack to reload the characterizer __init__ with the spice version @@ -30,7 +30,7 @@ class sram_func_test(openram_test): from sram import sram from sram_config import sram_config c = sram_config(word_size=4, - num_words=32, + num_words=64, num_banks=1) c.words_per_row=2 debug.info(1, "Functional test for 1bit, 16word SRAM, with 1 bank")