From a18071a4ff38fd4c4ecb296820cc786ae9130bfc Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 25 Feb 2019 10:07:05 -0800 Subject: [PATCH] Add warning for large memory sizes --- compiler/globals.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/globals.py b/compiler/globals.py index f162edda..a39066fb 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -417,7 +417,10 @@ def report_status(): debug.error("Tech name must be specified in config file.") debug.print_raw("Technology: {0}".format(OPTS.tech_name)) - debug.print_raw("Total size: {} bits".format(OPTS.word_size*OPTS.num_words*OPTS.num_banks)) + total_size = OPTS.word_size*OPTS.num_words*OPTS.num_banks + debug.print_raw("Total size: {} bits".format(total_size)) + if total_size>=2**15: + debug.warning("Requesting such a large memory size ({0}) will have a large run-time. Consider using multiple smaller banks.") debug.print_raw("Word size: {0}\nWords: {1}\nBanks: {2}".format(OPTS.word_size, OPTS.num_words, OPTS.num_banks))