diff --git a/compiler/modules/dff_buf_array.py b/compiler/modules/dff_buf_array.py index 67c7522f..4f2140c4 100644 --- a/compiler/modules/dff_buf_array.py +++ b/compiler/modules/dff_buf_array.py @@ -70,11 +70,6 @@ class dff_buf_array(design.design): inv2_size=self.inv2_size) self.add_mod(self.dff) - well_spacing = max(self.nwell_space, - self.pwell_space, - self.pwell_to_nwell) - - self.dff_pitch = self.dff.width + well_spacing + self.well_extend_active def create_dff_array(self): self.dff_insts={} @@ -91,14 +86,21 @@ class dff_buf_array(design.design): "gnd"]) def place_dff_array(self): + + well_spacing = max(self.nwell_space, + self.pwell_space, + self.pwell_to_nwell) + + dff_pitch = self.dff.width + well_spacing + self.well_extend_active + for row in range(self.rows): for col in range(self.columns): name = "Xdff_r{0}_c{1}".format(row,col) if (row % 2 == 0): - base = vector(col*self.dff_pitch,row*self.dff.height) + base = vector(col*dff_pitch,row*self.dff.height) mirror = "R0" else: - base = vector(col*self.dff_pitch,(row+1)*self.dff.height) + base = vector(col*dff_pitch,(row+1)*self.dff.height) mirror = "MX" self.dff_insts[row,col].place(offset=base, mirror=mirror)