diff options
| author | azidar | 2015-03-12 13:27:38 -0700 |
|---|---|---|
| committer | azidar | 2015-03-12 13:27:38 -0700 |
| commit | f0b8da76b17e568bd51a95ac04e7bad6ce4232c5 (patch) | |
| tree | 5ab17fa935ec15d8ccc705699341ab32a179632a /src/main/stanza/ir-utils.stanza | |
| parent | dbd3a844953fb8630f8b2ca5706c764533b661b0 (diff) | |
Switched bundles from gender to flip
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
| -rw-r--r-- | src/main/stanza/ir-utils.stanza | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza index 47f6154b..546fd6e7 100644 --- a/src/main/stanza/ir-utils.stanza +++ b/src/main/stanza/ir-utils.stanza @@ -8,20 +8,18 @@ defpackage firrtl.ir-utils : public defmulti print-debug (o:OutputStream, e:Expression|Stmt|Type|Element|Port|Field) -> False ;============== PRINTERS =================================== -defmethod print (o:OutputStream, g:Gender) : + +defmethod print (o:OutputStream, d:Flip) : print{o, _} $ - switch {g == _} : - MALE : "male" - FEMALE: "female" - BI-GENDER : "bi" - UNKNOWN-GENDER: "unknown" + switch {d == _} : + DEFAULT : "" + REVERSE: "flip" defmethod print (o:OutputStream, d:Direction) : print{o, _} $ switch {d == _} : INPUT : "input" OUTPUT: "output" - ;UNKNOWN-DIR : "unknown" defmethod print (o:OutputStream, w:Width) : print{o, _} $ @@ -216,7 +214,7 @@ defmethod print (o:OutputStream, t:Type) : print-debug(o,t) defmethod print (o:OutputStream, f:Field) : - print-all(o, [gender(f) " " name(f) " : " type(f)]) + print-all(o, [flip(f) " " name(f) " : " type(f)]) print-debug(o,f) defmethod print (o:OutputStream, p:Port) : @@ -263,7 +261,7 @@ public defn map<?T> (f: Type -> Type, t:?T&Type) -> T : (t:T&BundleType) : BundleType $ for p in fields(t) map : - Field(name(p), gender(p), f(type(p))) + Field(name(p), flip(p), f(type(p))) (t:T&VectorType) : VectorType(f(type(t)), size(t)) (t) : |
