#!/usr/bin/env python3 # See LICENSE for licensing information. # # Copyright (c) 2016-2023 Regents of the University of California # All rights reserved. # from openram.base import geometry from openram.sram_factory import factory from openram.tech import layer from openram import OPTS from .sky130_bitcell_base_array import sky130_bitcell_base_array class sky130_col_cap_array(sky130_bitcell_base_array): """ Generate a dummy row/column for the replica array. """ def __init__(self, rows, cols, location, column_offset=0, mirror=0, name=""): # Don't call the regular col-cap_array constructor since we don't want its constructor, just # some of it's useful member functions sky130_bitcell_base_array.__init__(self, rows=rows, cols=cols, column_offset=column_offset, name=name) self.mirror = mirror self.location = location self.rows = rows self.cols = cols self.create_netlist() if not OPTS.netlist_only: self.create_layout() def create_netlist(self): """ Create and connect the netlist """ # This module has no wordlines # self.create_all_wordline_names() # This module has no bitlines # self.create_all_bitline_names() self.add_modules() self.create_all_wordline_names() self.add_pins() self.create_instances() def create_layout(self): self.place_array("dummy_r{0}_c{1}", self.mirror) self.add_layout_pins() self.add_supply_pins() self.add_boundary() self.DRC_LVS() def add_modules(self): """ Add the modules used in this design """ if self.location == "top": self.colend1 = factory.create(module_type="col_cap", version="colend") self.colend2 = factory.create(module_type="col_cap", version="colend_p_cent") self.colend3 = factory.create(module_type="col_cap", version="colend_cent") elif self.location == "bottom": self.colend1 = factory.create(module_type="col_cap", version="colenda") self.colend2 = factory.create(module_type="col_cap", version="colenda_p_cent") self.colend3 = factory.create(module_type="col_cap", version="colenda_cent") self.cell = factory.create(module_type=OPTS.bitcell, version="opt1") def create_instances(self): """ Create the module instances used in this design """ self.cell_inst = {} self.array_layout = [] bitline = 0 for col in range((self.column_size * 2) - 1): row_layout = [] name="rca_{0}_{1}".format(self.location, col) # Top/bottom cell are always dummy cells. # Regular array cells are replica cells (>left_rbl and