diff options
| author | Jack Koenig | 2019-08-13 12:09:27 +0530 |
|---|---|---|
| committer | GitHub | 2019-08-13 12:09:27 +0530 |
| commit | f08f8dbb3c480220f92923a7f3242fcbb644b65e (patch) | |
| tree | 45cdb7543f6252ad2feb5aaf4e0e0580d3d27565 /src/main/scala/firrtl/proto | |
| parent | 63e88b6e1696e2c8d6da91f6f5eb128a9d0395ae (diff) | |
Infer reset (#1068)
* Add abstract "Reset" which can be inferred to AsyncReset or UInt<1>
* Enhance async reset initial value literal check to support aggregates
Diffstat (limited to 'src/main/scala/firrtl/proto')
| -rw-r--r-- | src/main/scala/firrtl/proto/FromProto.scala | 1 | ||||
| -rw-r--r-- | src/main/scala/firrtl/proto/ToProto.scala | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/proto/FromProto.scala b/src/main/scala/firrtl/proto/FromProto.scala index 44e505f1..22c90316 100644 --- a/src/main/scala/firrtl/proto/FromProto.scala +++ b/src/main/scala/firrtl/proto/FromProto.scala @@ -256,6 +256,7 @@ object FromProto { case FIXED_TYPE_FIELD_NUMBER => convert(tpe.getFixedType) case CLOCK_TYPE_FIELD_NUMBER => ir.ClockType case ASYNC_RESET_TYPE_FIELD_NUMBER => ir.AsyncResetType + case RESET_TYPE_FIELD_NUMBER => ir.ResetType case ANALOG_TYPE_FIELD_NUMBER => convert(tpe.getAnalogType) case BUNDLE_TYPE_FIELD_NUMBER => ir.BundleType(tpe.getBundleType.getFieldList.asScala.map(convert(_))) diff --git a/src/main/scala/firrtl/proto/ToProto.scala b/src/main/scala/firrtl/proto/ToProto.scala index c67f446c..17adb698 100644 --- a/src/main/scala/firrtl/proto/ToProto.scala +++ b/src/main/scala/firrtl/proto/ToProto.scala @@ -343,6 +343,9 @@ object ToProto { case ir.AsyncResetType => val at = Firrtl.Type.AsyncResetType.newBuilder() tb.setAsyncResetType(at) + case ir.ResetType => + val rt = Firrtl.Type.ResetType.newBuilder() + tb.setResetType(rt) case ir.AnalogType(width) => val at = Firrtl.Type.AnalogType.newBuilder() convert(width).foreach(at.setWidth) |
