mirror of https://github.com/VLSIDA/OpenRAM.git
Added updated 1rw 1r bitcell with a text boundary. Added bitcell array test for the bitcell.
This commit is contained in:
parent
57fb847d50
commit
8e243258e4
|
|
@ -19,9 +19,10 @@ class bitcell_1rw_1r(design.design):
|
||||||
design.design.__init__(self, "cell_1rw_1r")
|
design.design.__init__(self, "cell_1rw_1r")
|
||||||
debug.info(2, "Create bitcell with 1RW and 1R Port")
|
debug.info(2, "Create bitcell with 1RW and 1R Port")
|
||||||
|
|
||||||
self.width = bitcell.width
|
self.width = bitcell_1rw_1r.width
|
||||||
self.height = bitcell.height
|
self.height = bitcell_1rw_1r.height
|
||||||
self.pin_map = bitcell.pin_map
|
debug.info(1, "Multiport width {}, height {}".format(self.width, self.height))
|
||||||
|
self.pin_map = bitcell_1rw_1r.pin_map
|
||||||
|
|
||||||
def analytical_delay(self, slew, load=0, swing = 0.5):
|
def analytical_delay(self, slew, load=0, swing = 0.5):
|
||||||
# delay of bit cell is not like a driver(from WL)
|
# delay of bit cell is not like a driver(from WL)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ class lib:
|
||||||
self.sram = sram
|
self.sram = sram
|
||||||
self.sp_file = sp_file
|
self.sp_file = sp_file
|
||||||
self.use_model = use_model
|
self.use_model = use_model
|
||||||
#self.gen_port_names() #copy and paste from delay.py, names are not final will likely be changed later.
|
|
||||||
self.set_port_indices()
|
self.set_port_indices()
|
||||||
|
|
||||||
self.prepare_tables()
|
self.prepare_tables()
|
||||||
|
|
@ -27,30 +26,11 @@ class lib:
|
||||||
self.characterize_corners()
|
self.characterize_corners()
|
||||||
|
|
||||||
def set_port_indices(self):
|
def set_port_indices(self):
|
||||||
|
"""Copies port information set in the SRAM instance"""
|
||||||
self.total_port_num = self.sram.total_ports
|
self.total_port_num = self.sram.total_ports
|
||||||
self.read_ports = self.sram.read_index
|
self.read_ports = self.sram.read_index
|
||||||
self.write_ports = self.sram.write_index
|
self.write_ports = self.sram.write_index
|
||||||
|
|
||||||
def gen_port_names(self):
|
|
||||||
"""Generates the port names to be written to the lib file"""
|
|
||||||
#This is basically a copy and paste of whats in delay.py as well. Something more efficient should be done here.
|
|
||||||
self.write_ports = []
|
|
||||||
self.read_ports = []
|
|
||||||
self.total_port_num = OPTS.num_rw_ports + OPTS.num_w_ports + OPTS.num_r_ports
|
|
||||||
|
|
||||||
#save a member variable to avoid accessing global. readwrite ports have different control signals.
|
|
||||||
self.readwrite_port_num = OPTS.num_rw_ports
|
|
||||||
|
|
||||||
#Generate the port names. readwrite ports are required to be added first for this to work.
|
|
||||||
for readwrite_port_num in range(OPTS.num_rw_ports):
|
|
||||||
self.read_ports.append(readwrite_port_num)
|
|
||||||
self.write_ports.append(readwrite_port_num)
|
|
||||||
#This placement is intentional. It makes indexing input data easier. See self.data_values
|
|
||||||
for read_port_num in range(OPTS.num_rw_ports, OPTS.num_r_ports):
|
|
||||||
self.read_ports.append(read_port_num)
|
|
||||||
for write_port_num in range(OPTS.num_rw_ports+OPTS.num_r_ports, OPTS.num_w_ports):
|
|
||||||
self.write_ports.append(write_port_num)
|
|
||||||
|
|
||||||
def prepare_tables(self):
|
def prepare_tables(self):
|
||||||
""" Determine the load/slews if they aren't specified in the config file. """
|
""" Determine the load/slews if they aren't specified in the config file. """
|
||||||
# These are the parameters to determine the table sizes
|
# These are the parameters to determine the table sizes
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
Run regresion tests on a parameterized bitcell
|
Run a regression test on a basic array
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
@ -11,29 +11,24 @@ import globals
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
OPTS = globals.OPTS
|
#@unittest.skip("SKIPPING 05_bitcell_1rw_1r_array_test")
|
||||||
|
|
||||||
@unittest.skip("SKIPPING 04_bitcell_1rw_1r_test")
|
class bitcell_1rw_1r_array_test(openram_test):
|
||||||
class bitcell_1rw_1r_test(openram_test):
|
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
OPTS.bitcell = "bitcell_1rw_1r"
|
|
||||||
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
|
||||||
from bitcell import bitcell
|
import bitcell_array
|
||||||
from bitcell_1rw_1r import bitcell_1rw_1r
|
|
||||||
import tech
|
debug.info(2, "Testing 4x4 array for 6t_cell")
|
||||||
|
OPTS.bitcell = "bitcell_1rw_1r"
|
||||||
OPTS.num_rw_ports = 1
|
OPTS.num_rw_ports = 1
|
||||||
OPTS.num_w_ports=0
|
|
||||||
OPTS.num_r_ports = 1
|
OPTS.num_r_ports = 1
|
||||||
debug.info(2, "Bitcell with 1 read/write and 1 read port")
|
OPTS.num_w_ports = 0
|
||||||
#tx = bitcell_1rw_1r()
|
a = bitcell_array.bitcell_array(name="bitcell_1rw_1r_array", cols=4, rows=4)
|
||||||
tx = bitcell()
|
self.local_check(a)
|
||||||
self.local_check(tx)
|
|
||||||
|
|
||||||
globals.end_openram()
|
globals.end_openram()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# instantiate a copy of the class to actually run the test
|
# instantiate a copy of the class to actually run the test
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
(OPTS, args) = globals.parse_args()
|
(OPTS, args) = globals.parse_args()
|
||||||
Binary file not shown.
Loading…
Reference in New Issue