mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-08 04:11:47 +02:00
Merge branch 'dev' of https://github.com/VLSIDA/PrivateRAM into dev
This commit is contained in:
@@ -43,6 +43,9 @@ class pgate(design.design):
|
||||
self.route_layer_space = getattr(self, "{}_space".format(self.route_layer))
|
||||
self.route_layer_pitch = getattr(self, "{}_pitch".format(self.route_layer))
|
||||
|
||||
# hack for enclosing input pin with npc
|
||||
self.input_pin_vias = []
|
||||
|
||||
# This is the space from a S/D contact to the supply rail
|
||||
contact_to_vdd_rail_space = 0.5 * self.route_layer_width + self.route_layer_space
|
||||
# This is a poly-to-poly of a flipped cell
|
||||
@@ -132,6 +135,8 @@ class pgate(design.design):
|
||||
offset=contact_offset,
|
||||
directions=directions)
|
||||
|
||||
self.input_pin_vias.append(via)
|
||||
|
||||
self.add_layout_pin_rect_center(text=name,
|
||||
layer=self.route_layer,
|
||||
offset=contact_offset,
|
||||
@@ -146,11 +151,33 @@ class pgate(design.design):
|
||||
height=contact.poly_contact.first_layer_width,
|
||||
width=left_gate_offset.x - contact_offset.x)
|
||||
|
||||
def enclose_npc(self):
|
||||
""" Enclose the poly contacts with npc layer """
|
||||
ll = None
|
||||
ur = None
|
||||
for via in self.input_pin_vias:
|
||||
# Find ll/ur
|
||||
if not ll:
|
||||
ll = via.ll()
|
||||
else:
|
||||
ll = ll.min(via.ll())
|
||||
if not ur:
|
||||
ur = via.ur()
|
||||
else:
|
||||
ur = ur.max(via.ur())
|
||||
|
||||
npc_enclose_poly = drc("npc_enclose_poly")
|
||||
npc_enclose_offset = vector(npc_enclose_poly, npc_enclose_poly)
|
||||
self.add_rect(layer="npc",
|
||||
offset=ll - npc_enclose_offset,
|
||||
width=(ur.x - ll.x) + 2 * npc_enclose_poly,
|
||||
height=(ur.y - ll.y) + 2 * npc_enclose_poly)
|
||||
|
||||
def extend_wells(self):
|
||||
""" Extend the n/p wells to cover whole cell """
|
||||
|
||||
# This should match the cells in the cell library
|
||||
self.nwell_y_offset = 0.48 * self.height
|
||||
self.nwell_yoffset = 0.48 * self.height
|
||||
full_height = self.height + 0.5 * self.m1_width
|
||||
|
||||
# FIXME: float rounding problem
|
||||
@@ -158,8 +185,8 @@ class pgate(design.design):
|
||||
# Add a rail width to extend the well to the top of the rail
|
||||
nwell_max_offset = max(self.find_highest_layer_coords("nwell").y,
|
||||
full_height)
|
||||
nwell_position = vector(0, self.nwell_y_offset) - vector(self.well_extend_active, 0)
|
||||
nwell_height = nwell_max_offset - self.nwell_y_offset
|
||||
nwell_position = vector(0, self.nwell_yoffset) - vector(self.well_extend_active, 0)
|
||||
nwell_height = nwell_max_offset - self.nwell_yoffset
|
||||
self.add_rect(layer="nwell",
|
||||
offset=nwell_position,
|
||||
width=self.width + 2 * self.well_extend_active,
|
||||
@@ -175,7 +202,7 @@ class pgate(design.design):
|
||||
pwell_min_offset = min(self.find_lowest_layer_coords("pwell").y,
|
||||
-0.5 * self.m1_width)
|
||||
pwell_position = vector(-self.well_extend_active, pwell_min_offset)
|
||||
pwell_height = self.nwell_y_offset - pwell_position.y
|
||||
pwell_height = self.nwell_yoffset - pwell_position.y
|
||||
self.add_rect(layer="pwell",
|
||||
offset=pwell_position,
|
||||
width=self.width + 2 * self.well_extend_active,
|
||||
|
||||
Reference in New Issue
Block a user