mirror of https://github.com/VLSIDA/OpenRAM.git
updated imports to match upstream dev openram
This commit is contained in:
parent
63925bd48e
commit
b2631b60ff
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
from base import design
|
from openram.base import design
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
|
|
||||||
class rom_array_gnd_tap(design):
|
class rom_array_gnd_tap(design):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,10 @@
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from .bitcell_base_array import bitcell_base_array
|
from .bitcell_base_array import bitcell_base_array
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import tech
|
from openram.tech import drc
|
||||||
from tech import drc
|
|
||||||
|
|
||||||
class rom_base_array(bitcell_base_array):
|
class rom_base_array(bitcell_base_array):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
import math
|
import math
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from base import design
|
from openram.base import design
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import tech
|
import tech
|
||||||
from tech import drc
|
from openram.tech import drc
|
||||||
|
|
||||||
class rom_base_bank(design):
|
class rom_base_bank(design):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
from .rom_dummy_cell import rom_dummy_cell
|
from .rom_dummy_cell import rom_dummy_cell
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
|
from openram.tech import drc
|
||||||
from tech import drc
|
|
||||||
|
|
||||||
|
|
||||||
class rom_base_cell(rom_dummy_cell):
|
class rom_base_cell(rom_dummy_cell):
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,12 @@
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
import math
|
from math import ceil, log
|
||||||
from base import design
|
from openram.base import design
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
import tech
|
from openram.tech import drc
|
||||||
from tech import drc
|
|
||||||
|
|
||||||
|
|
||||||
class rom_decoder(design):
|
class rom_decoder(design):
|
||||||
|
|
@ -23,7 +22,7 @@ class rom_decoder(design):
|
||||||
# array gets rotated 90deg so that rows/cols switch
|
# array gets rotated 90deg so that rows/cols switch
|
||||||
self.strap_spacing=strap_spacing
|
self.strap_spacing=strap_spacing
|
||||||
self.num_outputs = num_outputs
|
self.num_outputs = num_outputs
|
||||||
self.num_inputs = math.ceil(math.log(num_outputs, 2))
|
self.num_inputs = ceil(log(num_outputs, 2))
|
||||||
self.create_decode_map()
|
self.create_decode_map()
|
||||||
|
|
||||||
for i in range(2 * self.num_inputs): print(self.decode_map[i])
|
for i in range(2 * self.num_inputs): print(self.decode_map[i])
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from base import design
|
from openram.base import design
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
from tech import drc
|
from openram.tech import drc
|
||||||
|
|
||||||
|
|
||||||
class rom_dummy_cell(design):
|
class rom_dummy_cell(design):
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
from base import design
|
from openram.base import design
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from tech import layer, drc
|
from openram.tech import layer, drc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,15 @@
|
||||||
|
# See LICENSE for licensing information.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016-2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
from openram.base import design
|
||||||
from base import design
|
from openram.base import vector
|
||||||
from base import vector
|
from openram import OPTS
|
||||||
from globals import OPTS
|
from openram.sram_factory import factory
|
||||||
from sram_factory import factory
|
|
||||||
|
|
||||||
class rom_poly_tap(design):
|
class rom_poly_tap(design):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
import math
|
from math import ceil
|
||||||
from base import geometry
|
from openram.base import geometry
|
||||||
from base import design
|
from openram.base import design
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from tech import layer, drc
|
from openram.tech import layer, drc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ class rom_precharge_array(design):
|
||||||
|
|
||||||
|
|
||||||
if strap_spacing != 0:
|
if strap_spacing != 0:
|
||||||
self.num_straps = math.ceil(self.cols / self.strap_spacing)
|
self.num_straps = ceil(self.cols / self.strap_spacing)
|
||||||
self.array_col_size = self.cols + self.num_straps
|
self.array_col_size = self.cols + self.num_straps
|
||||||
else:
|
else:
|
||||||
self.num_straps = 0
|
self.num_straps = 0
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
from base import design
|
from openram.base import design
|
||||||
from base import vector
|
from openram.base import vector
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
|
|
||||||
from tech import drc
|
from openram.tech import drc
|
||||||
|
|
||||||
|
|
||||||
class rom_precharge_cell(design):
|
class rom_precharge_cell(design):
|
||||||
|
|
|
||||||
|
|
@ -6,21 +6,21 @@
|
||||||
# (acting for and on behalf of Oklahoma State University)
|
# (acting for and on behalf of Oklahoma State University)
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
import sys, os
|
||||||
import unittest
|
import unittest
|
||||||
from testutils import *
|
from testutils import *
|
||||||
import sys, os
|
|
||||||
|
|
||||||
import globals
|
import openram
|
||||||
from globals import OPTS
|
from openram import debug
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import debug
|
from openram import OPTS
|
||||||
|
|
||||||
|
|
||||||
class rom_array_test(openram_test):
|
class rom_array_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
||||||
globals.init_openram(config_file)
|
openram.init_openram(config_file, is_unit_test=True)
|
||||||
|
|
||||||
debug.info(2, "Testing 4x4 array for rom cell")
|
debug.info(2, "Testing 4x4 array for rom cell")
|
||||||
|
|
||||||
|
|
@ -29,11 +29,11 @@ class rom_array_test(openram_test):
|
||||||
|
|
||||||
a = factory.create(module_type="rom_base_array", cols=9, rows=8, bitmap=data, strap_spacing=4)
|
a = factory.create(module_type="rom_base_array", cols=9, rows=8, bitmap=data, strap_spacing=4)
|
||||||
self.local_check(a)
|
self.local_check(a)
|
||||||
globals.end_openram()
|
openram.end_openram()
|
||||||
|
|
||||||
# run the test from the command line
|
# run the test from the command line
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
(OPTS, args) = globals.parse_args()
|
(OPTS, args) = openram.parse_args()
|
||||||
del sys.argv[1:]
|
del sys.argv[1:]
|
||||||
header(__file__, OPTS.tech_name)
|
header(__file__, OPTS.tech_name)
|
||||||
unittest.main(testRunner=debugTestRunner())
|
unittest.main(testRunner=debugTestRunner())
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ import unittest
|
||||||
from testutils import *
|
from testutils import *
|
||||||
import sys, os
|
import sys, os
|
||||||
|
|
||||||
import globals
|
import openram
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ class rom_bank_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
||||||
globals.init_openram(config_file)
|
openram.init_openram(config_file, is_unit_test=True)
|
||||||
|
|
||||||
debug.info(2, "Testing 4x4 array for rom cell")
|
debug.info(2, "Testing 4x4 array for rom cell")
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ class rom_bank_test(openram_test):
|
||||||
|
|
||||||
# run the test from the command line
|
# run the test from the command line
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
(OPTS, args) = globals.parse_args()
|
(OPTS, args) = openram.parse_args()
|
||||||
del sys.argv[1:]
|
del sys.argv[1:]
|
||||||
header(__file__, OPTS.tech_name)
|
header(__file__, OPTS.tech_name)
|
||||||
unittest.main(testRunner=debugTestRunner())
|
unittest.main(testRunner=debugTestRunner())
|
||||||
|
|
@ -10,28 +10,28 @@ import unittest
|
||||||
from testutils import *
|
from testutils import *
|
||||||
import sys, os
|
import sys, os
|
||||||
|
|
||||||
import globals
|
import openram
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import debug
|
from openram import debug
|
||||||
|
|
||||||
|
|
||||||
class rom_decoder_test(openram_test):
|
class rom_decoder_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
||||||
globals.init_openram(config_file)
|
openram.init_openram(config_file, is_unit_test=True)
|
||||||
|
|
||||||
debug.info(2, "Testing 2x4 decoder for rom cell")
|
debug.info(2, "Testing 2x4 decoder for rom cell")
|
||||||
|
|
||||||
|
|
||||||
a = factory.create(module_type="rom_decoder", num_outputs=8, strap_spacing=2)
|
a = factory.create(module_type="rom_decoder", num_outputs=8, strap_spacing=2)
|
||||||
self.local_check(a)
|
self.local_check(a)
|
||||||
globals.end_openram()
|
openram.end_openram()
|
||||||
|
|
||||||
# run the test from the command line
|
# run the test from the command line
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
(OPTS, args) = globals.parse_args()
|
(OPTS, args) = openram.parse_args()
|
||||||
del sys.argv[1:]
|
del sys.argv[1:]
|
||||||
header(__file__, OPTS.tech_name)
|
header(__file__, OPTS.tech_name)
|
||||||
unittest.main(testRunner=debugTestRunner())
|
unittest.main(testRunner=debugTestRunner())
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ import unittest
|
||||||
from testutils import *
|
from testutils import *
|
||||||
import sys, os
|
import sys, os
|
||||||
|
|
||||||
import globals
|
import openram
|
||||||
from globals import OPTS
|
from openram import OPTS
|
||||||
from sram_factory import factory
|
from openram.sram_factory import factory
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ class rom_precharge_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
config_file = "{}/tests/configs/config".format(os.getenv("OPENRAM_HOME"))
|
||||||
globals.init_openram(config_file)
|
openram.init_openram(config_file, is_unit_test=True)
|
||||||
|
|
||||||
debug.info(2, "Testing precharge array for rom cell")
|
debug.info(2, "Testing precharge array for rom cell")
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ class rom_precharge_test(openram_test):
|
||||||
|
|
||||||
# run the test from the command line
|
# run the test from the command line
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
(OPTS, args) = globals.parse_args()
|
(OPTS, args) = openram.parse_args()
|
||||||
del sys.argv[1:]
|
del sys.argv[1:]
|
||||||
header(__file__, OPTS.tech_name)
|
header(__file__, OPTS.tech_name)
|
||||||
unittest.main(testRunner=debugTestRunner())
|
unittest.main(testRunner=debugTestRunner())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue