From 562a18da76290d4ffc2b78496775c354122b86a6 Mon Sep 17 00:00:00 2001 From: ducky Date: Tue, 16 Jan 2018 12:08:30 -0800 Subject: Change clonetype test to be autoclonetype friendly --- .../MissingCloneBindingExceptionSpec.scala | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala b/src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala index fc9346a0..b83557cc 100644 --- a/src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala +++ b/src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala @@ -9,13 +9,11 @@ class MissingCloneBindingExceptionSpec extends ChiselFlatSpec with Matchers { ( the[ChiselException] thrownBy { import chisel3._ - class TestIO(w: Int) extends Bundle { - val a = Input(Vec(4, UInt(w.W))) - - //override def cloneType = (new TestIO(w)).asInstanceOf[this.type] - } - class Test extends Module { + class TestIO(w: Int) extends Bundle { + val a = Input(Vec(4, UInt(w.W))) + } + val io = IO(new TestIO(32)) } @@ -34,13 +32,11 @@ class MissingCloneBindingExceptionSpec extends ChiselFlatSpec with Matchers { ( the[ChiselException] thrownBy { import Chisel._ - class TestIO(w: Int) extends Bundle { - val a = Vec(4, UInt(width = w)).asInput - - //override def cloneType = (new TestIO(w)).asInstanceOf[this.type] - } - class Test extends Module { + class TestIO(w: Int) extends Bundle { + val a = Vec(4, UInt(width = w)).asInput + } + val io = IO(new TestIO(32)) } -- cgit v1.2.3