mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-30 09:58:33 +02:00
merging changes with pbitcell_array test
This commit is contained in:
@@ -13,7 +13,6 @@ class library_drc_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
|
||||
(gds_dir, gds_files) = setup_files()
|
||||
@@ -31,11 +30,12 @@ class library_drc_test(openram_test):
|
||||
self.assertEqual(drc_errors, 0)
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
def setup_files():
|
||||
gds_dir = OPTS.openram_tech + "/gds_lib"
|
||||
files = os.listdir(gds_dir)
|
||||
nametest = re.compile("\.gds$", re.IGNORECASE)
|
||||
gds_files = filter(nametest.search, files)
|
||||
gds_files = list(filter(nametest.search, files))
|
||||
return (gds_dir, gds_files)
|
||||
|
||||
|
||||
@@ -45,3 +45,4 @@ if __name__ == "__main__":
|
||||
del sys.argv[1:]
|
||||
header(__file__, OPTS.tech_name)
|
||||
unittest.main()
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class library_lvs_test(openram_test):
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
import verify
|
||||
|
||||
(gds_dir, sp_dir, allnames) = setup_files()
|
||||
lvs_errors = 0
|
||||
debug.info(1, "Performing LVS on: " + ", ".join(allnames))
|
||||
@@ -28,7 +29,7 @@ class library_lvs_test(openram_test):
|
||||
lvs_errors += 1
|
||||
debug.error("Missing SPICE file {}".format(gds_name))
|
||||
lvs_errors += verify.run_lvs(f, gds_name, sp_name)
|
||||
self.assertEqual(lvs_errors, 0)
|
||||
|
||||
# fail if the error count is not zero
|
||||
self.assertEqual(lvs_errors, 0)
|
||||
globals.end_openram()
|
||||
|
||||
@@ -15,7 +15,6 @@ class contact_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import contact
|
||||
|
||||
@@ -43,7 +42,6 @@ class contact_test(openram_test):
|
||||
c = contact.contact(layer_stack, (3, 3))
|
||||
self.local_drc_check(c)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ class path_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
|
||||
import path
|
||||
import tech
|
||||
import design
|
||||
@@ -84,8 +83,6 @@ class path_test(openram_test):
|
||||
path.path(w, layer_stack, position_list)
|
||||
self.local_drc_check(w)
|
||||
|
||||
# return it back to it's normal state
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class ptx_test(openram_test):
|
||||
tx_type="nmos")
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class ptx_test(openram_test):
|
||||
tx_type="pmos")
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class ptx_test(openram_test):
|
||||
connect_poly=True)
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class ptx_test(openram_test):
|
||||
connect_poly=True)
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class ptx_test(openram_test):
|
||||
connect_poly=True)
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ptx_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ptx
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class ptx_test(openram_test):
|
||||
connect_poly=True)
|
||||
self.local_drc_check(fet)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class wire_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import wire
|
||||
import tech
|
||||
@@ -122,8 +121,6 @@ class wire_test(openram_test):
|
||||
wire.wire(w, layer_stack, position_list)
|
||||
self.local_drc_check(w)
|
||||
|
||||
# return it back to it's normal state
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class pbitcell_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pbitcell
|
||||
import tech
|
||||
@@ -67,9 +66,8 @@ class pbitcell_test(openram_test):
|
||||
tx = pbitcell.pbitcell(num_readwrite=2,num_write=0,num_read=0)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
OPTS.bitcell = "bitcell"
|
||||
|
||||
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class pinv_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pinv
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class pinv_test(openram_test):
|
||||
tx = pinv.pinv(size=8)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ class pinv_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pinv
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class pinv_test(openram_test):
|
||||
tx = pinv.pinv(size=1, beta=3)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -16,7 +16,6 @@ class pinv_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
|
||||
import pinv
|
||||
@@ -26,7 +25,6 @@ class pinv_test(openram_test):
|
||||
tx = pinv.pinv(size=1)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class pinv_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pinv
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class pinv_test(openram_test):
|
||||
tx = pinv.pinv(size=2)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ class pinvbuf_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pinvbuf
|
||||
|
||||
@@ -25,7 +24,6 @@ class pinvbuf_test(openram_test):
|
||||
a = pinvbuf.pinvbuf(4,8)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -19,7 +19,6 @@ class pnand2_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pnand2
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class pnand2_test(openram_test):
|
||||
tx = pnand2.pnand2(size=1)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ class pnand3_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pnand3
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class pnand3_test(openram_test):
|
||||
tx = pnand3.pnand3(size=1)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ class pnor2_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import pnor2
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class pnor2_test(openram_test):
|
||||
tx = pnor2.pnor2(size=1)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class precharge_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import precharge
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class precharge_test(openram_test):
|
||||
tx = precharge.precharge(name="precharge_driver", size=1)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -19,7 +19,6 @@ class single_level_column_mux_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import single_level_column_mux
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class single_level_column_mux_test(openram_test):
|
||||
tx = single_level_column_mux.single_level_column_mux(tx_size=8)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -19,7 +19,6 @@ class array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import bitcell_array
|
||||
|
||||
@@ -27,7 +26,6 @@ class array_test(openram_test):
|
||||
a = bitcell_array.bitcell_array(name="bitcell_array", cols=4, rows=4)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -11,27 +11,26 @@ import globals
|
||||
from globals import OPTS
|
||||
import debug
|
||||
|
||||
#@unittest.skip("SKIPPING 05_array_multiport_test")
|
||||
|
||||
class array_multiport_test(openram_test):
|
||||
#@unittest.skip("SKIPPING 05_pbitcell_array_test")
|
||||
class pbitcell_array_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import bitcell_array
|
||||
|
||||
debug.info(2, "Testing 4x4 array for multiport bitcell, with read ports at the edge of the bit cell")
|
||||
OPTS.bitcell = "pbitcell"
|
||||
OPTS.rw_ports = 2
|
||||
OPTS.r_ports = 2
|
||||
OPTS.w_ports = 2
|
||||
|
||||
debug.info(2, "Testing 4x4 array for multiport bitcell, with read ports at the edge of the bit cell")
|
||||
a = bitcell_array.bitcell_array(name="pbitcell_array", cols=4, rows=4)
|
||||
self.local_check(a)
|
||||
|
||||
|
||||
debug.info(2, "Testing 4x4 array for multiport bitcell, with read/write ports at the edge of the bit cell")
|
||||
OPTS.bitcell = "pbitcell"
|
||||
OPTS.rw_ports = 2
|
||||
OPTS.r_ports = 0
|
||||
OPTS.w_ports = 2
|
||||
@@ -47,10 +46,12 @@ class array_multiport_test(openram_test):
|
||||
debug.info(2, "Testing 4x4 array for multiport bitcell, with read/write ports at the edge of the bit cell")
|
||||
a = bitcell_array.bitcell_array(name="pbitcell_array", cols=4, rows=4)
|
||||
self.local_check(a)
|
||||
a = bitcell_array.bitcell_array(name="pbitcell_array", cols=4, rows=4)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.bitcell = "bitcell"
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
OPTS.bitcell = "bitcell"
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -17,7 +17,6 @@ class hierarchical_decoder_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import hierarchical_decoder
|
||||
import tech
|
||||
@@ -48,7 +47,6 @@ class hierarchical_decoder_test(openram_test):
|
||||
a = hierarchical_decoder.hierarchical_decoder(rows=512)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class hierarchical_predecode2x4_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import hierarchical_predecode2x4 as pre
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class hierarchical_predecode2x4_test(openram_test):
|
||||
a = pre.hierarchical_predecode2x4()
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class hierarchical_predecode3x8_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import hierarchical_predecode3x8 as pre
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class hierarchical_predecode3x8_test(openram_test):
|
||||
a = pre.hierarchical_predecode3x8()
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -16,7 +16,6 @@ class single_level_column_mux_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import single_level_column_mux_array
|
||||
|
||||
@@ -32,7 +31,6 @@ class single_level_column_mux_test(openram_test):
|
||||
a = single_level_column_mux_array.single_level_column_mux_array(columns=32, word_size=4)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ class precharge_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import precharge_array
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class precharge_test(openram_test):
|
||||
pc = precharge_array.precharge_array(columns=3)
|
||||
self.local_check(pc)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ class wordline_driver_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import wordline_driver
|
||||
import tech
|
||||
@@ -28,7 +27,6 @@ class wordline_driver_test(openram_test):
|
||||
tx = wordline_driver.wordline_driver(rows=8)
|
||||
self.local_check(tx)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class sense_amp_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sense_amp_array
|
||||
|
||||
@@ -30,7 +29,6 @@ class sense_amp_test(openram_test):
|
||||
a = sense_amp_array.sense_amp_array(word_size=4, words_per_row=4)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class write_driver_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import write_driver_array
|
||||
|
||||
@@ -29,7 +28,6 @@ class write_driver_test(openram_test):
|
||||
a = write_driver_array.write_driver_array(columns=16, word_size=8)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import dff_array
|
||||
|
||||
@@ -33,7 +32,6 @@ class dff_array_test(openram_test):
|
||||
a = dff_array.dff_array(rows=3, columns=1)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_buf_array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import dff_buf_array
|
||||
|
||||
@@ -33,7 +32,6 @@ class dff_buf_array_test(openram_test):
|
||||
a = dff_buf_array.dff_buf_array(rows=3, columns=1)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_buf_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import dff_buf
|
||||
|
||||
@@ -25,7 +24,6 @@ class dff_buf_test(openram_test):
|
||||
a = dff_buf.dff_buf(4, 8)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_inv_array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import dff_inv_array
|
||||
|
||||
@@ -33,7 +32,6 @@ class dff_inv_array_test(openram_test):
|
||||
a = dff_inv_array.dff_inv_array(rows=3, columns=1)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_inv_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import dff_inv
|
||||
|
||||
@@ -25,7 +24,6 @@ class dff_inv_test(openram_test):
|
||||
a = dff_inv.dff_inv(4)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class dff_array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import ms_flop_array
|
||||
|
||||
@@ -29,7 +28,6 @@ class dff_array_test(openram_test):
|
||||
a = ms_flop_array.ms_flop_array(columns=16, word_size=8)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class tri_gate_array_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import tri_gate_array
|
||||
|
||||
@@ -29,7 +28,6 @@ class tri_gate_array_test(openram_test):
|
||||
a = tri_gate_array.tri_gate_array(columns=16, word_size=8)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class delay_chain_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import delay_chain
|
||||
|
||||
@@ -25,7 +24,6 @@ class delay_chain_test(openram_test):
|
||||
a = delay_chain.delay_chain(fanout_list=[4, 4, 4, 4])
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class replica_bitline_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import replica_bitline
|
||||
|
||||
@@ -34,7 +33,6 @@ class replica_bitline_test(openram_test):
|
||||
a = replica_bitline.replica_bitline(stages,fanout,rows)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class control_logic_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import control_logic
|
||||
import tech
|
||||
@@ -26,7 +25,6 @@ class control_logic_test(openram_test):
|
||||
a = control_logic.control_logic(num_rows=128)
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class bank_select_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import bank_select
|
||||
|
||||
@@ -25,7 +24,6 @@ class bank_select_test(openram_test):
|
||||
a = bank_select.bank_select()
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class multi_bank_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import bank
|
||||
|
||||
@@ -37,7 +36,6 @@ class multi_bank_test(openram_test):
|
||||
a = bank.bank(word_size=2, num_words=128, words_per_row=8, num_banks=2, name="bank4_multi")
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class single_bank_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import bank
|
||||
|
||||
@@ -38,7 +37,6 @@ class single_bank_test(openram_test):
|
||||
a = bank.bank(word_size=2, num_words=128, words_per_row=8, num_banks=1, name="bank4_single")
|
||||
self.local_check(a)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -17,7 +17,6 @@ class sram_1bank_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
|
||||
@@ -37,7 +36,6 @@ class sram_1bank_test(openram_test):
|
||||
# a = sram.sram(word_size=2, num_words=128, num_banks=1, name="sram4")
|
||||
# self.local_check(a, final_verification=True)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -18,7 +18,6 @@ class sram_2bank_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
|
||||
@@ -38,7 +37,6 @@ class sram_2bank_test(openram_test):
|
||||
# a = sram.sram(word_size=2, num_words=256 num_banks=2, name="sram4")
|
||||
# self.local_check(a, final_verification=True)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -18,7 +18,6 @@ class sram_4bank_test(openram_test):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
global verify
|
||||
import verify
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
|
||||
@@ -38,7 +37,6 @@ class sram_4bank_test(openram_test):
|
||||
# a = sram.sram(word_size=2, num_words=256, num_banks=4, name="sram4")
|
||||
# self.local_check(a, final_verification=True)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
|
||||
@@ -15,9 +15,9 @@ class timing_sram_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = False
|
||||
OPTS.spice_name="hspice"
|
||||
OPTS.analytical_delay = False
|
||||
|
||||
|
||||
# This is a hack to reload the characterizer __init__ with the spice version
|
||||
from importlib import reload
|
||||
@@ -35,7 +35,6 @@ class timing_sram_test(openram_test):
|
||||
num_banks=OPTS.num_banks,
|
||||
name="sram1")
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
s.sp_write(tempspice)
|
||||
@@ -85,12 +84,6 @@ class timing_sram_test(openram_test):
|
||||
else:
|
||||
self.isclose(data[k],golden_data[k],0.15)
|
||||
|
||||
|
||||
# reset these options
|
||||
OPTS.check_lvsdrc = True
|
||||
OPTS.analytical_delay = True
|
||||
reload(characterizer)
|
||||
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -15,7 +15,6 @@ class timing_setup_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = False
|
||||
OPTS.spice_name="hspice"
|
||||
OPTS.analytical_delay = False
|
||||
|
||||
@@ -27,7 +26,6 @@ class timing_setup_test(openram_test):
|
||||
if not OPTS.spice_exe:
|
||||
debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1)
|
||||
|
||||
|
||||
import sram
|
||||
import tech
|
||||
slews = [tech.spice["rise_time"]*2]
|
||||
@@ -59,9 +57,6 @@ class timing_setup_test(openram_test):
|
||||
else:
|
||||
self.isclose(data[k],golden_data[k],0.15)
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
OPTS.analytical_delay = True
|
||||
reload(characterizer)
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -15,7 +15,6 @@ class timing_sram_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = False
|
||||
OPTS.spice_name="ngspice"
|
||||
OPTS.analytical_delay = False
|
||||
|
||||
@@ -84,12 +83,6 @@ class timing_sram_test(openram_test):
|
||||
else:
|
||||
self.isclose(data[k],golden_data[k],0.15)
|
||||
|
||||
# reset these options
|
||||
OPTS.check_lvsdrc = True
|
||||
OPTS.spice_name="hspice"
|
||||
OPTS.analytical_delay = True
|
||||
reload(characterizer)
|
||||
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
@@ -15,7 +15,6 @@ class timing_setup_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = False
|
||||
OPTS.spice_name="ngspice"
|
||||
OPTS.analytical_delay = False
|
||||
|
||||
@@ -58,12 +57,7 @@ class timing_setup_test(openram_test):
|
||||
else:
|
||||
self.isclose(data[k],golden_data[k],0.15)
|
||||
|
||||
# reset these options
|
||||
OPTS.check_lvsdrc = True
|
||||
OPTS.spice_name="hspice"
|
||||
OPTS.analytical_delay = True
|
||||
reload(characterizer)
|
||||
|
||||
globals.end_openram()
|
||||
|
||||
# instantiate a copdsay of the class to actually run the test
|
||||
|
||||
Regular → Executable
+13
-6
@@ -11,11 +11,22 @@ import globals
|
||||
from globals import OPTS
|
||||
import debug
|
||||
|
||||
@unittest.skip("SKIPPING 22_sram_func_test")
|
||||
@unittest.skip("SKIPPING 22_sram_pex_test")
|
||||
class sram_func_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
|
||||
OPTS.use_pex = True
|
||||
|
||||
# This is a hack to reload the characterizer __init__ with the spice version
|
||||
from importlib import reload
|
||||
import characterizer
|
||||
reload(characterizer)
|
||||
from characterizer import setup_hold
|
||||
if not OPTS.spice_exe:
|
||||
debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1)
|
||||
|
||||
global verify
|
||||
import verify
|
||||
|
||||
@@ -31,14 +42,10 @@ class sram_func_test(openram_test):
|
||||
import tech
|
||||
|
||||
debug.info(1, "Testing timing for sample 1bit, 16words SRAM with 1 bank")
|
||||
OPTS.check_lvsdrc = False
|
||||
OPTS.use_pex = True
|
||||
s = sram.sram(word_size=OPTS.word_size,
|
||||
num_words=OPTS.num_words,
|
||||
num_banks=OPTS.num_banks,
|
||||
name="test_sram1")
|
||||
OPTS.check_lvsdrc = True
|
||||
OPTS.use_pex = False
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
tempgds = OPTS.openram_temp + "temp.gds"
|
||||
@@ -90,7 +97,7 @@ class sram_func_test(openram_test):
|
||||
self.assertTrue(round(value1) > 0.5 * tech.spice["supply_voltage"])
|
||||
self.assertTrue(round(value2) < 0.5 * tech.spice["supply_voltage"])
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
|
||||
def convert_voltage_unit(self, string):
|
||||
newstring = ""
|
||||
|
||||
@@ -11,12 +11,11 @@ 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.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
|
||||
@@ -35,8 +34,6 @@ class sram_func_test(openram_test):
|
||||
num_banks=1,
|
||||
name="sram_func_test")
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
s.sp_write(tempspice)
|
||||
|
||||
@@ -45,7 +42,7 @@ class sram_func_test(openram_test):
|
||||
debug.info(1, "Probe address {0} probe data {1}".format(probe_address, probe_data))
|
||||
|
||||
corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0])
|
||||
d = delay.delay(s,tempspice,corner)
|
||||
d = delay(s,tempspice,corner)
|
||||
d.set_probe(probe_address,probe_data)
|
||||
|
||||
# This will exit if it doesn't find a feasible period
|
||||
@@ -55,7 +52,7 @@ class sram_func_test(openram_test):
|
||||
feasible_period = d.find_feasible_period()
|
||||
|
||||
os.remove(tempspice)
|
||||
OPTS.analytical_delay = True
|
||||
|
||||
reload(characterizer)
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class lib_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
from characterizer import lib
|
||||
@@ -25,8 +24,7 @@ class lib_test(openram_test):
|
||||
num_words=16,
|
||||
num_banks=1,
|
||||
name="sram_2_16_1_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
s.sp_write(tempspice)
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ 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
|
||||
|
||||
@@ -35,7 +33,6 @@ class lib_test(openram_test):
|
||||
num_words=16,
|
||||
num_banks=1,
|
||||
name="sram_2_16_1_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
s.sp_write(tempspice)
|
||||
@@ -54,7 +51,6 @@ class lib_test(openram_test):
|
||||
golden = "{0}/golden/{1}".format(os.path.dirname(os.path.realpath(__file__)),newname)
|
||||
self.isapproxdiff(libname,golden,0.40)
|
||||
|
||||
OPTS.analytical_delay = True
|
||||
reload(characterizer)
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ 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
|
||||
|
||||
@@ -35,7 +33,6 @@ class lib_test(openram_test):
|
||||
num_words=16,
|
||||
num_banks=1,
|
||||
name="sram_2_16_1_{0}".format(OPTS.tech_name))
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
s.sp_write(tempspice)
|
||||
@@ -53,8 +50,6 @@ class lib_test(openram_test):
|
||||
golden = "{0}/golden/{1}".format(os.path.dirname(os.path.realpath(__file__)),filename)
|
||||
self.isapproxdiff(libname,golden,0.40)
|
||||
|
||||
OPTS.analytical_delay = True
|
||||
OPTS.trim_netlist = True
|
||||
reload(characterizer)
|
||||
globals.end_openram()
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ class lef_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
# we will manually run lvs/drc
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
|
||||
@@ -26,8 +24,6 @@ class lef_test(openram_test):
|
||||
num_banks=OPTS.num_banks,
|
||||
name="sram_2_16_1_{0}".format(OPTS.tech_name))
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
gdsfile = s.name + ".gds"
|
||||
leffile = s.name + ".lef"
|
||||
gdsname = OPTS.openram_temp + gdsfile
|
||||
|
||||
@@ -15,8 +15,6 @@ class verilog_test(openram_test):
|
||||
|
||||
def runTest(self):
|
||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||
# we will manually run lvs/drc
|
||||
OPTS.check_lvsdrc = False
|
||||
|
||||
import sram
|
||||
|
||||
@@ -26,8 +24,6 @@ class verilog_test(openram_test):
|
||||
num_banks=OPTS.num_banks,
|
||||
name="sram_2_16_1_{0}".format(OPTS.tech_name))
|
||||
|
||||
OPTS.check_lvsdrc = True
|
||||
|
||||
vfile = s.name + ".v"
|
||||
vname = OPTS.openram_temp + vfile
|
||||
s.verilog_write(vname)
|
||||
|
||||
@@ -12,6 +12,7 @@ sys.path.append(os.path.join(sys.path[0],".."))
|
||||
import globals
|
||||
from globals import OPTS
|
||||
import debug
|
||||
import getpass
|
||||
|
||||
class openram_test(openram_test):
|
||||
|
||||
@@ -72,10 +73,7 @@ class openram_test(openram_test):
|
||||
shutil.rmtree(out_path, ignore_errors=True)
|
||||
self.assertEqual(os.path.exists(out_path),False)
|
||||
|
||||
# The default was on, so disable it.
|
||||
OPTS.check_lvsdrc=False
|
||||
globals.end_openram()
|
||||
OPTS.check_lvsdrc=True
|
||||
|
||||
# instantiate a copy of the class to actually run the test
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -27,5 +27,13 @@ modules = map(__import__, moduleNames)
|
||||
suite = unittest.TestSuite()
|
||||
load = unittest.defaultTestLoader.loadTestsFromModule
|
||||
suite.addTests(map(load, modules))
|
||||
ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful()
|
||||
sys.exit(ret)
|
||||
|
||||
test_runner = unittest.TextTestRunner(verbosity=2,stream=sys.stderr)
|
||||
test_result = test_runner.run(suite)
|
||||
|
||||
import verify
|
||||
verify.print_drc_stats()
|
||||
verify.print_lvs_stats()
|
||||
verify.print_pex_stats()
|
||||
|
||||
sys.exit(not test_result.wasSuccessful())
|
||||
|
||||
+21
-17
@@ -1,5 +1,5 @@
|
||||
import unittest,warnings
|
||||
import sys,os,glob
|
||||
import sys,os,glob,copy
|
||||
sys.path.append(os.path.join(sys.path[0],".."))
|
||||
from globals import OPTS
|
||||
import debug
|
||||
@@ -8,17 +8,23 @@ class openram_test(unittest.TestCase):
|
||||
""" Base unit test that we have some shared classes in. """
|
||||
|
||||
def local_drc_check(self, w):
|
||||
|
||||
self.reset()
|
||||
|
||||
tempgds = OPTS.openram_temp + "temp.gds"
|
||||
w.gds_write(tempgds)
|
||||
import verify
|
||||
self.assertFalse(verify.run_drc(w.name, tempgds))
|
||||
|
||||
files = glob.glob(OPTS.openram_temp + '*')
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
result=verify.run_drc(w.name, tempgds)
|
||||
if result != 0:
|
||||
self.fail("DRC failed: {}".format(a.name))
|
||||
|
||||
self.cleanup()
|
||||
|
||||
def local_check(self, a, final_verification=False):
|
||||
|
||||
self.reset()
|
||||
|
||||
tempspice = OPTS.openram_temp + "temp.sp"
|
||||
tempgds = OPTS.openram_temp + "temp.gds"
|
||||
|
||||
@@ -27,19 +33,12 @@ class openram_test(unittest.TestCase):
|
||||
|
||||
import verify
|
||||
result=verify.run_drc(a.name, tempgds)
|
||||
self.reset()
|
||||
try:
|
||||
self.assertTrue(result==0)
|
||||
except:
|
||||
if result != 0:
|
||||
self.fail("DRC failed: {}".format(a.name))
|
||||
|
||||
|
||||
result=verify.run_lvs(a.name, tempgds, tempspice, final_verification)
|
||||
self.reset()
|
||||
try:
|
||||
self.assertTrue(result==0)
|
||||
except:
|
||||
self.reset()
|
||||
if result != 0:
|
||||
self.fail("LVS mismatch: {}".format(a.name))
|
||||
|
||||
if OPTS.purge_temp:
|
||||
@@ -54,9 +53,14 @@ class openram_test(unittest.TestCase):
|
||||
os.remove(f)
|
||||
|
||||
def reset(self):
|
||||
""" Reset the static duplicate name checker for unit tests """
|
||||
import design
|
||||
design.design.name_map=[]
|
||||
"""
|
||||
Reset everything after each test.
|
||||
"""
|
||||
# Reset the static duplicate name checker for unit tests.
|
||||
import hierarchy_design
|
||||
hierarchy_design.hierarchy_design.name_map=[]
|
||||
|
||||
|
||||
|
||||
def isclose(self, value1,value2,error_tolerance=1e-2):
|
||||
""" This is used to compare relative values. """
|
||||
|
||||
Reference in New Issue
Block a user