From 531dd6cb7a91b9bb642368d792e9c5e0c1c72089 Mon Sep 17 00:00:00 2001 From: Richard Lin Date: Fri, 2 Mar 2018 16:40:28 -0800 Subject: Fix for 792 (#793) Makes Builder.updateBundleStack a bit stricter in deciding how many stack frames to discard by additionally matching against method names and deleting stack frames at or above the frame currently being inserted.--- src/test/scala/chiselTests/AutoClonetypeSpec.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 + } } + } + } -- cgit v1.2.3