summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests
diff options
context:
space:
mode:
authorducky2018-01-16 12:08:30 -0800
committerRichard Lin2018-01-16 12:38:18 -0800
commit562a18da76290d4ffc2b78496775c354122b86a6 (patch)
tree6bba030e02b7632851439a138fb73799c005fe02 /src/test/scala/chiselTests
parent678df42aa6bf2f4715be2d051c3c29f058948d0c (diff)
Change clonetype test to be autoclonetype friendly
Diffstat (limited to 'src/test/scala/chiselTests')
-rw-r--r--src/test/scala/chiselTests/MissingCloneBindingExceptionSpec.scala20
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))
}