From 7c3c18de2ffd56af51b99030c7ae7d3a321aed5f Mon Sep 17 00:00:00 2001 From: ducky Date: Fri, 3 Nov 2017 18:34:46 -0700 Subject: Autoclonetype initial prototype --- src/test/scala/chiselTests/AutoClonetypeSpec.scala | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/test/scala/chiselTests/AutoClonetypeSpec.scala (limited to 'src/test') diff --git a/src/test/scala/chiselTests/AutoClonetypeSpec.scala b/src/test/scala/chiselTests/AutoClonetypeSpec.scala new file mode 100644 index 00000000..93031c1c --- /dev/null +++ b/src/test/scala/chiselTests/AutoClonetypeSpec.scala @@ -0,0 +1,34 @@ +// See LICENSE for license details. + +package chiselTests + +import chisel3._ + +import chisel3.testers.BasicTester + +class BundleWithIntArg(val i: Int) extends Bundle { + val out = Output(UInt(i.W)) +} + +class ModuleWithInner extends Module { + class InnerBundle(val i: Int) extends Bundle { + val out = Output(UInt(i.W)) + } + + val io = IO(new InnerBundle(14)) + io.out := 1.U +} + + +class AutoClonetypeSpec extends ChiselFlatSpec { + "Bundles with Scala args" should "not need clonetype" in { + elaborate { new Module { + val io = IO(new BundleWithIntArg(8)) + io.out := 1.U + } } + } + + "Inner bundles with Scala args" should "not need clonetype" in { + elaborate { new ModuleWithInner } + } +} -- cgit v1.2.3