Added updated 1rw 1r bitcell with a text boundary. Added bitcell array test for the bitcell.

This commit is contained in:
Hunter Nichols 2018-10-24 16:56:47 -07:00
parent 57fb847d50
commit 8e243258e4
4 changed files with 18 additions and 42 deletions

View File

@ -19,9 +19,10 @@ class bitcell_1rw_1r(design.design):
design.design.__init__(self, "cell_1rw_1r")
debug.info(2, "Create bitcell with 1RW and 1R Port")
self.width = bitcell.width
self.height = bitcell.height
self.pin_map = bitcell.pin_map
self.width = bitcell_1rw_1r.width
self.height = bitcell_1rw_1r.height
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):
# delay of bit cell is not like a driver(from WL)

View File

@ -17,7 +17,6 @@ class lib:
self.sram = sram
self.sp_file = sp_file
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.prepare_tables()
@ -27,30 +26,11 @@ class lib:
self.characterize_corners()
def set_port_indices(self):
"""Copies port information set in the SRAM instance"""
self.total_port_num = self.sram.total_ports
self.read_ports = self.sram.read_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):
""" Determine the load/slews if they aren't specified in the config file. """
# These are the parameters to determine the table sizes

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
Run regresion tests on a parameterized bitcell
Run a regression test on a basic array
"""
import unittest
@ -11,29 +11,24 @@ import globals
from globals import OPTS
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_test(openram_test):
class bitcell_1rw_1r_array_test(openram_test):
def runTest(self):
OPTS.bitcell = "bitcell_1rw_1r"
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
from bitcell import bitcell
from bitcell_1rw_1r import bitcell_1rw_1r
import tech
OPTS.num_rw_ports=1
OPTS.num_w_ports=0
OPTS.num_r_ports=1
debug.info(2, "Bitcell with 1 read/write and 1 read port")
#tx = bitcell_1rw_1r()
tx = bitcell()
self.local_check(tx)
import bitcell_array
debug.info(2, "Testing 4x4 array for 6t_cell")
OPTS.bitcell = "bitcell_1rw_1r"
OPTS.num_rw_ports = 1
OPTS.num_r_ports = 1
OPTS.num_w_ports = 0
a = bitcell_array.bitcell_array(name="bitcell_1rw_1r_array", cols=4, rows=4)
self.local_check(a)
globals.end_openram()
# instantiate a copy of the class to actually run the test
if __name__ == "__main__":
(OPTS, args) = globals.parse_args()