From febc0535876b0ec481626b010398fc1ebc12721b Mon Sep 17 00:00:00 2001 From: jsowash Date: Wed, 4 Sep 2019 16:11:12 -0700 Subject: [PATCH] Moved SRAM macro in LEF file to origin and removed poly. --- compiler/base/lef.py | 3 +++ compiler/sram/sram_base.py | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/base/lef.py b/compiler/base/lef.py index af539742..e0c79f38 100644 --- a/compiler/base/lef.py +++ b/compiler/base/lef.py @@ -55,6 +55,9 @@ class lef: self.lef.write("{0}MACRO {1}\n".format(self.indent,self.name)) 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, round(self.width,self.round_grid), round(self.height,self.round_grid))) diff --git a/compiler/sram/sram_base.py b/compiler/sram/sram_base.py index 88f5213b..d3636ede 100644 --- a/compiler/sram/sram_base.py +++ b/compiler/sram/sram_base.py @@ -27,7 +27,7 @@ class sram_base(design, verilog, lef): """ def __init__(self, name, sram_config): design.__init__(self, name) - lef.__init__(self, ["metal1", "metal2", "metal3", "metal4","poly"]) + lef.__init__(self, ["metal1", "metal2", "metal3", "metal4"]) verilog.__init__(self) self.sram_config = sram_config @@ -36,7 +36,7 @@ class sram_base(design, verilog, lef): self.bank_insts = [] 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: self.num_wmasks = 0 @@ -123,8 +123,10 @@ class sram_base(design, verilog, lef): #self.offset_all_coordinates() highest_coord = self.find_highest_coords() - self.width = highest_coord[0] - self.height = highest_coord[1] + lowest_coord = self.find_lowest_coords() + 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() # We only enable final verification if we have routed the design