diff --git a/compiler/characterizer/delay.py b/compiler/characterizer/delay.py index 59633a5b..cec1d49a 100644 --- a/compiler/characterizer/delay.py +++ b/compiler/characterizer/delay.py @@ -1130,15 +1130,17 @@ class delay(simulation): Netlist reduced for simulation. """ super().set_probe(probe_address, probe_data) - self.prepare_netlist() def prepare_netlist(self): """ Prepare a trimmed netlist and regular netlist. """ # Set up to trim the netlist here if that is enabled + # TODO: Copy old netlist if memchar if OPTS.trim_netlist: self.trim_sp_file = "{0}trimmed.sp".format(self.output_path) - self.sram.sp_write(self.trim_sp_file, lvs=False, trim=True) + # Only genrate spice when running openram process + if OPTS.top_process == "openram": + self.sram.sp_write(self.trim_sp_file, lvs=False, trim=True) else: # The non-reduced netlist file when it is disabled self.trim_sp_file = "{0}sram.sp".format(self.output_path) @@ -1153,6 +1155,7 @@ class delay(simulation): """Sets values which are dependent on the data address/bit being tested.""" self.set_probe(probe_address, probe_data) + self.prepare_netlist() self.create_graph() self.set_internal_spice_names() self.create_measurement_names() diff --git a/compiler/characterizer/fake_sram.py b/compiler/characterizer/fake_sram.py index 44c98606..1799fc82 100644 --- a/compiler/characterizer/fake_sram.py +++ b/compiler/characterizer/fake_sram.py @@ -10,44 +10,9 @@ class fake_sram(sram_config): """ def __init__(self, name, word_size, num_words, write_size=None, num_banks=1, words_per_row=None, num_spare_rows=0, num_spare_cols=0): - self.name = name - self.word_size = word_size - self.num_words = num_words - # Don't add a write mask if it is the same size as the data word - if write_size and write_size==word_size: - self.write_size = None - else: - self.write_size = write_size - self.num_banks = num_banks - self.num_spare_rows = num_spare_rows - self.num_spare_cols = num_spare_cols - - try: - from tech import array_row_multiple - self.array_row_multiple = array_row_multiple - except ImportError: - self.array_row_multiple = 1 - try: - from tech import array_col_multiple - self.array_col_multiple = array_col_multiple - except ImportError: - self.array_col_multiple = 1 - - if self.write_size: - self.num_wmasks = int(ceil(self.word_size / self.write_size)) - else: - self.num_wmasks = 0 - - if not self.num_spare_cols: - self.num_spare_cols = 0 - - if not self.num_spare_rows: - self.num_spare_rows = 0 - - # This will get over-written when we determine the organization - self.words_per_row = words_per_row - - self.compute_sizes() + sram_config.__init__(self, name, word_size, num_words, write_size=None, + num_banks=1, words_per_row=None, num_spare_rows=0, + num_spare_cols=0) def setup_multiport_constants(self): """