OpenRAM/compiler/tests/08_wordline_driver_test.py

47 lines
1.2 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
2016-11-08 18:57:35 +01:00
"""
Run a regression test on a wordline_driver array
2016-11-08 18:57:35 +01:00
"""
import unittest
from testutils import header,openram_test
2016-11-08 18:57:35 +01:00
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
2016-11-08 18:57:35 +01:00
import debug
2019-01-17 01:15:38 +01:00
from sram_factory import factory
2016-11-08 18:57:35 +01:00
#@unittest.skip("SKIPPING 04_driver_test")
class wordline_driver_test(openram_test):
2016-11-08 18:57:35 +01:00
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
import wordline_driver
# check wordline driver for single port
2016-11-08 18:57:35 +01:00
debug.info(2, "Checking driver")
tx = wordline_driver.wordline_driver(name="wld1", rows=8, cols=32)
self.local_check(tx)
2016-11-08 18:57:35 +01:00
# check wordline driver for multi-port
OPTS.bitcell = "pbitcell"
OPTS.num_rw_ports = 1
OPTS.num_w_ports = 0
OPTS.num_r_ports = 0
2019-01-17 01:15:38 +01:00
factory.reset()
debug.info(2, "Checking driver (multi-port case)")
tx = wordline_driver.wordline_driver(name="wld2", rows=8, cols=64)
self.local_check(tx)
globals.end_openram()
# run the test from the command line
2016-11-08 18:57:35 +01:00
if __name__ == "__main__":
(OPTS, args) = globals.parse_args()
del sys.argv[1:]
2016-11-08 18:57:35 +01:00
header(__file__, OPTS.tech_name)
unittest.main()