2018-12-03 21:55:48 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""
|
|
|
|
|
Run a regression test on a 2-row buffer cell
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
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
|
2019-03-06 23:12:24 +01:00
|
|
|
from sram_factory import factory
|
2018-12-03 21:55:48 +01:00
|
|
|
import debug
|
|
|
|
|
|
|
|
|
|
class pdriver_test(openram_test):
|
|
|
|
|
|
|
|
|
|
def runTest(self):
|
|
|
|
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
|
|
|
|
|
|
|
|
|
debug.info(2, "Testing inverter/buffer 4x 8x")
|
2018-12-06 23:36:01 +01:00
|
|
|
# a tests the error message for specifying conflicting conditions
|
2019-01-23 21:03:52 +01:00
|
|
|
#a = pdriver.pdriver(fanout = 4,size_list = [1,2,4,8])
|
2018-12-06 23:36:01 +01:00
|
|
|
#self.local_check(a)
|
2019-01-17 01:15:38 +01:00
|
|
|
|
2019-03-06 23:12:24 +01:00
|
|
|
b = factory.create(module_type="pdriver", size_list = [1,2,4,8])
|
2018-12-06 23:36:01 +01:00
|
|
|
self.local_check(b)
|
2019-01-17 01:15:38 +01:00
|
|
|
|
2019-03-06 23:12:24 +01:00
|
|
|
c = factory.create(module_type="pdriver", fanout = 50)
|
2018-12-06 23:36:01 +01:00
|
|
|
self.local_check(c)
|
2019-01-17 01:15:38 +01:00
|
|
|
|
2019-03-06 23:12:24 +01:00
|
|
|
d = factory.create(module_type="pdriver", fanout = 50, neg_polarity = True)
|
2018-12-06 23:36:01 +01:00
|
|
|
self.local_check(d)
|
2019-01-17 01:15:38 +01:00
|
|
|
|
2019-03-06 23:12:24 +01:00
|
|
|
e = factory.create(module_type="pdriver", fanout = 64)
|
2018-12-06 23:36:01 +01:00
|
|
|
self.local_check(e)
|
2019-01-17 01:15:38 +01:00
|
|
|
|
2019-03-06 23:12:24 +01:00
|
|
|
f = factory.create(module_type="pdriver", fanout = 64, neg_polarity = True)
|
2018-12-06 23:36:01 +01:00
|
|
|
self.local_check(f)
|
2018-12-03 21:55:48 +01:00
|
|
|
|
|
|
|
|
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()
|