From 0ef06ec1e14c07948c54d5012d050988e1ce6f3f Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 10 Feb 2020 20:06:34 +0000 Subject: [PATCH] Fix dff_buf width in netlist_only mode --- compiler/modules/dff_buf_array.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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)