Add load/slew scale option to config files

This commit is contained in:
mrg 2020-10-16 13:52:36 -07:00
parent 6a1f12b62d
commit 35c91168f7
4 changed files with 30 additions and 14 deletions

View File

@ -44,20 +44,15 @@ class lib:
def prepare_tables(self): def prepare_tables(self):
""" Determine the load/slews if they aren't specified in the config file. """ """ Determine the load/slews if they aren't specified in the config file. """
# These are the parameters to determine the table sizes # These are the parameters to determine the table sizes
#self.load_scales = np.array([0.1, 0.25, 0.5, 1, 2, 4, 8]) self.load_scales = np.array(OPTS.load_scales)
self.load_scales = np.array([0.25, 1, 4])
#self.load_scales = np.array([0.25, 1])
self.load = tech.spice["dff_in_cap"] self.load = tech.spice["dff_in_cap"]
self.loads = self.load_scales*self.load self.loads = self.load_scales * self.load
debug.info(1,"Loads: {0}".format(self.loads)) debug.info(1, "Loads: {0}".format(self.loads))
#self.slew_scales = np.array([0.1, 0.25, 0.5, 1, 2, 4, 8]) self.slew_scales = np.array(OPTS.slew_scales)
self.slew_scales = np.array([0.25, 1, 8]) self.slew = tech.spice["rise_time"]
#self.slew_scales = np.array([0.25, 1]) self.slews = self.slew_scales * self.slew
self.slew = tech.spice["rise_time"] debug.info(1, "Slews: {0}".format(self.slews))
self.slews = self.slew_scales*self.slew
debug.info(1,"Slews: {0}".format(self.slews))
def create_corners(self): def create_corners(self):
""" Create corners for characterization. """ """ Create corners for characterization. """

View File

@ -7,8 +7,11 @@ process_corners = ["TT"]
supply_voltages = [1.0] supply_voltages = [1.0]
temperatures = [25] temperatures = [25]
route_supplies = True route_supplies = False
check_lvsdrc = True check_lvsdrc = True
# nominal_corners_only = True
load_scales = [0.5, 1, 4]
slew_scales = [0.5, 1]
output_path = "temp" output_path = "temp"
output_name = "sram_{0}_{1}_{2}".format(word_size, output_name = "sram_{0}_{1}_{2}".format(word_size,

View File

@ -459,17 +459,33 @@ def set_default_corner():
OPTS.process_corners = ["TT"] OPTS.process_corners = ["TT"]
else: else:
OPTS.process_corners = tech.spice["fet_models"].keys() OPTS.process_corners = tech.spice["fet_models"].keys()
if (OPTS.supply_voltages == ""): if (OPTS.supply_voltages == ""):
if OPTS.nominal_corner_only: if OPTS.nominal_corner_only:
OPTS.supply_voltages = [tech.spice["supply_voltages"][1]] OPTS.supply_voltages = [tech.spice["supply_voltages"][1]]
else: else:
OPTS.supply_voltages = tech.spice["supply_voltages"] OPTS.supply_voltages = tech.spice["supply_voltages"]
if (OPTS.temperatures == ""): if (OPTS.temperatures == ""):
if OPTS.nominal_corner_only: if OPTS.nominal_corner_only:
OPTS.temperatures = [tech.spice["temperatures"][1]] OPTS.temperatures = [tech.spice["temperatures"][1]]
else: else:
OPTS.temperatures = tech.spice["temperatures"] OPTS.temperatures = tech.spice["temperatures"]
# Load scales are fanout multiples of the DFF input cap
if (OPTS.load_scales == ""):
if OPTS.nominal_corner_only:
OPTS.load_scales = [4]
else:
OPTS.load_scales = [0.25, 1, 4]
# Load scales are fanout multiples of the default spice input slew
if (OPTS.slew_scales == ""):
if OPTS.nominal_corner_only:
OPTS.slew_scales = [1]
else:
OPTS.slew_scales = [0.25, 1, 4]
def import_tech(): def import_tech():
""" Dynamically adds the tech directory to the path and imports it. """ """ Dynamically adds the tech directory to the path and imports it. """

View File

@ -42,6 +42,8 @@ class options(optparse.Values):
supply_voltages = "" supply_voltages = ""
temperatures = "" temperatures = ""
process_corners = "" process_corners = ""
load_scales = ""
slew_scales = ""
# Size parameters must be specified by user in config file. # Size parameters must be specified by user in config file.
# num_words = 0 # num_words = 0