diff options
| author | Schuyler Eldridge | 2020-05-04 17:54:24 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2020-05-06 02:23:52 -0400 |
| commit | 5e2ca44a31969291d2ad27869f7b443ce46a8654 (patch) | |
| tree | 304103bf8cf2525a264452ec579ce572f7c07300 | |
| parent | bfb5b3542948246a0941cdc53f48acceddfeda03 (diff) | |
Fix double elaboration
Remove the requirement that FirrtlStage runs elaboration (this should
be implicit) and remove the unneeded invalidation of elaboration by
the Emitter. Due to Convert currently NOT invalidating Elaborate (when
it should), add an optionalPrerequisiteOf to ensure that the Emitter
runs before the Convert phase.
Co-authored-by: David Biancolin <david.biancolin@gmail.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
| -rw-r--r-- | src/main/scala/chisel3/stage/ChiselStage.scala | 1 | ||||
| -rw-r--r-- | src/main/scala/chisel3/stage/phases/Emitter.scala | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/scala/chisel3/stage/ChiselStage.scala b/src/main/scala/chisel3/stage/ChiselStage.scala index e4ff77d0..2dbb5b9d 100644 --- a/src/main/scala/chisel3/stage/ChiselStage.scala +++ b/src/main/scala/chisel3/stage/ChiselStage.scala @@ -20,7 +20,6 @@ class ChiselStage extends Stage with PreservesAll[Phase] { val targets: Seq[Dependency[Phase]] = Seq( Dependency[chisel3.stage.phases.Checks], - Dependency[chisel3.stage.phases.Elaborate], Dependency[chisel3.stage.phases.AddImplicitOutputFile], Dependency[chisel3.stage.phases.AddImplicitOutputAnnotationFile], Dependency[chisel3.stage.phases.MaybeAspectPhase], diff --git a/src/main/scala/chisel3/stage/phases/Emitter.scala b/src/main/scala/chisel3/stage/phases/Emitter.scala index 31e21542..7fb9ef91 100644 --- a/src/main/scala/chisel3/stage/phases/Emitter.scala +++ b/src/main/scala/chisel3/stage/phases/Emitter.scala @@ -30,10 +30,9 @@ class Emitter extends Phase { Dependency[AddImplicitOutputAnnotationFile], Dependency[MaybeAspectPhase] ) - override def invalidates(phase: Phase): Boolean = phase match { - case _: Elaborate => true - case _ => false - } + override def optionalPrerequisiteOf = Seq(Dependency[Convert]) + + override def invalidates(phase: Phase): Boolean = false def transform(annotations: AnnotationSeq): AnnotationSeq = { val copts = view[ChiselOptions](annotations) |
