diff options
Diffstat (limited to 'src/test/scala/chiselTests/DontTouchSpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/DontTouchSpec.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/chiselTests/DontTouchSpec.scala b/src/test/scala/chiselTests/DontTouchSpec.scala index ead4ffc9..e80c6199 100644 --- a/src/test/scala/chiselTests/DontTouchSpec.scala +++ b/src/test/scala/chiselTests/DontTouchSpec.scala @@ -3,6 +3,7 @@ package chiselTests import chisel3._ +import chisel3.stage.ChiselStage class HasDeadCodeChild(withDontTouch: Boolean) extends Module { val io = IO(new Bundle { @@ -31,7 +32,7 @@ class HasDeadCode(withDontTouch: Boolean) extends Module { } } -class DontTouchSpec extends ChiselFlatSpec { +class DontTouchSpec extends ChiselFlatSpec with Utils{ val deadSignals = List( "io_c_0", "io_c_1", @@ -50,12 +51,11 @@ class DontTouchSpec extends ChiselFlatSpec { } } "Dont touch" should "only work on bound hardware" in { - a [chisel3.BindingException] should be thrownBy { - elaborate(new Module { + a [chisel3.BindingException] should be thrownBy extractCause[BindingException] { + ChiselStage.elaborate(new Module { val io = IO(new Bundle { }) dontTouch(new Bundle { val a = UInt(32.W) } ) }) } } } - |
