Changed delay calculation to include wire resistance and wire capacitance. Added bitline r and c values.

This commit is contained in:
Hunter Nichols 2021-08-01 19:25:54 -07:00
parent 1b89533d7b
commit b44f840814
3 changed files with 38 additions and 5 deletions

View File

@ -425,8 +425,11 @@ class spice():
rd = self.get_on_resistance()
# Calculate the 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
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)
inrisetime = this_delay / (1.0 - 0.5)
return delay_data(this_delay, inrisetime)
@ -449,6 +452,18 @@ class spice():
corner_slew = SLEW_APPROXIMATION * corner_delay
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):
"""Inform users undefined delay module while building new modules"""
debug.warning("Design Class {0} logical effort function needs to be defined"

View File

@ -10,7 +10,7 @@ import debug
import design
from globals import OPTS
import logical_effort
from tech import parameter, drc, layer
from tech import parameter, drc, layer, spice
class bitcell_base(design.design):
@ -232,4 +232,22 @@ class bitcell_base(design.design):
bl_nmos_drain_c = self.drain_c_(parameter["6T_access_size"],
stack,
mult)
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"]

View File

@ -566,6 +566,6 @@ class ptx(design.design):
def get_intrinsic_capacitance(self):
"""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,
self.mults)