diff options
| author | Schuyler Eldridge | 2020-04-21 22:41:23 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2020-04-22 18:46:31 -0400 |
| commit | 39d76a02785f4391b67abd3b7d7720d287736312 (patch) | |
| tree | e820790206a46a315e0b2d5634c5a8c9825931a2 /src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala | |
| parent | 1bf80040825e96ce04c15374304c144b9d48e902 (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/transforms/ReplaceTruncatingArithmetic.scala')
| -rw-r--r-- | src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala b/src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala index c8129450..1ab60650 100644 --- a/src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala +++ b/src/main/scala/firrtl/transforms/ReplaceTruncatingArithmetic.scala @@ -77,17 +77,15 @@ object ReplaceTruncatingArithmetic { * @note This replaces some FIRRTL primops with ops that are not actually legal FIRRTL. They are * useful for emission to languages that support non-expanding arithmetic (like Verilog) */ -class ReplaceTruncatingArithmetic extends Transform with PreservesAll[Transform] { - def inputForm = UnknownForm - def outputForm = UnknownForm +class ReplaceTruncatingArithmetic extends Transform with DependencyAPIMigration with PreservesAll[Transform] { - override val prerequisites = firrtl.stage.Forms.LowFormMinimumOptimized ++ + override def prerequisites = firrtl.stage.Forms.LowFormMinimumOptimized ++ Seq( Dependency[BlackBoxSourceHelper], Dependency[FixAddingNegativeLiterals] ) - override val optionalPrerequisites = firrtl.stage.Forms.LowFormOptimized + override def optionalPrerequisites = firrtl.stage.Forms.LowFormOptimized - override val dependents = Seq.empty + override def dependents = Seq.empty def execute(state: CircuitState): CircuitState = { val modulesx = state.circuit.modules.map(ReplaceTruncatingArithmetic.onMod(_)) |
