mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-29 17:39:02 +02:00
column control and address precharge
This commit is contained in:
@@ -58,24 +58,23 @@ class rom_precharge_array(design):
|
||||
|
||||
|
||||
def create_layout(self):
|
||||
self.width = self.cols * self.pmos.width + self.num_straps * self.poly_tap.width
|
||||
self.width = self.cols * self.pmos.width
|
||||
self.height = self.pmos.width
|
||||
self.place_instances()
|
||||
self.create_layout_pins()
|
||||
self.add_well_tap()
|
||||
self.route_supply()
|
||||
self.extend_implant()
|
||||
|
||||
self.add_boundary()
|
||||
|
||||
|
||||
|
||||
def add_boundary(self):
|
||||
self.translate_all(self.well_ll)
|
||||
# self.translate_all(self.well_ll)
|
||||
ur = self.find_highest_coords()
|
||||
ur = vector(ur.x, ur.y - self.well_ll.y)
|
||||
# ur = vector(ur.x, ur.y - self.well_ll.y)
|
||||
super().add_boundary(vector(0, 0), ur)
|
||||
self.width = self.cols * self.pmos.width + self.num_straps * self.poly_tap.width
|
||||
self.width = self.cols * self.pmos.width
|
||||
self.height = ur.y
|
||||
|
||||
def create_modules(self):
|
||||
@@ -84,7 +83,7 @@ class rom_precharge_array(design):
|
||||
|
||||
# For layout constants
|
||||
self.dummy = factory.create(module_type="rom_base_cell")
|
||||
self.poly_tap = factory.create(module_type="rom_poly_tap", strap_length=self.strap_spacing, tx_type="pmos")
|
||||
self.poly_tap = factory.create(module_type="rom_poly_tap", strap_length=self.strap_spacing)
|
||||
|
||||
def add_pins(self):
|
||||
for col in range(self.cols):
|
||||
@@ -96,21 +95,25 @@ class rom_precharge_array(design):
|
||||
self.array_insts = []
|
||||
self.pmos_insts = []
|
||||
self.tap_insts = []
|
||||
|
||||
self.tap_insts.append(self.add_inst(name="tap_0", mod=self.poly_tap))
|
||||
self.connect_inst([])
|
||||
for col in range(self.cols):
|
||||
|
||||
|
||||
if col % self.strap_spacing == 0:
|
||||
name = "tap_c{}".format(col)
|
||||
tap = self.add_inst(name=name, mod=self.poly_tap)
|
||||
self.array_insts.append(tap)
|
||||
self.tap_insts.append(tap)
|
||||
self.connect_inst([])
|
||||
# if col % self.strap_spacing == 0:
|
||||
# name = "tap_c{}".format(col)
|
||||
# tap = self.add_inst(name=name, mod=self.poly_tap)
|
||||
# self.array_insts.append(tap)
|
||||
# self.tap_insts.append(tap)
|
||||
# self.connect_inst([])
|
||||
name = "Xpmos_c{0}".format(col)
|
||||
pmos = self.add_inst(name=name, mod=self.pmos)
|
||||
self.array_insts.append(pmos)
|
||||
self.pmos_insts.append(pmos)
|
||||
bl = "pre_bl{0}_out".format(col)
|
||||
self.connect_inst(["vdd", "gate", bl, "vdd"])
|
||||
|
||||
print(self.array_insts)
|
||||
|
||||
|
||||
@@ -123,15 +126,16 @@ class rom_precharge_array(design):
|
||||
cell_y = 0
|
||||
# columns are bit lines4
|
||||
cell_x = 0
|
||||
print("starting array place")
|
||||
|
||||
self.tap_insts[0].place(vector(cell_x, cell_y))
|
||||
|
||||
for col in range(self.cols):
|
||||
|
||||
if col % self.strap_spacing == 0 :
|
||||
self.tap_insts[strap_num].place(vector(cell_x, cell_y))
|
||||
self.add_label("debug", "li", vector(cell_x, cell_y))
|
||||
cell_x += self.poly_tap.width
|
||||
strap_num += 1
|
||||
# if col % self.strap_spacing == 0 :
|
||||
# self.tap_insts[strap_num].place(vector(cell_x, cell_y))
|
||||
# self.add_label("debug", "li", vector(cell_x, cell_y))
|
||||
# cell_x += self.poly_tap.width
|
||||
# strap_num += 1
|
||||
|
||||
self.pmos_insts[col].place(vector(cell_x, cell_y))
|
||||
self.add_label("debug", "li", vector(cell_x, cell_y))
|
||||
@@ -146,21 +150,6 @@ class rom_precharge_array(design):
|
||||
self.add_layout_pin_rect_center(bl, self.route_layer, source_pin.center())
|
||||
|
||||
|
||||
def extend_implant(self):
|
||||
layer = "nwell"
|
||||
# center of source contact minus radius of the well generated by the contact gives the lowermost well position
|
||||
contact_well_by = self.pmos.pmos.source_contacts[0].cx() - self.pmos.pmos.source_contacts[0].mod.well_width * 0.5
|
||||
|
||||
ptx_well_by = 0.5 * self.pmos.pmos.active_width - 0.5 * self.pmos.pmos.well_width
|
||||
|
||||
well_extend = ptx_well_by - contact_well_by
|
||||
|
||||
|
||||
self.well_ll = vector(0, min(contact_well_by, ptx_well_by))
|
||||
|
||||
height = self.pmos.pmos.active_width + 2 * self.well_enclose_active
|
||||
self.add_rect(layer, self.well_ll, self.width + well_extend, height + 2 * well_extend)
|
||||
|
||||
def add_well_tap(self):
|
||||
|
||||
layer_stack = self.active_stack
|
||||
@@ -174,11 +163,13 @@ class rom_precharge_array(design):
|
||||
directions=("V", "V"))
|
||||
|
||||
def route_supply(self):
|
||||
|
||||
|
||||
start_pin = self.pmos_insts[0].get_pin("S").lx()
|
||||
end_pin = self.pmos_insts[-1].get_pin("S").rx()
|
||||
spacing = drc["{0}_to_{0}".format(self.route_layer)]
|
||||
start = vector(start_pin, -1.5*spacing)
|
||||
end = vector(end_pin, -1.5*spacing)
|
||||
start = vector(start_pin, -2*spacing)
|
||||
end = vector(end_pin, -2*spacing)
|
||||
|
||||
self.vdd = self.add_layout_pin_segment_center("vdd", "m1", start, end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user