Fix arg parsing order in openram.py

This commit is contained in:
Matt Guthaus 2016-11-15 09:36:15 -08:00
parent d1f6f205c0
commit eb57c6e7fd
1 changed files with 6 additions and 2 deletions

View File

@ -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))