aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/flo.stanza
diff options
context:
space:
mode:
authorazidar2015-08-25 14:51:08 -0700
committerazidar2015-08-25 14:51:08 -0700
commit9fd6d47c5ee82e4dac924e15b60f2a519d566b14 (patch)
tree999ea3f223d228cef7f84ae7647ec95db7294e56 /src/main/stanza/flo.stanza
parenteb1ab67b6cc3fd4a549da563bf643bd519d7562e (diff)
Removed IntWidth, now only use LongWidth. Now do width inference for Constants in parser, and correctly subtract 1 (except when 0) when calculating width from num-bits of BigInt
Diffstat (limited to 'src/main/stanza/flo.stanza')
-rw-r--r--src/main/stanza/flo.stanza3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/stanza/flo.stanza b/src/main/stanza/flo.stanza
index b34af613..3b1dbf76 100644
--- a/src/main/stanza/flo.stanza
+++ b/src/main/stanza/flo.stanza
@@ -65,7 +65,6 @@ defn flo-op-name (op:PrimOp, args:List<Expression>) -> String :
defn sane-width (wd:Width) -> Int|Long :
match(wd) :
- (w:IntWidth) : max(1, width(w))
(w:LongWidth) : max(to-long(1), width(w))
(w) : error(string-join(["Unknown width: " w]))
@@ -173,7 +172,7 @@ defn emit-s (s:Stmt, flokinds:HashTable<Symbol,FloKind>, top:Symbol,sh:HashTable
(s:DefNode) :
emit-all([top "::" name(s) " = " maybe-mov(value(s)) value(s) "\n"], top)
(s:Begin) : do(emit-s{_, flokinds, top,sh}, body(s))
- (s:Connect) : emit-connect(s,UIntValue(BigIntLit("1"),IntWidth(1)))
+ (s:Connect) : emit-connect(s,UIntValue(BigIntLit("1"),LongWidth(1)))
(s:Conditionally) : emit-connect(conseq(s) as Connect,pred(s))
(s) : s