diff options
| author | Albert Magyar | 2017-05-03 17:25:29 -0700 |
|---|---|---|
| committer | GitHub | 2017-05-03 17:25:29 -0700 |
| commit | af222c1737fa72fce964190876346bdb7ff220cd (patch) | |
| tree | f64949eeff380f10cc8afd79ebc72bf2265f4d15 /src/main/scala/firrtl/passes/CheckWidths.scala | |
| parent | 61a82d2e4518ec97b852c4555ad4c7c0fe05140a (diff) | |
Add checks on register clock and reset types (#33) (#553)
Remove infix notation on calls with side effects.
Diffstat (limited to 'src/main/scala/firrtl/passes/CheckWidths.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/CheckWidths.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/passes/CheckWidths.scala b/src/main/scala/firrtl/passes/CheckWidths.scala index 24735009..8f6ab18f 100644 --- a/src/main/scala/firrtl/passes/CheckWidths.scala +++ b/src/main/scala/firrtl/passes/CheckWidths.scala @@ -92,6 +92,12 @@ object CheckWidths extends Pass { errors.append(new AttachWidthsNotEqual(infox, mname, e.serialize, exprs.head.serialize)) ) s + case sx: DefRegister => + sx.reset.tpe match { + case UIntType(IntWidth(w)) if w == 1 => + case _ => errors.append(new CheckTypes.IllegalResetType(info, mname, sx.name)) + } + s case _ => s } } |
