aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala
diff options
context:
space:
mode:
authorAlbert Magyar2019-12-18 16:21:06 -0500
committerSchuyler Eldridge2020-02-19 19:47:17 -0500
commit68d9fc84ce510c4ff5eb1907419925d4ea548e04 (patch)
tree1c0703f49f09200661820d13d981b34ce548b6aa /src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala
parent235ec6cbdce6866c8fcd49c0000a7abeeaa4ef80 (diff)
Support Singleton Dependencies (#1275)
This makes a change to the Dependency API that breaks chisel3. This needs to [skip chisel tests], but is fixed with https://github.com/freechipsproject/chisel3/pull/1270. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala')
-rw-r--r--src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala b/src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala
index bb2a8cd6..4a638393 100644
--- a/src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala
+++ b/src/main/scala/firrtl/options/phases/WriteOutputAnnotations.scala
@@ -4,14 +4,23 @@ package firrtl.options.phases
import firrtl.AnnotationSeq
import firrtl.annotations.{DeletedAnnotation, JsonProtocol}
-import firrtl.options.{Phase, StageOptions, Unserializable, Viewer}
+import firrtl.options.{Phase, PreservesAll, StageOptions, Unserializable, Viewer}
+import firrtl.options.Dependency
import java.io.PrintWriter
/** [[firrtl.options.Phase Phase]] that writes an [[AnnotationSeq]] to a file. A file is written if and only if a
* [[StageOptions]] view has a non-empty [[StageOptions.annotationFileOut annotationFileOut]].
*/
-class WriteOutputAnnotations extends Phase {
+class WriteOutputAnnotations extends Phase with PreservesAll[Phase] {
+
+ override val prerequisites =
+ Seq( Dependency[GetIncludes],
+ Dependency[ConvertLegacyAnnotations],
+ Dependency[AddDefaults],
+ Dependency[Checks] )
+
+ override val dependents = Seq.empty
/** Write the input [[AnnotationSeq]] to a fie. */
def transform(annotations: AnnotationSeq): AnnotationSeq = {