Uncommented tests that use model delays. Fixed issue in sense amp cin.

This commit is contained in:
Hunter Nichols 2019-08-08 18:26:12 -07:00
parent d273c0eef5
commit 1d22d39667
7 changed files with 14 additions and 8 deletions

View File

@ -110,7 +110,7 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
"""Initializes parameters relevant to the graph creation"""
#Only initializes a set for checking instances which should not be added
self.graph_inst_exclude = set()
def build_graph(self, graph, inst_name, port_nets):
"""Recursively create graph from instances in module."""

View File

@ -247,7 +247,7 @@ class delay(simulation):
def create_graph(self):
"""Creates timing graph to generate the timing paths for the SRAM output."""
self.sram.bank.bitcell_array.init_graph_params() # Removes previous bit exclusions
self.sram.bank.bitcell_array.bitcell_array.init_graph_params() # Removes previous bit exclusions
self.sram.bank.bitcell_array.graph_exclude_bits(self.wordline_row, self.bitline_column)
# Generate new graph every analysis as edges might change depending on test bit
@ -1313,6 +1313,7 @@ class delay(simulation):
for load in loads:
# Calculate delay based on slew and load
path_delays = self.graph.get_timing(bl_path, self.corner, slew, load)
total_delay = self.sum_delays(path_delays)
max_delay = max(max_delay, total_delay.delay)
debug.info(1,'{}, {}, {}, {}'.format(slew,load,total_delay.delay/1e3, total_delay.slew/1e3))

View File

@ -42,7 +42,7 @@ class sense_amp(design.design):
# Default is 8x. Per Samira and Hodges-Jackson book:
# "Column-mux transistors driven by the decoder must be sized for optimal speed"
bitline_pmos_size = 8 #FIXME: This should be set somewhere and referenced. Probably in tech file.
return spice["min_tx_drain_c"]*(bitline_pmos_size/parameter["min_tx_size"])#ff
return spice["min_tx_drain_c"]*(bitline_pmos_size)#ff
def get_stage_effort(self, load):
#Delay of the sense amp will depend on the size of the amp and the output load.

View File

@ -15,7 +15,7 @@ from globals import OPTS
from sram_factory import factory
import debug
@unittest.skip("SKIPPING 21_model_delay_test")
# @unittest.skip("SKIPPING 21_model_delay_test")
class model_delay_test(openram_test):
""" Compare the accuracy of the analytical model with a spice simulation. """
@ -51,23 +51,28 @@ class model_delay_test(openram_test):
import tech
loads = [tech.spice["msflop_in_cap"]*4]
slews = [tech.spice["rise_time"]*2]
# Run a spice characterization
spice_data, port_data = d.analyze(probe_address, probe_data, slews, loads)
spice_data.update(port_data[0])
# Run analytical characterization
model_data, port_data = d.analytical_delay(slews, loads)
model_data.update(port_data[0])
#Only compare the delays
# Only compare the delays
spice_delays = {key:value for key, value in spice_data.items() if 'delay' in key}
model_delays = {key:value for key, value in model_data.items() if 'delay' in key}
debug.info(1,"Spice Delays={}".format(spice_delays))
debug.info(1,"Model Delays={}".format(model_delays))
if OPTS.tech_name == "freepdk45":
error_tolerance = 0.25
elif OPTS.tech_name == "scn4m_subm":
error_tolerance = 0.25
else:
self.assertTrue(False) # other techs fail
# Check if no too many or too few results
self.assertTrue(len(spice_delays.keys())==len(model_delays.keys()))

View File

@ -14,7 +14,7 @@ import globals
from globals import OPTS
import debug
@unittest.skip("SKIPPING 23_lib_sram_model_corners_test")
#@unittest.skip("SKIPPING 23_lib_sram_model_corners_test")
class lib_model_corners_lib_test(openram_test):
def runTest(self):

View File

@ -14,7 +14,7 @@ import globals
from globals import OPTS
import debug
@unittest.skip("SKIPPING 23_lib_sram_model_test")
#@unittest.skip("SKIPPING 23_lib_sram_model_test")
class lib_sram_model_test(openram_test):
def runTest(self):

View File

@ -16,7 +16,7 @@ from sram_factory import factory
import debug
import getpass
@unittest.skip("SKIPPING 30_openram_front_end_test")
#@unittest.skip("SKIPPING 30_openram_front_end_test")
class openram_front_end_test(openram_test):
def runTest(self):