diff options
| author | azidar | 2015-11-06 09:51:59 -0800 |
|---|---|---|
| committer | azidar | 2016-01-16 14:28:16 -0800 |
| commit | ffa090c10d6210395e3f304e56008e2183a85698 (patch) | |
| tree | 25fce98795c897f655a4e6dd2f2ebf866e9c3049 /src/main/stanza/errors.stanza | |
| parent | 407200e46de9a97f8a88c210e3b0e7d6d38f307b (diff) | |
WIP
Diffstat (limited to 'src/main/stanza/errors.stanza')
| -rw-r--r-- | src/main/stanza/errors.stanza | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index b6a854af..5b0d3864 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -283,7 +283,7 @@ public defn check-high-form (c:Circuit) -> Circuit : defn check-high-form-w (info:FileInfo,w:Width,unknown-ok?:True|False) -> Width : match(w) : - (w:LongWidth) : + (w:IntWidth) : if width(w) <= to-long(0) : add(errors,NegWidth(info)) w (w:UnknownWidth) : @@ -364,7 +364,7 @@ public defn check-high-form (c:Circuit) -> Circuit : check-valid-loc(info(s),loc(s)) check-high-form-e(info(s),loc(s),names) check-high-form-e(info(s),exp(s),names) - (s:PrintfStmt) : + (s:Print) : for x in args(s) do: check-high-form-e(info(s),x,names) check-fstring(info(s),string(s),length(args(s))) @@ -476,7 +476,7 @@ public defn check-kinds (c:Circuit) -> Circuit : println(type(source(s))) add(errors,AccessVecOrMem(info(s))) (s:Conditionally) : check-not-mem(info(s),pred(s)) - (s:PrintfStmt) : + (s:Print) : for x in args(s) do : check-not-mem(info(s),x) (s:Connect) : @@ -714,7 +714,7 @@ public defn check-types (c:Circuit) -> Circuit : (s:OnReset) : if type(loc(s)) != type(exp(s)) : add(errors,InvalidConnect(info(s))) if has-flip?(type(loc(s))) : add(errors,OnResetIllegalFlips(info(s))) - (s:PrintfStmt) : + (s:Print) : for x in args(s) do : if type(x) != ut() and type(x) != st(): add(errors,PrintfArgNotGround(info(s))) @@ -850,7 +850,7 @@ public defn check-genders (c:Circuit) -> Circuit : (s:Connect) : check-gender(info(s),genders,loc(s),FEMALE) check-gender(info(s),genders,exp(s),MALE) - (s:PrintfStmt) : + (s:Print) : for x in args(s) do : check-gender(info(s),genders,x,MALE) (s:BulkConnect) : @@ -861,8 +861,8 @@ public defn check-genders (c:Circuit) -> Circuit : check-gender(info(s),genders,exp(s),MALE) (s:Conditionally) : check-gender(info(s),genders,pred(s),MALE) - (s:EmptyStmt) : false - (s:StopStmt) : false + (s:Empty) : false + (s:Stop) : false (s:Begin) : false @@ -972,7 +972,7 @@ public defn check-width (c:Circuit) -> Circuit : defn check-width-m (m:Module) -> False : defn check-width-w (info:FileInfo,w:Width) -> Width : match(w) : - (w:LongWidth) : + (w:IntWidth) : if width(w) <= to-long(0) : add(errors,NegWidth(info)) (w) : add(errors,UninferredWidth(info)) @@ -982,14 +982,14 @@ public defn check-width (c:Circuit) -> Circuit : match(map(check-width-e{info,_},e)) : (e:UIntValue) : match(width(e)) : - (w:LongWidth) : + (w:IntWidth) : if max(to-long(1),to-long(req-num-bits(value(e)) - 1)) > width(w) : add(errors,WidthTooSmall(info,to-string(value(e)))) (w) : add(errors,UninferredWidth(info)) check-width-w(info,width(e)) (e:SIntValue) : match(width(e)) : - (w:LongWidth) : + (w:IntWidth) : if to-long(req-num-bits(value(e))) > width(w) : add(errors,WidthTooSmall(info,to-string(value(e)))) (w) : add(errors,UninferredWidth(info)) @@ -1102,13 +1102,13 @@ public defn check-low-form (c:Circuit) -> Circuit : add(insts,name(s)) (s:DefNode) : check-correct-exp(info(s),value(s)) - (s:PrintfStmt) : + (s:Print) : for x in args(s) do : check-correct-exp(info(s),x) (s:DefRegister) : false (s:DefAccessor) : false (s:Conditionally) : - if (not alt(s) typeof EmptyStmt) or (conseq(s) typeof Begin) : add(errors,NoWhen(info(s))) + if (not alt(s) typeof Empty) or (conseq(s) typeof Begin) : add(errors,NoWhen(info(s))) (s:OnReset) : add(errors,NoOnReset(info(s))) (s:BulkConnect) : add(errors,NoBulkConnect(info(s))) (s:Connect) : @@ -1119,8 +1119,8 @@ public defn check-low-form (c:Circuit) -> Circuit : if key?(assigned?,n*) : add(errors,SingleAssignment(info(s),n*)) else : assigned?[to-symbol $ to-string $ e] = true (e) : check-correct-exp(info(s),e) - (s:EmptyStmt) : false - (s:StopStmt) : false + (s:Empty) : false + (s:Stop) : false (s:Begin) : do(check-low-form-s,s) match(m) : |
