Merge branch 'dev' into spmodels

This commit is contained in:
mrg 2020-10-19 14:49:07 -07:00
commit 3d5c73709b
4 changed files with 29 additions and 19 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_scales = np.array([0.25, 1])
self.slew = tech.spice["rise_time"] self.slew = tech.spice["rise_time"]
self.slews = self.slew_scales*self.slew self.slews = self.slew_scales * self.slew
debug.info(1,"Slews: {0}".format(self.slews)) debug.info(1, "Slews: {0}".format(self.slews))
def create_corners(self): def create_corners(self):
""" Create corners for characterization. """ """ Create corners for characterization. """
@ -136,19 +131,19 @@ class lib:
self.write_header() self.write_header()
#Loop over all ports. # Loop over all ports.
for port in self.all_ports: for port in self.all_ports:
#set the read and write port as inputs. # set the read and write port as inputs.
self.write_data_bus(port) self.write_data_bus(port)
self.write_addr_bus(port) self.write_addr_bus(port)
if self.sram.write_size: if self.sram.write_size and port in self.write_ports:
self.write_wmask_bus(port) self.write_wmask_bus(port)
self.write_control_pins(port) #need to split this into sram and port control signals # need to split this into sram and port control signals
self.write_control_pins(port)
self.write_clk_timing_power(port) self.write_clk_timing_power(port)
self.write_footer() self.write_footer()
def write_footer(self): def write_footer(self):
""" Write the footer """ """ Write the footer """
self.lib.write(" }\n") #Closing brace for the cell self.lib.write(" }\n") #Closing brace for the cell

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,27 @@ 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 == ""):
OPTS.load_scales = [0.25, 1, 4]
# Load scales are fanout multiples of the default spice input slew
if (OPTS.slew_scales == ""):
OPTS.slew_scales = [0.25, 1, 8]
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