diff options
| author | ducky | 2018-01-16 12:08:30 -0800 |
|---|---|---|
| committer | Richard Lin | 2018-01-16 12:38:18 -0800 |
| commit | 562a18da76290d4ffc2b78496775c354122b86a6 (patch) | |
| tree | 6bba030e02b7632851439a138fb73799c005fe02 /src | |
| parent | 678df42aa6bf2f4715be2d051c3c29f058948d0c (diff) | |
Change clonetype test to be autoclonetype friendly
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala | 20 |
1 files changed, 8 insertions, 12 deletions
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)) } |
