aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes/ZeroWidth.scala
diff options
context:
space:
mode:
authorSchuyler Eldridge2020-04-21 22:41:23 -0400
committerSchuyler Eldridge2020-04-22 18:46:31 -0400
commit39d76a02785f4391b67abd3b7d7720d287736312 (patch)
treee820790206a46a315e0b2d5634c5a8c9825931a2 /src/main/scala/firrtl/passes/ZeroWidth.scala
parent1bf80040825e96ce04c15374304c144b9d48e902 (diff)
Mixin DependencyAPIMigration to all Transforms
This mixes in the new DependencyAPIMigration trait into all Transforms and Passes. This enables in-tree transforms/passes to build without deprecation warnings associated with the deprecated CircuitForm. As a consequence of this, every Transform now has UnknownForm as both its inputForm and outputForm. This PR modifies legacy Compiler and testing infrastructure to schedule transforms NOT using mergeTransforms/getLoweringTransforms (which rely on inputForm and outputForm not being UnknownForm), but instead using the Dependency API. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/firrtl/passes/ZeroWidth.scala')
-rw-r--r--src/main/scala/firrtl/passes/ZeroWidth.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/passes/ZeroWidth.scala b/src/main/scala/firrtl/passes/ZeroWidth.scala
index e60d76d1..4f7e2369 100644
--- a/src/main/scala/firrtl/passes/ZeroWidth.scala
+++ b/src/main/scala/firrtl/passes/ZeroWidth.scala
@@ -8,9 +8,9 @@ import firrtl._
import firrtl.Mappers._
import firrtl.options.Dependency
-object ZeroWidth extends Transform {
+object ZeroWidth extends Transform with DependencyAPIMigration {
- override val prerequisites =
+ override def prerequisites =
Seq( Dependency(PullMuxes),
Dependency(ReplaceAccesses),
Dependency(ExpandConnects),
@@ -24,9 +24,6 @@ object ZeroWidth extends Transform {
case _ => false
}
- def inputForm: CircuitForm = UnknownForm
- def outputForm: CircuitForm = UnknownForm
-
private def makeEmptyMemBundle(name: String): Field =
Field(name, Flip, BundleType(Seq(
Field("addr", Default, UIntType(IntWidth(0))),