diff options
| author | azidar | 2016-02-08 14:55:21 -0800 |
|---|---|---|
| committer | azidar | 2016-02-09 18:57:07 -0800 |
| commit | bae6ba5d2405ba1caf7400f15d8875d4a79b8bae (patch) | |
| tree | 55345b1d4997c394efb4e6cdd83cd732807d7368 /src/main/stanza | |
| parent | 666a193706308a6fbd6c8b4bd06cbc69ae4200a6 (diff) | |
More bug fixes
Diffstat (limited to 'src/main/stanza')
| -rw-r--r-- | src/main/stanza/chirrtl.stanza | 2 | ||||
| -rw-r--r-- | src/main/stanza/compilers.stanza | 6 | ||||
| -rw-r--r-- | src/main/stanza/errors.stanza | 3 | ||||
| -rw-r--r-- | src/main/stanza/ir-parser.stanza | 1 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/main/stanza/chirrtl.stanza b/src/main/stanza/chirrtl.stanza index fc770764..607dbc70 100644 --- a/src/main/stanza/chirrtl.stanza +++ b/src/main/stanza/chirrtl.stanza @@ -430,7 +430,7 @@ public defmethod name (b:FromCHIRRTL) -> String : "From CHIRRTL" public defmethod short-name (b:FromCHIRRTL) -> String : "from-chirrtl" defn from-chirrtl (c:Circuit) -> Circuit : - val c1 = c-infer-types(c) + val c1 = infer-types(c) ;println(c1) val c2 = infer-mdir(c1) ;println(c2) diff --git a/src/main/stanza/compilers.stanza b/src/main/stanza/compilers.stanza index 01f6db96..1e7e3066 100644 --- a/src/main/stanza/compilers.stanza +++ b/src/main/stanza/compilers.stanza @@ -50,9 +50,9 @@ public defmethod passes (c:StandardVerilog) -> List<Pass> : ;RemoveSpecialChars() ;TempElimination() ; Needs to check number of uses ;=============== - CInferTypes() - CInferMDir() - RemoveCHIRRTL() + ;CInferTypes() + ;CInferMDir() + ;RemoveCHIRRTL() ;=============== ToWorkingIR() ;=============== diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index 92f1b97e..4cc99049 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -240,7 +240,8 @@ public defn check-high-form (c:Circuit) -> Circuit : defn check-high-form-w (w:Width) -> Width : match(w) : (w:IntWidth) : - if width(w) <= to-long(0) : add(errors,NegWidth()) + if width(w) <= to-long(0) : + add(errors,NegWidth()) w (w) : w defn check-high-form-t (t:Type) -> Type : diff --git a/src/main/stanza/ir-parser.stanza b/src/main/stanza/ir-parser.stanza index 139216c3..c0e52e45 100644 --- a/src/main/stanza/ir-parser.stanza +++ b/src/main/stanza/ir-parser.stanza @@ -328,6 +328,7 @@ defsyntax firrtl : (w:IntWidth) : if to-long(req-num-bits(b)) > width(w) : FPE(form, "Width too small for UIntValue.") + if width(w) == to-long(0) : println("is zero at") UIntValue(b, w) (w) : ;UIntValue(b, w) |
