2018-01-09 22:39:42 +01:00
|
|
|
#!/usr/bin/env python2.7
|
|
|
|
|
"""
|
2018-02-28 20:14:53 +01:00
|
|
|
Run regresion tests on a parameterized bitcell
|
2018-01-09 22:39:42 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import unittest
|
2018-02-28 20:14:53 +01:00
|
|
|
from testutils import header,openram_test
|
2018-01-09 22:39:42 +01:00
|
|
|
import sys,os
|
|
|
|
|
sys.path.append(os.path.join(sys.path[0],".."))
|
|
|
|
|
import globals
|
2018-02-28 20:14:53 +01:00
|
|
|
from globals import OPTS
|
2018-01-09 22:39:42 +01:00
|
|
|
import debug
|
|
|
|
|
|
|
|
|
|
OPTS = globals.OPTS
|
|
|
|
|
|
|
|
|
|
#@unittest.skip("SKIPPING 04_pbitcell_test")
|
|
|
|
|
|
|
|
|
|
|
2018-02-28 20:14:53 +01:00
|
|
|
class pbitcell_test(openram_test):
|
2018-01-09 22:39:42 +01:00
|
|
|
|
|
|
|
|
def runTest(self):
|
|
|
|
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
2018-02-28 20:14:53 +01:00
|
|
|
global verify
|
|
|
|
|
import verify
|
2018-01-09 22:39:42 +01:00
|
|
|
OPTS.check_lvsdrc = False
|
|
|
|
|
|
|
|
|
|
import pbitcell
|
|
|
|
|
import tech
|
|
|
|
|
|
2018-05-10 18:38:02 +02:00
|
|
|
debug.info(2, "Bitcell with 2 of each port: read/write, write, and read")
|
|
|
|
|
tx = pbitcell.pbitcell(num_readwrite=2,num_write=2,num_read=2)
|
2018-01-09 22:39:42 +01:00
|
|
|
self.local_check(tx)
|
2018-03-07 01:36:11 +01:00
|
|
|
|
2018-05-10 18:38:02 +02:00
|
|
|
debug.info(2, "Bitcell with 0 read/write ports")
|
|
|
|
|
tx = pbitcell.pbitcell(num_readwrite=0,num_write=2,num_read=2)
|
|
|
|
|
self.local_check(tx)
|
|
|
|
|
|
|
|
|
|
debug.info(2, "Bitcell with 0 write ports")
|
|
|
|
|
tx = pbitcell.pbitcell(num_readwrite=2,num_write=0,num_read=2)
|
|
|
|
|
self.local_check(tx)
|
|
|
|
|
|
|
|
|
|
debug.info(2, "Bitcell with 0 read ports")
|
|
|
|
|
tx = pbitcell.pbitcell(num_readwrite=2,num_write=2,num_read=0)
|
2018-03-07 01:36:11 +01:00
|
|
|
self.local_check(tx)
|
2018-01-09 22:39:42 +01:00
|
|
|
|
|
|
|
|
OPTS.check_lvsdrc = True
|
2018-02-28 20:14:53 +01:00
|
|
|
globals.end_openram()
|
2018-01-09 22:39:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# instantiate a copy 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()
|