From 5298af3dffcd0985922a2a8317fa6a67e192a9c0 Mon Sep 17 00:00:00 2001 From: jackbackrack Date: Sat, 18 Apr 2015 13:23:16 -0700 Subject: change to have flo file go to a file --- src/main/stanza/firrtl-test-main.stanza | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/stanza/firrtl-test-main.stanza') diff --git a/src/main/stanza/firrtl-test-main.stanza b/src/main/stanza/firrtl-test-main.stanza index 991f7cf6..ca521ec2 100644 --- a/src/main/stanza/firrtl-test-main.stanza +++ b/src/main/stanza/firrtl-test-main.stanza @@ -28,14 +28,19 @@ defn set-printvars! (p:List) : defn main () : val args = commandline-arguments() - val lexed = lex-file(args[1]) + val pathname = args[1] + val lexed = lex-file(pathname) val c = parse-firrtl(lexed) + val dir = "." ;; could have dir arg + val name = last(split(pathname,'/')) + val basename = split(name,'.')[0] + val outname = string-join([dir "/" basename ".flo"]) if length(args) >= 4 : set-printvars!(to-list(args[3])) if length(args) >= 3 : - run-passes(c,to-list(args[2])) + run-passes(c,to-list(args[2]), outname) else : - run-passes(c,to-list("qabcefghipjklmno")) + run-passes(c,to-list("qabcefghipjklmno"), outname) main() -- cgit v1.2.3