summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSchuyler Eldridge2020-05-06 11:35:48 -0400
committerGitHub2020-05-06 11:35:48 -0400
commite7b8e6e6e497b622b9d48e98d33ad6698dd6198c (patch)
tree304103bf8cf2525a264452ec579ce572f7c07300 /src/test
parent33cfe8101950721f5756207504162b566c438ba8 (diff)
parent5e2ca44a31969291d2ad27869f7b443ce46a8654 (diff)
Merge pull request #1426 from freechipsproject/1412-2
Fix Double Elaboration Backportably
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/chiselTests/stage/ChiselStageSpec.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/stage/ChiselStageSpec.scala b/src/test/scala/chiselTests/stage/ChiselStageSpec.scala
index a7a405f1..21beb48f 100644
--- a/src/test/scala/chiselTests/stage/ChiselStageSpec.scala
+++ b/src/test/scala/chiselTests/stage/ChiselStageSpec.scala
@@ -8,6 +8,8 @@ import chisel3.stage.ChiselStage
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
+import firrtl.options.Dependency
+
object ChiselStageSpec {
class Foo extends MultiIOModule {
@@ -57,4 +59,15 @@ class ChiselStageSpec extends AnyFlatSpec with Matchers {
ChiselStage.convert(new Foo)
}
+ behavior of "ChiselStage phase ordering"
+
+ it should "only run elaboration once" in new ChiselStageFixture {
+ info("Phase order is:\n" + stage.phaseManager.prettyPrint(" "))
+
+ val order = stage.phaseManager.flattenedTransformOrder.map(Dependency.fromTransform)
+
+ info("Elaborate only runs once")
+ exactly (1, order) should be (Dependency[chisel3.stage.phases.Elaborate])
+ }
+
}