From a3195c08272ae08480b6b939e1be93e6148fbfc3 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 13 Jul 2020 12:37:56 -0700 Subject: [PATCH] Add words_per_row and others in config file. --- compiler/openram.py | 5 ++++- compiler/options.py | 3 ++- compiler/sram/sram_config.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/openram.py b/compiler/openram.py index 4989feff..f046fdb1 100755 --- a/compiler/openram.py +++ b/compiler/openram.py @@ -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"] diff --git a/compiler/options.py b/compiler/options.py index d229b96e..d97ea300 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -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 diff --git a/compiler/sram/sram_config.py b/compiler/sram/sram_config.py index 3af2fd9c..fa70d730 100644 --- a/compiler/sram/sram_config.py +++ b/compiler/sram/sram_config.py @@ -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