Add words_per_row and others in config file.

This commit is contained in:
mrg 2020-07-13 12:37:56 -07:00
parent a989ea63a0
commit a3195c0827
3 changed files with 7 additions and 3 deletions

View File

@ -54,7 +54,10 @@ from sram_config import sram_config
c = sram_config(word_size=OPTS.word_size,
num_words=OPTS.num_words,
write_size=OPTS.write_size,
num_spare_rows=OPTS.num_spare_rows)
num_banks=OPTS.num_banks,
words_per_row=OPTS.words_per_row,
num_spare_rows=OPTS.num_spare_rows,
num_spare_cols=OPTS.num_spare_cols)
debug.print_raw("Words per row: {}".format(c.words_per_row))
output_extensions = ["lvs", "sp", "v", "lib", "py", "html", "log"]

View File

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

View File

@ -14,7 +14,7 @@ from sram_factory import factory
class sram_config:
""" This is a structure that is used to hold the SRAM configuration options. """
def __init__(self, word_size, num_words, write_size = None, num_banks=1, words_per_row=None, num_spare_rows=0, num_spare_cols=None):
def __init__(self, word_size, num_words, write_size = None, num_banks=1, words_per_row=None, num_spare_rows=0, num_spare_cols=0):
self.word_size = word_size
self.num_words = num_words
self.write_size = write_size