aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/ir-utils.stanza
diff options
context:
space:
mode:
authorAdam Izraelevitz2015-10-06 14:36:51 -0700
committerAdam Izraelevitz2015-10-06 14:36:51 -0700
commiteb79a51cadcee109c4bcf727762027ba85aba36a (patch)
treea2d52d8697b87b1d07615dc9153d3a4da1b6c95f /src/main/stanza/ir-utils.stanza
parent2485d20374166b27c06c475a4aef365761a818f7 (diff)
parentaa8cfe06fd76d47e3b3721aae6ccf6b39dda34b8 (diff)
Merge pull request #45 from ucb-bar/change-mem-type
Changed DefMemory to be a non-vector type with a size member
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
-rw-r--r--src/main/stanza/ir-utils.stanza8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza
index 27acedb3..ffc9b39e 100644
--- a/src/main/stanza/ir-utils.stanza
+++ b/src/main/stanza/ir-utils.stanza
@@ -230,8 +230,8 @@ defmethod print (o:OutputStream, c:Stmt) :
(c:DefRegister) :
print-all(o,["reg " name(c) " : " type(c) ", " clock(c) ", " reset(c)])
(c:DefMemory) :
- if seq?(c) : print-all(o,["smem " name(c) " : " type(c) ", " clock(c)])
- else : print-all(o,["cmem " name(c) " : " type(c) ", " clock(c)])
+ if seq?(c) : print-all(o,["smem " name(c) " : " VectorType(type(c),size(c)) ", " clock(c)])
+ else : print-all(o,["cmem " name(c) " : " VectorType(type(c),size(c)) ", " clock(c)])
(c:DefInstance) :
print-all(o,["inst " name(c) " of " module(c)])
(c:DefNode) :
@@ -345,7 +345,7 @@ defmethod map (f: Expression -> Expression, c:Stmt) -> Stmt :
match(c) :
(c:DefAccessor) : DefAccessor(info(c),name(c), f(source(c)), f(index(c)),acc-dir(c))
(c:DefRegister) : DefRegister(info(c),name(c), type(c), f(clock(c)), f(reset(c)))
- (c:DefMemory) : DefMemory(info(c),name(c), type(c), seq?(c), f(clock(c)))
+ (c:DefMemory) : DefMemory(info(c),name(c), type(c), seq?(c), f(clock(c)), size(c))
(c:DefNode) : DefNode(info(c),name(c), f(value(c)))
(c:DefInstance) : DefInstance(info(c),name(c), f(module(c)))
(c:Conditionally) : Conditionally(info(c),f(pred(c)), conseq(c), alt(c))
@@ -390,7 +390,7 @@ defmethod map (f: Type -> Type, c:Stmt) -> Stmt :
(c:DefPoison) : DefPoison(info(c),name(c),f(type(c)))
(c:DefWire) : DefWire(info(c),name(c),f(type(c)))
(c:DefRegister) : DefRegister(info(c),name(c),f(type(c)),clock(c),reset(c))
- (c:DefMemory) : DefMemory(info(c),name(c),f(type(c)) as VectorType,seq?(c),clock(c))
+ (c:DefMemory) : DefMemory(info(c),name(c),f(type(c)),seq?(c),clock(c),size(c))
(c) : c
public defmulti mapr<?T> (f: Width -> Width, t:?T&Type) -> T