Only add bitcells to dummy and replica rows and columns (the perimeter)

This commit is contained in:
mrg 2020-06-28 14:47:54 -07:00
parent 709535f90f
commit 051c8d8697
1 changed files with 18 additions and 38 deletions

View File

@ -9,6 +9,7 @@ import debug
import design import design
from tech import cell_properties from tech import cell_properties
class bitcell_base_array(design.design): class bitcell_base_array(design.design):
""" """
Abstract base class for bitcell-arrays -- bitcell, dummy Abstract base class for bitcell-arrays -- bitcell, dummy
@ -101,30 +102,11 @@ class bitcell_base_array(design.design):
width=self.width, width=self.width,
height=wl_pin.height()) height=wl_pin.height())
# For non-square via stacks, vertical/horizontal direction refers to the stack orientation in 2d space # Copy a vdd/gnd layout pin from every column in the first row
# Default uses prefered directions for each layer; this cell property is only currently used by sky130 tech (03/20)
try:
bitcell_power_pin_directions = cell_properties.bitcell_power_pin_directions
except AttributeError:
bitcell_power_pin_directions = None
# For specific technologies, there is no vdd via within the bitcell. Instead vdd is connect via end caps.
try:
end_caps_enabled = cell_properties.bitcell.end_caps
except AttributeError:
end_caps_enabled = False
# Add vdd/gnd via stacks
if not end_caps_enabled:
for row in range(self.row_size):
for col in range(self.column_size): for col in range(self.column_size):
inst = self.cell_inst[row, col] inst = self.cell_inst[0, col]
for pin_name in ["vdd", "gnd"]: for pin_name in ["vdd", "gnd"]:
for pin in inst.get_pins(pin_name): self.copy_layout_pin(inst, pin_name)
self.add_power_pin(name=pin_name,
loc=pin.center(),
directions=bitcell_power_pin_directions,
start_layer=pin.layer)
def _adjust_x_offset(self, xoffset, col, col_offset): def _adjust_x_offset(self, xoffset, col, col_offset):
tempx = xoffset tempx = xoffset
@ -144,7 +126,6 @@ class bitcell_base_array(design.design):
dir_x = True dir_x = True
return (tempy, dir_x) return (tempy, dir_x)
def place_array(self, name_template, row_offset=0): def place_array(self, name_template, row_offset=0):
# We increase it by a well enclosure so the precharges don't overlap our wells # We increase it by a well enclosure so the precharges don't overlap our wells
self.height = self.row_size * self.cell.height self.height = self.row_size * self.cell.height
@ -156,7 +137,6 @@ class bitcell_base_array(design.design):
tempx, dir_y = self._adjust_x_offset(xoffset, col, self.column_offset) tempx, dir_y = self._adjust_x_offset(xoffset, col, self.column_offset)
for row in range(self.row_size): for row in range(self.row_size):
name = name_template.format(row, col)
tempy, dir_x = self._adjust_y_offset(yoffset, row, row_offset) tempy, dir_x = self._adjust_y_offset(yoffset, row, row_offset)
if dir_x and dir_y: if dir_x and dir_y: