mirror of https://github.com/VLSIDA/OpenRAM.git
Fix buggy analytical delay in pdriver
This commit is contained in:
parent
be7384c017
commit
beceb3fb60
|
|
@ -203,22 +203,28 @@ class pdriver(pgate.pgate):
|
||||||
width = a_pin.width(),
|
width = a_pin.width(),
|
||||||
height = a_pin.height())
|
height = a_pin.height())
|
||||||
|
|
||||||
|
def input_load(self):
|
||||||
|
return self.inv_list[0].input_load()
|
||||||
|
|
||||||
def analytical_delay(self, slew, load=0.0):
|
def analytical_delay(self, slew, load=0.0):
|
||||||
"""Calculate the analytical delay of INV1 -> ... -> INVn"""
|
"""Calculate the analytical delay of INV1 -> ... -> INVn"""
|
||||||
delay = 0;
|
|
||||||
if len(self.inv_inst_list) == 1:
|
cout_list = []
|
||||||
delay = self.inv_inst_list[x].analytical_delay(slew=slew);
|
for prev_inv,inv in zip(self.inv_list, self.inv_list[1:]):
|
||||||
else:
|
cout_list.append(inv.input_load())
|
||||||
for x in range(len(self.inv_inst_list-1)):
|
cout_list.append(load)
|
||||||
load_next = 0.0
|
|
||||||
for n in range(x,len(self.inv_inst_list+1)):
|
input_slew = slew
|
||||||
load_next += self.inv_inst_list[x+1]
|
|
||||||
if x == 1:
|
delays = []
|
||||||
delay += self.inv_inst_list[x].analytical_delay(slew=slew,
|
for inv,cout in zip(self.inv_list,cout_list):
|
||||||
load=load_next)
|
delays.append(inv.analytical_delay(slew=input_slew, load=cout))
|
||||||
else:
|
input_slew = delays[-1].slew
|
||||||
delay += self.inv_inst_list[x+1].analytical_delay(slew=delay.slew,
|
|
||||||
load=load_next)
|
delay = delays[0]
|
||||||
|
for i in range(len(delays)-1):
|
||||||
|
delay += delays[i]
|
||||||
|
|
||||||
return delay
|
return delay
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue