Moved SRAM macro in LEF file to origin and removed poly.

This commit is contained in:
jsowash 2019-09-04 16:11:12 -07:00
parent fbecb9bc02
commit febc053587
2 changed files with 9 additions and 4 deletions

View File

@ -55,6 +55,9 @@ class lef:
self.lef.write("{0}MACRO {1}\n".format(self.indent,self.name)) self.lef.write("{0}MACRO {1}\n".format(self.indent,self.name))
self.indent += " " self.indent += " "
self.lef.write("{0}CLASS BLOCK ;\n".format(self.indent)) self.lef.write("{0}CLASS BLOCK ;\n".format(self.indent))
self.lef.write("{0}ORIGIN {1} {2} ;\n".format(self.indent,
round(self.origin_offset[0], self.round_grid),
round(self.origin_offset[1], self.round_grid)))
self.lef.write("{0}SIZE {1} BY {2} ;\n" .format(self.indent, self.lef.write("{0}SIZE {1} BY {2} ;\n" .format(self.indent,
round(self.width,self.round_grid), round(self.width,self.round_grid),
round(self.height,self.round_grid))) round(self.height,self.round_grid)))

View File

@ -27,7 +27,7 @@ class sram_base(design, verilog, lef):
""" """
def __init__(self, name, sram_config): def __init__(self, name, sram_config):
design.__init__(self, name) design.__init__(self, name)
lef.__init__(self, ["metal1", "metal2", "metal3", "metal4","poly"]) lef.__init__(self, ["metal1", "metal2", "metal3", "metal4"])
verilog.__init__(self) verilog.__init__(self)
self.sram_config = sram_config self.sram_config = sram_config
@ -36,7 +36,7 @@ class sram_base(design, verilog, lef):
self.bank_insts = [] self.bank_insts = []
if self.write_size: if self.write_size:
self.num_wmasks = int(self.word_size/self.write_size) self.num_wmasks =nt(self.word_size/self.write_size)
else: else:
self.num_wmasks = 0 self.num_wmasks = 0
@ -123,8 +123,10 @@ class sram_base(design, verilog, lef):
#self.offset_all_coordinates() #self.offset_all_coordinates()
highest_coord = self.find_highest_coords() highest_coord = self.find_highest_coords()
self.width = highest_coord[0] lowest_coord = self.find_lowest_coords()
self.height = highest_coord[1] self.width = highest_coord[0] - lowest_coord[0]
self.height = highest_coord[1] -lowest_coord[1]
self.origin_offset = vector(- lowest_coord[0], - lowest_coord[1])
start_time = datetime.now() start_time = datetime.now()
# We only enable final verification if we have routed the design # We only enable final verification if we have routed the design