From ddf5148fa5c424af74e93d76a9349e4e0684cea5 Mon Sep 17 00:00:00 2001 From: jsowash Date: Mon, 22 Jul 2019 14:58:43 -0700 Subject: [PATCH] Removed code where if there was no write mask, word_size=write_size. Now it stays None. --- compiler/globals.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/compiler/globals.py b/compiler/globals.py index 4f6398e4..ac7bf9e8 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -464,18 +464,16 @@ def report_status(): debug.error("{0} is not an integer in config file.".format(OPTS.word_size)) if type(OPTS.num_words)!=int: debug.error("{0} is not an integer in config file.".format(OPTS.sram_size)) - if type(OPTS.write_size) != int and OPTS.write_size != None: + if type(OPTS.write_size) is not int and OPTS.write_size is not None: debug.error("{0} is not an integer in config file.".format(OPTS.write_size)) - # Determine if a write mask is specified by the user; if it's not, the mask write size should - # be the same as the word size so that an entire word is written at once - if OPTS.write_size==None: - OPTS.write_size = OPTS.word_size - - if (OPTS.write_size < 1 or OPTS.write_size > OPTS.word_size): - debug.error("Write size needs to be between 1 bit and {0} bits.".format(OPTS.word_size)) - if (OPTS.word_size % OPTS.write_size != 0): - debug.error("Write size needs to be an integer multiple of word size.") + # If a write mask is specified by the user, the mask write size should be the same as + # the word size so that an entire word is written at once. + if OPTS.write_size is not None: + if (OPTS.write_size < 1 or OPTS.write_size > OPTS.word_size): + debug.error("Write size needs to be between 1 bit and {0} bits.".format(OPTS.word_size)) + if (OPTS.word_size % OPTS.write_size != 0): + debug.error("Write size needs to be an integer multiple of word size.") if not OPTS.tech_name: debug.error("Tech name must be specified in config file.")