2022-07-20 02:58:33 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2023-06-08 21:36:12 +02:00
|
|
|
# Copyright (c) 2016-2023 Regents of the University of California and The Board
|
2022-07-20 02:58:33 +02:00
|
|
|
# of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
# (acting for and on behalf of Oklahoma State University)
|
|
|
|
|
# All rights reserved.
|
|
|
|
|
#
|
2023-06-06 21:21:04 +02:00
|
|
|
import sys, os
|
2022-07-20 02:58:33 +02:00
|
|
|
import unittest
|
|
|
|
|
from testutils import *
|
2022-07-22 20:24:54 +02:00
|
|
|
|
2023-06-06 21:21:04 +02:00
|
|
|
import openram
|
|
|
|
|
from openram import debug
|
|
|
|
|
from openram.sram_factory import factory
|
|
|
|
|
from openram import OPTS
|
|
|
|
|
|
2022-07-20 02:58:33 +02:00
|
|
|
|
|
|
|
|
class control_logic_test(openram_test):
|
|
|
|
|
|
|
|
|
|
def runTest(self):
|
|
|
|
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
2023-06-06 21:21:04 +02:00
|
|
|
openram.init_openram(config_file, is_unit_test=True)
|
2022-07-20 02:58:33 +02:00
|
|
|
|
|
|
|
|
debug.info(1, "Testing sample for control_logic_w")
|
|
|
|
|
a = factory.create(module_type="control_logic_delay", num_rows=128, words_per_row=1, word_size=32, port_type="w")
|
|
|
|
|
self.local_check(a)
|
|
|
|
|
|
2023-06-06 21:21:04 +02:00
|
|
|
openram.end_openram()
|
2022-07-20 02:58:33 +02:00
|
|
|
|
|
|
|
|
# run the test from the command line
|
|
|
|
|
if __name__ == "__main__":
|
2023-06-06 21:21:04 +02:00
|
|
|
(OPTS, args) = openram.parse_args()
|
2022-07-20 02:58:33 +02:00
|
|
|
del sys.argv[1:]
|
|
|
|
|
header(__file__, OPTS.tech_name)
|
|
|
|
|
unittest.main(testRunner=debugTestRunner())
|