From 0d6d707315916dab363dd903ee1d98d388568f9f Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 9 Jul 2021 12:31:35 -0700 Subject: [PATCH] Reset write_size to none when it is the same as data word width --- compiler/sram/sram_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/sram/sram_config.py b/compiler/sram/sram_config.py index 2c81ba0f..d28f28a8 100644 --- a/compiler/sram/sram_config.py +++ b/compiler/sram/sram_config.py @@ -17,7 +17,11 @@ class sram_config: 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 + # Don't add a write mask if it is the same size as the data word + if write_size and write_size==word_size: + self.write_size = None + else: + self.write_size = write_size self.num_banks = num_banks self.num_spare_rows = num_spare_rows self.num_spare_cols = num_spare_cols