diff options
| author | Schuyler Eldridge | 2020-06-22 20:34:46 -0400 |
|---|---|---|
| committer | GitHub | 2020-06-22 20:34:46 -0400 |
| commit | 9f44b593efe4830aeb56d17f5ed59277a74832f8 (patch) | |
| tree | ac43010dd7fc2a14303497f95e12f2a40bb16d0e /src/test/scala/chiselTests/AutoNestedCloneSpec.scala | |
| parent | d099d01ae6b11d8befdf7b32ab74c3167a552984 (diff) | |
| parent | b5e59895e13550006fd8e951b7e9483de00f82dd (diff) | |
Merge pull request #1481 from freechipsproject/driver-deprecations
Remove Deprecated Usages of chisel3.Driver, CircuitForm
Diffstat (limited to 'src/test/scala/chiselTests/AutoNestedCloneSpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/AutoNestedCloneSpec.scala | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/test/scala/chiselTests/AutoNestedCloneSpec.scala b/src/test/scala/chiselTests/AutoNestedCloneSpec.scala index 743440bf..7dd0b070 100644 --- a/src/test/scala/chiselTests/AutoNestedCloneSpec.scala +++ b/src/test/scala/chiselTests/AutoNestedCloneSpec.scala @@ -4,6 +4,7 @@ package chiselTests import Chisel.ChiselException import org.scalatest._ import chisel3._ +import chisel3.stage.ChiselStage import org.scalatest.matchers.should.Matchers class BundleWithAnonymousInner(val w: Int) extends Bundle { @@ -12,11 +13,11 @@ class BundleWithAnonymousInner(val w: Int) extends Bundle { } } -class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { +class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers with Utils { behavior of "autoCloneType of inner Bundle in Chisel3" it should "clone a doubly-nested inner bundle successfully" in { - elaborate { + ChiselStage.elaborate { class Outer(val w: Int) extends Module { class Middle(val w: Int) { class InnerIOType extends Bundle { @@ -32,7 +33,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } it should "clone an anonymous inner bundle successfully" in { - elaborate { + ChiselStage.elaborate { class TestTop(val w: Int) extends Module { val io = IO(new Bundle {}) val myWire = Wire(new Bundle{ val a = UInt(w.W) }) @@ -42,7 +43,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } it should "pick the correct $outer instance for an anonymous inner bundle" in { - elaborate { + ChiselStage.elaborate { class Inner(val w: Int) extends Module { val io = IO(new Bundle{ val in = Input(UInt(w.W)) @@ -64,7 +65,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } it should "clone an anonymous, bound, inner bundle of another bundle successfully" in { - elaborate { + ChiselStage.elaborate { class TestModule(w: Int) extends Module { val io = IO(new BundleWithAnonymousInner(w) ) val w0 = WireDefault(io) @@ -75,7 +76,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } it should "clone an anonymous, inner bundle of a Module, bound to another bundle successfully" in { - elaborate { + ChiselStage.elaborate { class TestModule(w: Int) extends Module { val bun = new Bundle { val foo = UInt(w.W) @@ -91,7 +92,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } it should "clone a double-nested anonymous Bundle" in { - elaborate { + ChiselStage.elaborate { class TestModule() extends Module { val io = IO(new Bundle { val inner = Input(new Bundle { @@ -105,7 +106,7 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { // Test ignored because the compatibility null-inserting autoclonetype doesn't trip this ignore should "fail on anonymous doubly-nested inner bundle with clear error" in { - intercept[ChiselException] { elaborate { + intercept[ChiselException] { extractCause[ChiselException] { ChiselStage.elaborate { class Outer(val w: Int) extends Module { class Middle(val w: Int) { def getIO: Bundle = new Bundle { @@ -116,6 +117,6 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { val myWire = Wire((new Middle(w)).getIO) } new Outer(2) - }}.getMessage should include("Unable to determine instance") + }}}.getMessage should include("Unable to determine instance") } } |
