diff --git a/compiler/sram/sram.py b/compiler/sram/sram.py index fa7f202f..5273c47a 100644 --- a/compiler/sram/sram.py +++ b/compiler/sram/sram.py @@ -24,12 +24,6 @@ class sram(): sram_config.set_local_config(self) - # FIXME: adjust this to not directly change OPTS. - # Word-around to have values relevant to OPTS be displayed if not directly set. - OPTS.words_per_row = self.words_per_row - debug.info(1, "Changed OPTS wpr={}".format(self.words_per_row)) - debug.info(1, "OPTS wpr={}".format(OPTS.words_per_row)) - # reset the static duplicate name checker for unit tests # in case we create more than one SRAM from design import design diff --git a/compiler/sram/sram_config.py b/compiler/sram/sram_config.py index c2a542b9..b7e3cad4 100644 --- a/compiler/sram/sram_config.py +++ b/compiler/sram/sram_config.py @@ -63,6 +63,11 @@ class sram_config: self.recompute_sizes() + # Set word_per_row in OPTS + OPTS.words_per_row = self.words_per_row + debug.info(1, "Set SRAM Words Per Row={}".format(OPTS.words_per_row)) + + def recompute_sizes(self): """ Calculate the auxiliary values assuming fixed number of words per row.