From c0295a2c3dddd2add15c5c6616d52ec134c0995b Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Thu, 6 Dec 2018 13:23:39 -0800 Subject: [PATCH] Rewrite if/else to be correct and more legible. --- compiler/sram_config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler/sram_config.py b/compiler/sram_config.py index 8be1087e..7ef7dd64 100644 --- a/compiler/sram_config.py +++ b/compiler/sram_config.py @@ -87,12 +87,14 @@ class sram_config: if tentative_num_cols < 1.5*word_size: return 1 - elif tentative_num_cols > 3*word_size: - return 4 - elif tentative_num_cols > 6*word_size: - return 8 - else: + elif tentative_num_cols < 3*word_size: return 2 + elif tentative_num_cols < 6*word_size: + return 4 + else: + if tentative_num_cols > 10*word_size: + debug.warning("Reaching column mux size limit. Consider increasing above 8-way.") + return 8 def amend_words_per_row(self,tentative_num_rows, words_per_row): """