2019-07-11 00:56:51 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2020-05-28 05:03:11 +02:00
|
|
|
# Copyright (c) 2016-2019 Regents of the University of California
|
2019-07-11 00:56:51 +02:00
|
|
|
# All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
import unittest
|
|
|
|
|
from testutils import *
|
|
|
|
|
import sys,os
|
|
|
|
|
sys.path.append(os.getenv("OPENRAM_HOME"))
|
|
|
|
|
import globals
|
|
|
|
|
from globals import OPTS
|
|
|
|
|
from sram_factory import factory
|
|
|
|
|
import debug
|
|
|
|
|
|
2020-06-11 01:41:26 +02:00
|
|
|
class replica_bitcell_array_1rw_1r_test(openram_test):
|
2019-07-11 00:56:51 +02:00
|
|
|
|
|
|
|
|
def runTest(self):
|
2019-11-17 01:44:31 +01:00
|
|
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
2019-11-15 19:47:59 +01:00
|
|
|
globals.init_openram(config_file)
|
2019-07-12 19:39:55 +02:00
|
|
|
|
2019-07-11 00:56:51 +02:00
|
|
|
OPTS.num_rw_ports = 1
|
|
|
|
|
OPTS.num_r_ports = 1
|
|
|
|
|
OPTS.num_w_ports = 0
|
2020-06-06 00:09:22 +02:00
|
|
|
globals.setup_bitcell()
|
|
|
|
|
|
2020-07-28 01:22:21 +02:00
|
|
|
debug.info(2, "Testing 4x4 non-replica array for cell_1rw_1r")
|
|
|
|
|
a = factory.create(module_type="replica_bitcell_array",
|
|
|
|
|
cols=4,
|
|
|
|
|
rows=4,
|
2020-09-09 20:54:46 +02:00
|
|
|
rbl=[1, 1])
|
2020-07-28 01:22:21 +02:00
|
|
|
self.local_check(a)
|
|
|
|
|
|
2020-08-19 00:47:52 +02:00
|
|
|
debug.info(2, "Testing 4x4 left replica array for cell_1rw_1r")
|
|
|
|
|
a = factory.create(module_type="replica_bitcell_array",
|
|
|
|
|
cols=4,
|
|
|
|
|
rows=4,
|
|
|
|
|
rbl=[1, 1],
|
2020-09-09 20:54:46 +02:00
|
|
|
left_rbl=[0])
|
2020-08-19 00:47:52 +02:00
|
|
|
self.local_check(a)
|
|
|
|
|
|
|
|
|
|
debug.info(2, "Testing 4x4 array left and right replica for cell_1rw_1r")
|
2020-07-28 01:22:21 +02:00
|
|
|
a = factory.create(module_type="replica_bitcell_array",
|
|
|
|
|
cols=4,
|
|
|
|
|
rows=4,
|
2020-09-09 20:54:46 +02:00
|
|
|
rbl=[1, 1],
|
|
|
|
|
left_rbl=[0],
|
|
|
|
|
right_rbl=[1])
|
2020-05-29 05:31:21 +02:00
|
|
|
self.local_check(a)
|
2019-07-15 20:29:29 +02:00
|
|
|
|
2020-07-28 01:22:21 +02:00
|
|
|
|
2020-06-30 00:28:16 +02:00
|
|
|
# Sky 130 has restrictions on the symmetries
|
|
|
|
|
if OPTS.tech_name != "sky130":
|
2020-08-19 00:47:52 +02:00
|
|
|
debug.info(2, "Testing 4x4 array right only replica for cell_1rw_1r")
|
2020-07-28 01:22:21 +02:00
|
|
|
a = factory.create(module_type="replica_bitcell_array",
|
|
|
|
|
cols=4,
|
|
|
|
|
rows=4,
|
2020-08-19 00:47:52 +02:00
|
|
|
rbl=[1, 1],
|
2020-09-09 20:54:46 +02:00
|
|
|
right_rbl=[1])
|
2020-06-30 00:28:16 +02:00
|
|
|
self.local_check(a)
|
2019-07-11 00:56:51 +02:00
|
|
|
|
|
|
|
|
globals.end_openram()
|
|
|
|
|
|
|
|
|
|
# run the test from the command line
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
(OPTS, args) = globals.parse_args()
|
|
|
|
|
del sys.argv[1:]
|
|
|
|
|
header(__file__, OPTS.tech_name)
|
|
|
|
|
unittest.main(testRunner=debugTestRunner())
|