Fix dff_buf width in netlist_only mode

This commit is contained in:
mrg 2020-02-10 20:06:34 +00:00
parent 6bf33a980f
commit 0ef06ec1e1
1 changed files with 9 additions and 7 deletions

View File

@ -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)