column control and address precharge

This commit is contained in:
Jacob Walker
2023-03-30 11:30:50 -07:00
parent ce8197d206
commit f7aed247fd
22 changed files with 1479 additions and 520 deletions
+46 -46
View File
@@ -6,47 +6,41 @@
# All rights reserved.
#
from openram.base import design
from .rom_base_cell import rom_base_cell
from openram.base import vector
from openram import OPTS
from openram.sram_factory import factory
from openram.tech import drc
class rom_precharge_cell(design):
class rom_precharge_cell(rom_base_cell):
def __init__(self, name="", cell_name=None, route_layer="m1"):
def __init__(self, name="", route_layer="m1"):
super().__init__(name, cell_name)
self.route_layer = route_layer
self.create_netlist()
self.create_layout()
#self.route_layer= route_layer
#self.create_netlist()
#self.create_layout()
super().__init__(name=name, bitline_layer=route_layer)
def create_netlist(self):
self.add_pins()
self.add_pmos()
self.create_pmos()
# def create_netlist(self):
# self.add_pins()
# self.add_modules()
# self.create_tx()
def create_layout(self):
self.setup_layout_constants()
self.place_pmos()
self.add_boundary()
super().create_layout()
self.extend_well()
def add_pmos(self):
def add_modules(self):
self.pmos = factory.create(module_type="ptx",
module_name="pre_pmos_mod",
tx_type="pmos"
)
def create_pmos(self):
def create_tx(self):
self.cell_inst = self.add_inst( name="precharge_pmos",
mod=self.pmos,
)
@@ -55,17 +49,15 @@ class rom_precharge_cell(design):
def add_pins(self):
pin_list = ["vdd", "gate", "bitline", "body"]
dir_list = ["POWER", "INPUT", "OUTPUT", "INPUT"]
dir_list = ["POWER", "INPUT", "OUTPUT", "POWER"]
self.add_pin_list(pin_list, dir_list)
def setup_layout_constants(self):
#pmos contact to gate distance
self.contact_to_gate = 0.5 * (self.pmos.width - 2 * self.pmos.contact_width - self.pmos.poly_width - 2 * self.active_enclose_contact)
def setup_drc_offsets(self):
#height offset to account for active-to-active spacing between adjacent bitlines
self.poly_extend_active_spacing = abs( 2 * self.pmos.poly_extend_active - drc("active_to_active") )
self.poly_size = (self.cell_inst.width + self.active_space) - (self.cell_inst.height + 2 * self.poly_extend_active)
#contact to contact distance, minimum cell width before drc offsets
self.base_width = self.pmos.width - 2 * self.active_enclose_contact - self.pmos.contact_width
@@ -77,30 +69,38 @@ class rom_precharge_cell(design):
self.poly_tap_offset = (self.base_width - self.poly_contact.width - self.poly_active_offset) - drc("poly_to_poly")
def place_pmos(self):
def extend_well(self):
self.pmos
poly_offset = vector(self.poly_extend_active_spacing * 0.5 + self.pmos.height + 2 * self.poly_extend_active, 0.5 * self.pmos.width)
well_y = - (0.5 * self.nwell_width)
well_ll = vector(0, well_y)
# height = self.active_width + 2 * self.well_enclose_active
height = self.height + 0.5 * self.nwell_width
self.add_rect("nwell", well_ll, self.width , height)
# def place_tx(self):
# pmos_offset = vector(self.pmos.poly_extend_active, - 0.5 * self.pmos.contact_width - self.active_enclose_contact)
# pmos_offset = vector(-self.pmos.poly_extend_active - self.poly_extend_active_spacing, 0)
pmos_offset = vector(self.pmos.poly_extend_active + self.pmos.height, 0)
# add rect of poly to account for offset from drc spacing
self.add_rect_center("poly", poly_offset, self.poly_extend_active_spacing, self.pmos.poly_width )
# pmos_offset = vector(self.pmos.poly_extend_active + self.pmos.height, 0)
self.cell_inst.place(pmos_offset, rotate=90)
# self.add_label("CELL ZERO", self.route_layer)
self.add_label("inst_zero", self.route_layer)
self.add_layout_pin_rect_center("S", self.route_layer, self.cell_inst.get_pin("S").center())
self.add_layout_pin_rect_center("D", self.route_layer, self.cell_inst.get_pin("D").center())
# self.cell_inst.place(pmos_offset, rotate=90)
# self.add_label("inst_zero", self.bitline_layer)
# self.add_layout_pin_rect_center("S", self.bitline_layer, self.cell_inst.get_pin("S").center())
# self.add_layout_pin_rect_center("D", self.bitline_layer, self.cell_inst.get_pin("D").center())
def add_boundary(self):
#cell width with offsets applied, height becomes width when the cells are rotated
self.width = self.pmos.height + self.poly_extend_active_spacing + 2 * self.pmos.poly_extend_active
# def place_poly(self):
# poly_size = (self.cell_inst.width + self.active_space) - (self.cell_inst.rx() + self.poly_extend_active)
# poly_offset = vector(self.cell_inst.rx() + self.poly_extend_active, self.cell_inst.width * 0.5 )
# cell height with offsets applied, width becomes height when the cells are rotated, if the offsets are positive (greater than 0) they are not applied
self.height = self.base_width - min(self.poly_active_offset, 0) - min(self.poly_tap_offset, 0)
# start = poly_offset
# end = poly_offset + vector(poly_size, 0)
# self.add_segment_center("poly", start, end)
# def add_boundary(self):
super().add_boundary()
# #cell width with offsets applied, height becomes width when the cells are rotated
# self.width = self.pmos.height + self.poly_extend_active_spacing + 2 * self.pmos.poly_extend_active
# # cell height with offsets applied, width becomes height when the cells are rotated, if the offsets are positive (greater than 0) they are not applied
# # self.height = self.base_width - min(self.poly_active_offset, 0) - min(self.poly_tap_offset, 0)
# super().add_boundary()