From 46889884344a97eb753957fb75392f1e65c28877 Mon Sep 17 00:00:00 2001 From: Jesse Cirimelli-Low Date: Fri, 18 Jun 2021 17:46:39 -0700 Subject: [PATCH] only check dimensions on single port --- compiler/sram/sram_config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/sram/sram_config.py b/compiler/sram/sram_config.py index 640b2a8d..a5948cb2 100644 --- a/compiler/sram/sram_config.py +++ b/compiler/sram/sram_config.py @@ -99,12 +99,13 @@ class sram_config: + " Bank addr size: {}".format(self.bank_addr_size)) num_ports = OPTS.num_rw_ports + OPTS.num_w_ports + OPTS.num_w_ports - if ((self.num_cols + num_ports + self.num_spare_cols) % array_col_multiple != 0): - debug.error("Invalid number of cols including rbl(s): {}. Total cols must be divisible by {}".format(self.num_cols + num_ports + self.num_spare_cols, array_col_multiple), -1) + if num_ports == 1: + if ((self.num_cols + num_ports + self.num_spare_cols) % array_col_multiple != 0): + debug.error("Invalid number of cols including rbl(s): {}. Total cols must be divisible by {}".format(self.num_cols + num_ports + self.num_spare_cols, array_col_multiple), -1) - if ((self.num_rows + num_ports) % array_row_multiple != 0): - debug.error("invalid number of rows including dummy row(s): {}. Total cols must be divisible by {}".format(self.num_rows + num_ports, array_row_multiple), -1) - + if ((self.num_rows + num_ports) % array_row_multiple != 0): + debug.error("invalid number of rows including dummy row(s): {}. Total cols must be divisible by {}".format(self.num_rows + num_ports, array_row_multiple), -1) + def estimate_words_per_row(self, tentative_num_cols, word_size): """ This provides a heuristic rounded estimate for the number of words