Fixed errors in extra rows characterization

This commit is contained in:
Aditi Sinha 2020-03-22 20:54:49 +00:00
parent 694ea5c20e
commit a5afbfe0aa
5 changed files with 11 additions and 6 deletions

View File

@ -559,7 +559,10 @@ class lib:
char_results = self.d.analytical_delay(self.slews,self.loads)
self.char_sram_results, self.char_port_results = char_results
else:
probe_address = "1" * self.sram.addr_size
if (self.sram.num_spare_rows == 0):
probe_address = "1" * self.sram.addr_size
else:
probe_address = "0" + "1" * (self.sram.addr_size - 1)
probe_data = self.sram.word_size - 1
char_results = self.d.analyze(probe_address, probe_data, self.slews, self.loads)
self.char_sram_results, self.char_port_results = char_results

View File

@ -76,7 +76,10 @@ d.period = period
# Set the load of outputs and slew of inputs
d.set_load_slew(load,slew)
# Set the probe address/bit
probe_address = "1" * sram.addr_size
if (self.num_spare_rows == 0):
probe_address = "1" * sram.addr_size
else:
probe_address = "0" + ("1" * sram.addr_size - 1)
probe_data = sram.word_size - 1
d.set_probe(probe_address, probe_data)

View File

@ -539,9 +539,7 @@ def report_status():
debug.error("{0} is not an integer in config file.".format(OPTS.sram_size))
if type(OPTS.write_size) is not int and OPTS.write_size is not None:
debug.error("{0} is not an integer in config file.".format(OPTS.write_size))
if type(OPTS.num_spare_rows) is not int and OPT.num_spare_rows is not None:
debug.error("{0} is not an integer in config file.".format(OPTS.num_spare_rows))
# If a write mask is specified by the user, the mask write size should be the same as
# the word size so that an entire word is written at once.
if OPTS.write_size is not None:

View File

@ -44,6 +44,7 @@ class options(optparse.Values):
# word_size = 0
# You can manually specify banks, but it is better to auto-detect it.
num_banks = 1
num_spare_rows = 0
###################
# Optimization options

View File

@ -81,7 +81,7 @@ class sram_config:
self.num_cols = int(self.words_per_row*self.word_size)
self.num_rows_temp = int(self.num_words_per_bank/self.words_per_row)
self.num_rows = self.num_rows_temp + self.num_spare_rows
debug.info(1,"Rows: {} Cols: {}".format(self.num_rows,self.num_cols))
debug.info(1,"Rows: {} Cols: {}".format(self.num_rows_temp,self.num_cols))
# Compute the address and bank sizes
self.row_addr_size = ceil(log(self.num_rows, 2))