2018-05-12 01:32:00 +02:00
|
|
|
#!/usr/bin/env python3
|
2018-04-06 18:50:13 +02:00
|
|
|
"""
|
2018-05-12 01:32:00 +02:00
|
|
|
Run a regression test on a wordline_driver array
|
2018-04-06 18:50:13 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
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
|
2019-01-17 01:15:38 +01:00
|
|
|
from sram_factory import factory
|
2018-04-06 18:50:13 +02:00
|
|
|
|
|
|
|
|
#@unittest.skip("SKIPPING 04_driver_test")
|
|
|
|
|
|
|
|
|
|
class single_level_column_mux_test(openram_test):
|
|
|
|
|
|
|
|
|
|
def runTest(self):
|
|
|
|
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
|
|
|
|
import single_level_column_mux
|
|
|
|
|
import tech
|
2018-09-13 05:22:12 +02:00
|
|
|
|
|
|
|
|
# check single level column mux in single port
|
2018-04-06 18:50:13 +02:00
|
|
|
debug.info(2, "Checking column mux")
|
2019-01-17 01:15:38 +01:00
|
|
|
tx = single_level_column_mux.single_level_column_mux(name="mux8", tx_size=8)
|
2018-04-06 18:50:13 +02:00
|
|
|
self.local_check(tx)
|
2018-09-10 07:08:03 +02:00
|
|
|
|
2018-09-13 05:22:12 +02:00
|
|
|
# check single level column mux in multi-port
|
|
|
|
|
OPTS.bitcell = "pbitcell"
|
|
|
|
|
OPTS.num_rw_ports = 1
|
|
|
|
|
OPTS.num_r_ports = 1
|
|
|
|
|
OPTS.num_w_ports = 1
|
2019-01-17 01:15:38 +01:00
|
|
|
|
|
|
|
|
factory.reset()
|
2018-09-13 05:22:12 +02:00
|
|
|
debug.info(2, "Checking column mux for pbitcell (innermost connections)")
|
2019-01-17 01:15:38 +01:00
|
|
|
tx = single_level_column_mux.single_level_column_mux(name="mux8_2", tx_size=8, bitcell_bl="bl0", bitcell_br="br0")
|
2018-09-13 05:22:12 +02:00
|
|
|
self.local_check(tx)
|
|
|
|
|
|
2019-01-17 01:15:38 +01:00
|
|
|
factory.reset()
|
2018-09-13 05:22:12 +02:00
|
|
|
debug.info(2, "Checking column mux for pbitcell (outermost connections)")
|
2019-01-17 01:15:38 +01:00
|
|
|
tx = single_level_column_mux.single_level_column_mux(name="mux8_3", tx_size=8, bitcell_bl="bl2", bitcell_br="br2")
|
2018-09-13 05:22:12 +02:00
|
|
|
self.local_check(tx)
|
2018-04-06 18:50:13 +02:00
|
|
|
|
|
|
|
|
globals.end_openram()
|
|
|
|
|
|
2018-11-03 00:34:26 +01:00
|
|
|
# run the test from the command line
|
2018-04-06 18:50:13 +02:00
|
|
|
if __name__ == "__main__":
|
|
|
|
|
(OPTS, args) = globals.parse_args()
|
|
|
|
|
del sys.argv[1:]
|
|
|
|
|
header(__file__, OPTS.tech_name)
|
|
|
|
|
unittest.main()
|