mirror of https://github.com/VLSIDA/OpenRAM.git
Changed delay calculation to include wire resistance and wire capacitance. Added bitline r and c values.
This commit is contained in:
parent
1b89533d7b
commit
b44f840814
|
|
@ -425,8 +425,11 @@ class spice():
|
||||||
rd = self.get_on_resistance()
|
rd = self.get_on_resistance()
|
||||||
# Calculate the intrinsic capacitance
|
# Calculate the intrinsic capacitance
|
||||||
c_intrinsic = self.get_intrinsic_capacitance()
|
c_intrinsic = self.get_intrinsic_capacitance()
|
||||||
|
# Get wire values
|
||||||
|
c_wire = self.module_wire_c()
|
||||||
|
r_wire = self.module_wire_r()
|
||||||
# Calculate tau with provided output load then calc delay
|
# Calculate tau with provided output load then calc delay
|
||||||
tf = rd*(c_intrinsic+c_load)
|
tf = rd*(c_intrinsic+c_load+c_wire)+r_wire*(c_load+c_load/2)
|
||||||
this_delay = self.horowitz(inrisetime, tf, 0.5, 0.5, True)
|
this_delay = self.horowitz(inrisetime, tf, 0.5, 0.5, True)
|
||||||
inrisetime = this_delay / (1.0 - 0.5)
|
inrisetime = this_delay / (1.0 - 0.5)
|
||||||
return delay_data(this_delay, inrisetime)
|
return delay_data(this_delay, inrisetime)
|
||||||
|
|
@ -449,6 +452,18 @@ class spice():
|
||||||
corner_slew = SLEW_APPROXIMATION * corner_delay
|
corner_slew = SLEW_APPROXIMATION * corner_delay
|
||||||
return delay_data(corner_delay, corner_slew)
|
return delay_data(corner_delay, corner_slew)
|
||||||
|
|
||||||
|
def module_wire_c(self):
|
||||||
|
"""All devices assumed to have ideal capacitance (0).
|
||||||
|
Non-ideal cases should have this function re-defined.
|
||||||
|
"""
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def module_wire_r(self):
|
||||||
|
"""All devices assumed to have ideal resistance (0).
|
||||||
|
Non-ideal cases should have this function re-defined.
|
||||||
|
"""
|
||||||
|
return 0
|
||||||
|
|
||||||
def get_stage_effort(self, cout, inp_is_rise=True):
|
def get_stage_effort(self, cout, inp_is_rise=True):
|
||||||
"""Inform users undefined delay module while building new modules"""
|
"""Inform users undefined delay module while building new modules"""
|
||||||
debug.warning("Design Class {0} logical effort function needs to be defined"
|
debug.warning("Design Class {0} logical effort function needs to be defined"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import debug
|
||||||
import design
|
import design
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import logical_effort
|
import logical_effort
|
||||||
from tech import parameter, drc, layer
|
from tech import parameter, drc, layer, spice
|
||||||
|
|
||||||
|
|
||||||
class bitcell_base(design.design):
|
class bitcell_base(design.design):
|
||||||
|
|
@ -231,5 +231,23 @@ class bitcell_base(design.design):
|
||||||
|
|
||||||
bl_nmos_drain_c = self.drain_c_(parameter["6T_access_size"],
|
bl_nmos_drain_c = self.drain_c_(parameter["6T_access_size"],
|
||||||
stack,
|
stack,
|
||||||
mult)
|
mult)
|
||||||
return nmos_drain_c + pmos_drain_c + bl_nmos_drain_c
|
|
||||||
|
return nmos_drain_c + pmos_drain_c + bl_nmos_drain_c
|
||||||
|
|
||||||
|
def module_wire_c(self):
|
||||||
|
"""Capacitance of bitline"""
|
||||||
|
# FIXME: entire bitline cap is calculated here because of the current
|
||||||
|
# graph implementation so array dims are all re-calculated here. May
|
||||||
|
# be incorrect if dim calculations change
|
||||||
|
cells_in_col = OPTS.num_words/OPTS.words_per_row
|
||||||
|
return cells_in_col*self.height*spice["wire_c_per_um"]
|
||||||
|
|
||||||
|
def module_wire_r(self):
|
||||||
|
"""Resistance of bitline"""
|
||||||
|
# FIXME: entire bitline r is calculated here because of the current
|
||||||
|
# graph implementation so array dims are all re-calculated. May
|
||||||
|
# be incorrect if dim calculations change
|
||||||
|
cells_in_col = OPTS.num_words/OPTS.words_per_row
|
||||||
|
return cells_in_col*self.height*spice["wire_r_per_um"]
|
||||||
|
|
||||||
|
|
@ -566,6 +566,6 @@ class ptx(design.design):
|
||||||
|
|
||||||
def get_intrinsic_capacitance(self):
|
def get_intrinsic_capacitance(self):
|
||||||
"""Get the drain capacitances of the TXs in the gate."""
|
"""Get the drain capacitances of the TXs in the gate."""
|
||||||
return self.drain_c_(self.tx_width*self.tx_mults,
|
return self.drain_c_(self.tx_width*self.mults,
|
||||||
1,
|
1,
|
||||||
self.mults)
|
self.mults)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue