Fixed method of determining inverter number.

This commit is contained in:
Jennifer Eve Sowash 2018-12-07 10:19:18 -08:00
parent 653ab3eda4
commit a24e5229cb
1 changed files with 3 additions and 6 deletions

View File

@ -48,11 +48,8 @@ class pdriver(pgate.pgate):
self.num_inv = len(self.size_list) self.num_inv = len(self.size_list)
else: else:
# find the number of stages # find the number of stages
c_prev = int(round(self.c_load/self.stage_effort)) #c_load is a unit inverter fanout, not a capacitance so c_in=1
num_stages = 1 num_stages = int(round(log(self.c_load)/log(4)))
while c_prev > 1: #stop when the first stage is 1
c_prev = int(round(c_prev/self.stage_effort))
num_stages+=1
# find inv_num and compute sizes # find inv_num and compute sizes
if self.neg_polarity: if self.neg_polarity: