diff options
| author | Schuyler Eldridge | 2019-07-03 20:31:07 -0400 |
|---|---|---|
| committer | GitHub | 2019-07-03 20:31:07 -0400 |
| commit | 648dddeacd9aece4a43cad09430dad25cba69457 (patch) | |
| tree | 5ecc55cbf533652137728a71220b1a921a893f8d /src/main/scala/firrtl/Compiler.scala | |
| parent | 1644b56caa3499ca0647132a9d0778981d7759d5 (diff) | |
| parent | 01fb87e1f8b1f9408827655e944036a9bcf76fd9 (diff) | |
Merge pull request #1079 from freechipsproject/dependency-api
Add Dependency API
Diffstat (limited to 'src/main/scala/firrtl/Compiler.scala')
| -rw-r--r-- | src/main/scala/firrtl/Compiler.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala index c01564d2..b72fd4ce 100644 --- a/src/main/scala/firrtl/Compiler.scala +++ b/src/main/scala/firrtl/Compiler.scala @@ -11,7 +11,7 @@ import firrtl.annotations._ import firrtl.ir.Circuit import firrtl.Utils.throwInternalError import firrtl.annotations.transforms.{EliminateTargetPaths, ResolvePaths} -import firrtl.options.StageUtils +import firrtl.options.{StageUtils, TransformLike} /** Container of all annotations for a Firrtl compiler */ class AnnotationSeq private (private[firrtl] val underlying: List[Annotation]) { @@ -169,7 +169,7 @@ final case object UnknownForm extends CircuitForm(-1) { // scalastyle:on magic.number /** The basic unit of operating on a Firrtl AST */ -abstract class Transform extends LazyLogging { +abstract class Transform extends TransformLike[CircuitState] { /** A convenience function useful for debugging and error messages */ def name: String = this.getClass.getSimpleName /** The [[firrtl.CircuitForm]] that this transform requires to operate on */ @@ -185,6 +185,8 @@ abstract class Transform extends LazyLogging { */ protected def execute(state: CircuitState): CircuitState + def transform(state: CircuitState): CircuitState = execute(state) + /** Convenience method to get annotations relevant to this Transform * * @param state The [[CircuitState]] form which to extract annotations |
