aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackkoenig2015-11-02 12:14:21 -0800
committerjackkoenig2015-11-02 12:14:21 -0800
commitd477d636b78875a0742af44f5f0372e380c36b46 (patch)
tree14a3f140a4b6fa0abf55dc58443f516bed39ec47 /src
parentd715e65b8de4823621b072065b746730d712d2a4 (diff)
Deleted extranous passes.stanza comments, updated standard passes. Added support for -b <backend> flag without any other specified passes in stanza, updated parser tests to work with stanza implementation.
Diffstat (limited to 'src')
-rw-r--r--src/main/stanza/firrtl-test-main.stanza6
-rw-r--r--src/main/stanza/passes.stanza68
2 files changed, 24 insertions, 50 deletions
diff --git a/src/main/stanza/firrtl-test-main.stanza b/src/main/stanza/firrtl-test-main.stanza
index 3220ee87..2f8e84d5 100644
--- a/src/main/stanza/firrtl-test-main.stanza
+++ b/src/main/stanza/firrtl-test-main.stanza
@@ -62,7 +62,7 @@ defn main () :
val pass-args = Vector<String>()
var printvars = ""
var last-s = ""
- var backend = ""
+ var backend = false
val prev-out = CURRENT-OUTPUT-STREAM
CURRENT-OUTPUT-STREAM = STANDARD-ERROR
@@ -106,8 +106,8 @@ defn main () :
CURRENT-OUTPUT-STREAM = prev-stream
close(out-stream)
- if compiler == false and length(pass-names) == 0 :
- error("Must specify a compiler. Use -X flag.")
+ if compiler == false and backend == false and length(pass-names) == 0 :
+ error("Must specify a compiler or a backend. Use -X flag or -b flag.")
val lexed = lex-file(input as String)
val circuit = parse-firrtl(lexed)
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza
index b9e53bc5..e31b30a9 100644
--- a/src/main/stanza/passes.stanza
+++ b/src/main/stanza/passes.stanza
@@ -12,56 +12,30 @@ defpackage firrtl/passes :
;============== Pass List ================
public val standard-passes = to-list $ [
- RemoveSpecialChars() ;R
- ;RemoveScopes() ;R
- CheckHighForm() ;R
- TempElimination() ;R
- ToWorkingIR() ;R -> W
- ResolveKinds() ;W
- InferTypes() ;R
- ResolveGenders() ;W
- CheckGenders() ;W
- CheckKinds() ;W
- CheckTypes() ;R
- ExpandAccessors() ;W
- LowerToGround() ;W
- ;ExpandIndexedConnects() ;W
+ RemoveSpecialChars()
+ CheckHighForm()
+ TempElimination()
+ ToWorkingIR()
+ ResolveKinds()
+ InferTypes()
+ ResolveGenders()
+ CheckGenders()
+ CheckKinds()
+ CheckTypes()
+ ExpandAccessors()
+ LowerToGround()
InlineIndexed()
- InferTypes() ;R
- CheckGenders() ;W
- ExpandWhens() ;W
- InferWidths() ;R
- ToRealIR() ;W -> R
- CheckWidths() ;R
- Pad() ;R
- ConstProp() ;R
- SplitExp() ;R
- CheckWidths() ;R
- CheckHighForm() ;R
- CheckLowForm() ;R
- CheckInitialization() ;R
+ ExpandWhens()
+ InferWidths()
+ ToRealIR()
+ CheckWidths()
+ Pad()
+ ConstProp()
+ SplitExp()
+ CheckLowForm()
+ CheckInitialization()
]
- ;CheckHighForm()
- ;TempElimination()
- ;ToWorkingIR()
- ;ResolveKinds()
- ;CheckKinds()
- ;InferTypes()
- ;CheckTypes()
- ;ResolveGenders()
- ;CheckGenders()
- ;ExpandAccessors()
- ;LowerToGround()
- ;;ExpandIndexedConnects()
- ;InlineIndexed()
- ;ExpandWhens()
- ;InferWidths()
- ;Inline()
- ;SplitExp()
- ;CheckLowForm()
- ;ToRealIR()
- ;Pad() ]
;=============== WORKING IR ================================
public definterface Kind
public defstruct WireKind <: Kind