diff options
| author | jackbackrack | 2015-04-22 21:14:38 -0700 |
|---|---|---|
| committer | jackbackrack | 2015-04-22 21:14:38 -0700 |
| commit | a60a8951ff54342ee7d57484a535b05daebd3341 (patch) | |
| tree | cd70427839cd42c8b7b7e650e399e8e8880e0ff0 /src/main/stanza/ir-utils.stanza | |
| parent | d1bc615be8e214713d5b13a767b2a8abbeeb173a (diff) | |
| parent | a4f7aa2b81a021f21a49bd4059d051bc0f949880 (diff) | |
merge
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
| -rw-r--r-- | src/main/stanza/ir-utils.stanza | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza index 2df09b8e..86fe56d1 100644 --- a/src/main/stanza/ir-utils.stanza +++ b/src/main/stanza/ir-utils.stanza @@ -150,6 +150,7 @@ defmethod print (o:OutputStream, e:Expression) : (e:ReadPort) : print-all(o, ["ReadPort(" mem(e) ", " index(e) ", " enable(e) ")"]) (e:WritePort) : print-all(o, ["WritePort(" mem(e) ", " index(e) ", " enable(e) ")"]) (e:Register) : print-all(o, ["Register(" value(e) ", " enable(e) ")"]) + (e:Pad) : print-all(o, ["Pad(" value(e) ", " width(e) ")"]) print-debug(o,e) defmethod print (o:OutputStream, c:Stmt) : @@ -246,6 +247,7 @@ defmethod map (f: Expression -> Expression, e:Expression) -> Expression : (e:ReadPort) : ReadPort(f(mem(e)), f(index(e)), type(e), f(enable(e))) (e:WritePort) : WritePort(f(mem(e)), f(index(e)), type(e), f(enable(e))) (e:Register) : Register(type(e),f(value(e)),f(enable(e))) + (e:Pad) : Pad(f(value(e)),width(e),type(e)) (e) : e public defmulti map<?T> (f: Expression -> Expression, c:?T&Stmt) -> T @@ -270,6 +272,7 @@ defmethod map (f: Width -> Width, c:Expression) -> Expression : match(c) : (c:UIntValue) : UIntValue(value(c),f(width(c))) (c:SIntValue) : SIntValue(value(c),f(width(c))) + (c:Pad) : Pad(value(c),f(width(c)),type(c)) (c) : c public defmulti map<?T> (f: Width -> Width, c:?T&Type) -> T @@ -289,6 +292,7 @@ defmethod map (f: Type -> Type, c:Expression) -> Expression : (c:ReadPort) : ReadPort(mem(c),index(c),f(type(c)),enable(c)) (c:WritePort) : WritePort(mem(c),index(c),f(type(c)),enable(c)) (c:Register) : Register(f(type(c)),value(c),enable(c)) + (c:Pad) : Pad(value(c),width(c),f(type(c))) (c) : c public defmulti map<?T> (f: Type -> Type, c:?T&Stmt) -> T |
