# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California # All rights reserved. # import design from sram_factory import factory from globals import OPTS from tech import cell_properties class s8_col_cap_array(design.design): """ Generate a dummy row/column for the replica array. """ def __init__(self, rows, cols, location, column_offset=0, mirror=0, name=""): super().__init__(name) self.rows = rows self.cols = cols self.location = location self.column_offset = column_offset self.mirror = mirror self.no_instances = True self.all_wordline_names = [] self.create_netlist() if not OPTS.netlist_only: self.create_layout() def create_netlist(self): """ Create and connect the netlist """ self.add_modules() self.add_pins() self.create_instances() def create_layout(self): self.place_array("col_cap_r{0}_c{1}", self.mirror) self.add_layout_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="s8_col_end", version = "colend") self.add_mod(self.colend1) self.colend2 = factory.create(module_type="s8_col_end", version = "colend_p_cent") self.add_mod(self.colend2) elif self.location == "bottom": self.colend1 = factory.create(module_type="s8_col_end", version = "colenda") self.add_mod(self.colend1) self.colend2 = factory.create(module_type="s8_col_end", version = "colenda_p_cent") self.add_mod(self.colend2) self.cell = factory.create(module_type="s8_bitcell", version = "opt1") def create_instances(self): """ Create the module instances used in this design """ self.cell_inst = {} self.array_layout = [] alternate_bitcell = 0 for col in range((self.cols * 2 )-1): row_layout = [] name="rca_{0}".format(col) # Top/bottom cell are always dummy cells. # Regular array cells are replica cells (>left_rbl and