diff options
| author | Jack Koenig | 2020-02-18 11:45:11 -0800 |
|---|---|---|
| committer | GitHub | 2020-02-18 11:45:11 -0800 |
| commit | 6c7a15a2d9123fd94770dda15f9e9070ae6b2bdc (patch) | |
| tree | 01903cee1942688d6ae09a724e16b06f0a56fb1b /src/main/scala/firrtl/passes | |
| parent | 38cf27e8fbdf201761b018afc93107f15cf17cb7 (diff) | |
Remove last connect semantics from reset inference (#1396)
* Revert "Infer resets last connect semantics (#1291)"
* Fix handling of invalidated and undriven components of type Reset
* Run CheckTypes after InferResets
* Make reset inference bidirectional on connect
* Support AsyncResetType in RemoveValidIf
* Fix InferResets for parent constraints on child ports
* Apply suggestions from code review
* Add ScalaDoc to InferResets
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@gmail.com>
Diffstat (limited to 'src/main/scala/firrtl/passes')
| -rw-r--r-- | src/main/scala/firrtl/passes/RemoveValidIf.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/passes/RemoveValidIf.scala b/src/main/scala/firrtl/passes/RemoveValidIf.scala index 37a3f931..42eae7e5 100644 --- a/src/main/scala/firrtl/passes/RemoveValidIf.scala +++ b/src/main/scala/firrtl/passes/RemoveValidIf.scala @@ -13,6 +13,7 @@ object RemoveValidIf extends Pass { val SIntZero = SIntLiteral(BigInt(0), IntWidth(1)) val ClockZero = DoPrim(PrimOps.AsClock, Seq(UIntZero), Seq.empty, ClockType) val FixedZero = FixedLiteral(BigInt(0), IntWidth(1), IntWidth(0)) + val AsyncZero = DoPrim(PrimOps.AsAsyncReset, Seq(UIntZero), Nil, AsyncResetType) /** Returns an [[firrtl.ir.Expression Expression]] equal to zero for a given [[firrtl.ir.GroundType GroundType]] * @note Accepts [[firrtl.ir.Type Type]] but dyanmically expects [[firrtl.ir.GroundType GroundType]] @@ -22,6 +23,7 @@ object RemoveValidIf extends Pass { case _: SIntType => SIntZero case ClockType => ClockZero case _: FixedType => FixedZero + case AsyncResetType => AsyncZero case other => throwInternalError(s"Unexpected type $other") } |
