2018-10-23 02:02:21 +02:00
|
|
|
#!/usr/bin/env python3
|
2019-04-26 21:21:50 +02:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
|
|
|
|
#Copyright (c) 2019 Regents of the University of California and The Board
|
|
|
|
|
#of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
#(acting for and on behalf of Oklahoma State University)
|
|
|
|
|
#All rights reserved.
|
|
|
|
|
#
|
2018-10-23 02:02:21 +02:00
|
|
|
"""
|
2018-10-25 01:56:47 +02:00
|
|
|
Run a regression test on a basic array
|
2018-10-23 02:02:21 +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
|
2019-03-06 23:12:24 +01:00
|
|
|
from sram_factory import factory
|
2018-10-23 02:02:21 +02:00
|
|
|
import debug
|
|
|
|
|
|
2018-10-25 01:56:47 +02:00
|
|
|
#@unittest.skip("SKIPPING 05_bitcell_1rw_1r_array_test")
|
2018-10-23 02:02:21 +02:00
|
|
|
|
2018-10-25 01:56:47 +02:00
|
|
|
class bitcell_1rw_1r_array_test(openram_test):
|
2018-10-23 02:02:21 +02:00
|
|
|
|
|
|
|
|
def runTest(self):
|
2019-03-08 19:47:41 +01:00
|
|
|
globals.init_openram("config_{0}".format(OPTS.tech_name))
|
2018-10-23 02:02:21 +02:00
|
|
|
|
2018-10-25 23:53:03 +02:00
|
|
|
debug.info(2, "Testing 4x4 array for cell_1rw_1r")
|
2018-10-25 01:56:47 +02:00
|
|
|
OPTS.bitcell = "bitcell_1rw_1r"
|
|
|
|
|
OPTS.num_rw_ports = 1
|
|
|
|
|
OPTS.num_r_ports = 1
|
|
|
|
|
OPTS.num_w_ports = 0
|
2019-03-06 23:12:24 +01:00
|
|
|
a = factory.create(module_type="bitcell_array", cols=4, rows=4)
|
2018-10-25 01:56:47 +02:00
|
|
|
self.local_check(a)
|
2018-10-23 02:02:21 +02:00
|
|
|
|
2018-10-25 01:56:47 +02:00
|
|
|
globals.end_openram()
|
2018-10-23 02:02:21 +02:00
|
|
|
|
2018-11-03 00:34:26 +01:00
|
|
|
# run the test from the command line
|
2018-10-23 02:02:21 +02:00
|
|
|
if __name__ == "__main__":
|
|
|
|
|
(OPTS, args) = globals.parse_args()
|
|
|
|
|
del sys.argv[1:]
|
|
|
|
|
header(__file__, OPTS.tech_name)
|
|
|
|
|
unittest.main()
|