From eb57c6e7fd4c57b387505b54b9ef76d3a0cff33a Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Tue, 15 Nov 2016 09:36:15 -0800 Subject: [PATCH] Fix arg parsing order in openram.py --- compiler/openram.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/openram.py b/compiler/openram.py index ba344262..1bfbb125 100755 --- a/compiler/openram.py +++ b/compiler/openram.py @@ -22,6 +22,10 @@ import re import importlib import globals +global OPTS + +(OPTS, args) = globals.parse_args() + # These depend on arguments, so don't load them until now. import debug @@ -30,11 +34,11 @@ if len(args) < 1: print globals.USAGE sys.exit(2) -globals.init_openram(args[0]) - if OPTS.print_banner: print globals.BANNER +globals.init_openram(args[0]) + # Check if all arguments are integers for bits, size, banks if type(OPTS.config.word_size)!=int: debug.error("{0} is not an integer in config file.".format(OPTS.config.word_size))