summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Lin2018-03-02 16:40:28 -0800
committerGitHub2018-03-02 16:40:28 -0800
commit531dd6cb7a91b9bb642368d792e9c5e0c1c72089 (patch)
tree378224bf443a21d821d51138e68b458c009950ce /src
parent46553432aaf65cff131e59081d57dabe16c2ab55 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/scala/chiselTests/AutoClonetypeSpec.scala15
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
+ } }
+ }
+
}