aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/ir-utils.stanza
diff options
context:
space:
mode:
authorazidar2015-10-01 12:11:34 -0700
committerazidar2015-10-01 12:11:34 -0700
commitaa8cfe06fd76d47e3b3721aae6ccf6b39dda34b8 (patch)
tree45d155457a4041b0643fa59368b5cbfdceeee7f9 /src/main/stanza/ir-utils.stanza
parentd380b8cfd11d2fe1231774f7b9492aff959bb279 (diff)
Changed DefMemory to be a non-vector type with a size member. Necessary for ASIC backend.
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 a234ff81..355f67a4 100644
--- a/src/main/stanza/ir-utils.stanza
+++ b/src/main/stanza/ir-utils.stanza
@@ -226,8 +226,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) :
@@ -341,7 +341,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))
@@ -386,7 +386,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