From 033111a5f3d1084968111adadbaddd616026e9c2 Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 19 Nov 2020 10:48:35 -0800 Subject: [PATCH] Default to no hierarchical word lines. --- compiler/modules/bank.py | 5 +---- compiler/modules/port_address.py | 7 +++---- compiler/options.py | 4 ++-- compiler/pgates/wordline_driver.py | 7 +++---- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/compiler/modules/bank.py b/compiler/modules/bank.py index 3bd3a2e9..e0668700 100644 --- a/compiler/modules/bank.py +++ b/compiler/modules/bank.py @@ -375,10 +375,7 @@ class bank(design.design): port=port)) self.add_mod(self.port_address[port]) - try: - local_array_size = OPTS.local_array_size - except AttributeError: - local_array_size = 0 + local_array_size = OPTS.local_array_size if local_array_size > 0: # Find the even multiple that satisfies the fanout with equal sized local arrays diff --git a/compiler/modules/port_address.py b/compiler/modules/port_address.py index 77768605..125f8765 100644 --- a/compiler/modules/port_address.py +++ b/compiler/modules/port_address.py @@ -145,11 +145,10 @@ class port_address(design.design): cols=self.num_cols) self.add_mod(self.wordline_driver_array) - try: - local_array_size = OPTS.local_array_size + local_array_size = OPTS.local_array_size + if local_array_size > 0: driver_size = max(int(self.num_cols / local_array_size), 1) - except AttributeError: - local_array_size = 0 + else: # Defautl to FO4 driver_size = max(int(self.num_cols / 4), 1) diff --git a/compiler/options.py b/compiler/options.py index 5679b79e..2dab8308 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -31,8 +31,8 @@ class options(optparse.Values): num_r_ports = 0 num_w_ports = 0 - # By default, use local arrays with a max fanout of 16 - #local_array_size = 16 + # By default, don't use hierarchical wordline + local_array_size = 0 # Write mask size, default will be overwritten with word_size if not user specified write_size = None diff --git a/compiler/pgates/wordline_driver.py b/compiler/pgates/wordline_driver.py index 4c66d0b1..8e4c5fb8 100644 --- a/compiler/pgates/wordline_driver.py +++ b/compiler/pgates/wordline_driver.py @@ -44,11 +44,10 @@ class wordline_driver(design.design): self.nand = factory.create(module_type="nand2_dec", height=self.height) - try: - local_array_size = OPTS.local_array_size + local_array_size = OPTS.local_array_size + if local_array_size > 0: driver_size = max(int(self.cols / local_array_size), 1) - except AttributeError: - local_array_size = 0 + else: # Defautl to FO4 driver_size = max(int(self.cols / 4), 1)