diff options
| author | azidar | 2015-04-20 12:08:10 -0700 |
|---|---|---|
| committer | azidar | 2015-04-20 12:08:10 -0700 |
| commit | 7617e33993abf9f6be357e0261755a4736c2e085 (patch) | |
| tree | a8a32a3e0d731b49173f1c6f02056aea20902ada /src/main/stanza/firrtl-test-main.stanza | |
| parent | 130c6676418e85d5d4dd12a0f0845e912eda8c3e (diff) | |
Fixed tests to use new execution arguments. Added and fixed chisel3 bugs
Diffstat (limited to 'src/main/stanza/firrtl-test-main.stanza')
| -rw-r--r-- | src/main/stanza/firrtl-test-main.stanza | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/main/stanza/firrtl-test-main.stanza b/src/main/stanza/firrtl-test-main.stanza index 991f7cf6..54fcb7f9 100644 --- a/src/main/stanza/firrtl-test-main.stanza +++ b/src/main/stanza/firrtl-test-main.stanza @@ -26,16 +26,24 @@ defn set-printvars! (p:List<Char>) : if contains(p,'g') : PRINT-GENDERS = true if contains(p,'c') : PRINT-CIRCUITS = true +;firrtl -i gcd.fir -o gcd.flo -x qabcefghipjklmno -p c defn main () : val args = commandline-arguments() - val lexed = lex-file(args[1]) + var input = false + var output = false + var passes = "qabcefghipjklmno" + var printvars = "" + for (s in args, i in 0 to false) do : + if s == "-i" : input = args[i + 1] + if s == "-o" : output = args[i + 1] + if s == "-x" : passes = args[i + 1] + if s == "-p" : printvars = args[i + 1] + if input == false : error("No input file provided. Use -i flag") + if output == false : error("No output file provided. Use -o flag") + val lexed = lex-file(input as String) val c = parse-firrtl(lexed) - if length(args) >= 4 : - set-printvars!(to-list(args[3])) - if length(args) >= 3 : - run-passes(c,to-list(args[2])) - else : - run-passes(c,to-list("qabcefghipjklmno")) + set-printvars!(to-list(printvars)) + run-passes(c,to-list(passes),output as String) main() |
