diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/AutoClonetypeSpec.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/AutoClonetypeSpec.scala b/src/test/scala/chiselTests/AutoClonetypeSpec.scala index 59ce98b7..6924f8b8 100644 --- a/src/test/scala/chiselTests/AutoClonetypeSpec.scala +++ b/src/test/scala/chiselTests/AutoClonetypeSpec.scala @@ -56,6 +56,12 @@ object CompanionObjectWithBundle { } } +class NestedAnonymousBundle extends Bundle { + val a = Output(new Bundle { + val a = UInt(8.W) + }) +} + // A Bundle with an argument that is also a field. // Not necessarily good style (and not necessarily recommended), but allowed to preserve compatibility. class BundleWithArgumentField(val x: Data, val y: Data) extends Bundle @@ -146,4 +152,13 @@ class AutoClonetypeSpec extends ChiselFlatSpec { io.data := 1.U } } } + + "Nested directioned anonymous Bundles" should "not need clonetype" in { + elaborate { new Module { + val io = IO(new NestedAnonymousBundle) + val a = WireInit(io) + io.a.a := 1.U + } } + } + } |
