mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-01 10:39:35 +02:00
dual port rba lvs clean again with cell library changes
This commit is contained in:
@@ -8,12 +8,13 @@ from openram import OPTS
|
||||
from .bitcell_base_array import bitcell_base_array
|
||||
from openram.base import geometry
|
||||
from .pattern import pattern
|
||||
from math import ceil
|
||||
|
||||
class col_cap_array(bitcell_base_array):
|
||||
"""
|
||||
Generate a dummy row/column for the replica array.
|
||||
"""
|
||||
def __init__(self, rows, cols, column_offset=0, mirror=0, location="", name="",left_rbl=[],right_rbl=[]):
|
||||
def __init__(self, rows, cols, column_offset=0, row_offset=0, mirror=0, location="", name="",left_rbl=[],right_rbl=[]):
|
||||
super().__init__(rows=rows, cols=cols, column_offset=column_offset, name=name)
|
||||
self.mirror = mirror
|
||||
self.location = location
|
||||
@@ -38,28 +39,44 @@ class col_cap_array(bitcell_base_array):
|
||||
|
||||
def create_layout(self):
|
||||
|
||||
self.place_array("dummy_r{0}_c{1}", self.mirror)
|
||||
self.place_array()
|
||||
self.add_layout_pins()
|
||||
|
||||
self.height = self.dummy_cell.height
|
||||
self.width = self.column_size * self.cell.width
|
||||
#self.height = self.dummy_cell.height
|
||||
#self.width = self.column_size * self.cell.width
|
||||
|
||||
self.add_boundary()
|
||||
self.DRC_LVS()
|
||||
|
||||
def add_modules(self):
|
||||
""" Add the modules used in this design """
|
||||
self.dummy_cell = factory.create(module_type="col_cap_{}".format(OPTS.bitcell))
|
||||
self.colend = factory.create(module_type="col_cap_{}".format(OPTS.bitcell))
|
||||
|
||||
# def create_instances(self):
|
||||
# """ Create the module instances used in this design """
|
||||
# self.cell_inst = {}
|
||||
# for col in range(self.column_size):
|
||||
# for row in range(self.row_size):
|
||||
# name = "bit_r{0}_c{1}".format(row, col)
|
||||
# self.cell_inst[row, col]=self.add_inst(name=name,
|
||||
# mod=self.dummy_cell)
|
||||
# self.connect_inst(self.get_bitcell_pins(row, col))
|
||||
|
||||
def create_instances(self):
|
||||
""" Create the module instances used in this design """
|
||||
self.cell_inst = {}
|
||||
for col in range(self.column_size):
|
||||
for row in range(self.row_size):
|
||||
name = "bit_r{0}_c{1}".format(row, col)
|
||||
self.cell_inst[row, col]=self.add_inst(name=name,
|
||||
mod=self.dummy_cell)
|
||||
self.connect_inst(self.get_bitcell_pins(row, col))
|
||||
self.cell_inst={}
|
||||
if self.location == "top":
|
||||
bit_row = [geometry.instance("00_colend", mod=self.colend, is_bitcell=True, mirror="MY")]\
|
||||
+ [geometry.instance("01_colend", mod=self.colend, is_bitcell=True)]
|
||||
elif self.location == "bottom":
|
||||
bit_row = [geometry.instance("00_colend", mod=self.colend, is_bitcell=True, mirror="XY")]\
|
||||
+ [geometry.instance("01_colend", mod=self.colend, is_bitcell=True, mirror="MX")]
|
||||
|
||||
bit_row = pattern.rotate_list(bit_row, self.column_offset * 2)
|
||||
bit_block = []
|
||||
pattern.append_row_to_block(bit_block, bit_row)
|
||||
self.pattern = pattern(self, "col_cap_array_" + self.location , bit_block, num_rows=self.row_size, num_cols=self.column_size, num_cores_x=ceil(self.column_size/2), num_cores_y=ceil(self.row_size/2), name_template="col_cap_array" + self.location + "_r{0}_c{1}")
|
||||
self.pattern.connect_array()
|
||||
|
||||
def get_bitcell_pins(self, row, col):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user