diff --git a/compiler/modules/write_driver_array.py b/compiler/modules/write_driver_array.py index 7f7aa00a..ef87bf6d 100644 --- a/compiler/modules/write_driver_array.py +++ b/compiler/modules/write_driver_array.py @@ -156,7 +156,7 @@ class write_driver_array(design.design): wmask_en_len = (self.write_size * self.driver_spacing) en_gap = self.driver_spacing - en_pin.width() else: - wmask_en_len = 2*(self.write_size * self.driver_spacing) + wmask_en_len = self.words_per_row*(self.write_size * self.driver_spacing) en_gap = self.driver_spacing self.add_layout_pin(text="en_{0}".format(bit), diff --git a/compiler/modules/write_mask_and_array.py b/compiler/modules/write_mask_and_array.py index 753c2dd4..1ff6cb30 100644 --- a/compiler/modules/write_mask_and_array.py +++ b/compiler/modules/write_mask_and_array.py @@ -98,7 +98,7 @@ class write_mask_and_array(design.design): if self.driver_spacing * self.write_size < self.and2.width: debug.error("Cannot layout write mask AND array. One pand2 is longer than the corresponding write drivers.") else: - wmask_en_len = 2 * (self.write_size * self.driver_spacing) + wmask_en_len = self.words_per_row * (self.write_size * self.driver_spacing) if wmask_en_len < self.and2.width: debug.error("Cannot layout write mask AND array. One pand2 is longer than the corresponding write drivers.") diff --git a/compiler/tests/18_port_data_wmask_test.py b/compiler/tests/18_port_data_wmask_test.py index abc4f5d0..e89ea77d 100644 --- a/compiler/tests/18_port_data_wmask_test.py +++ b/compiler/tests/18_port_data_wmask_test.py @@ -48,7 +48,6 @@ class port_data_test(openram_test): a = factory.create("port_data", sram_config=c, port=0) self.local_check(a) - c.word_size = 2 c.num_words = 128 c.words_per_row = 8 factory.reset()