From 679dd54a8e0d65524b782459b64a10e0d91e3a9d Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Tue, 3 Nov 2020 14:51:58 -0800 Subject: Remove Data.setRef assertion (#1654) It causes issues for some legal (if awkward) patterns. A larger refactor of when refs are set could reinstate this check.--- src/test/scala/chiselTests/BundleSpec.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/test/scala/chiselTests/BundleSpec.scala b/src/test/scala/chiselTests/BundleSpec.scala index 625c0b5b..df02aa20 100644 --- a/src/test/scala/chiselTests/BundleSpec.scala +++ b/src/test/scala/chiselTests/BundleSpec.scala @@ -128,4 +128,17 @@ class BundleSpec extends ChiselFlatSpec with BundleSpecUtils with Utils { } } }).getMessage should include("aliased fields") } + + "Unbound bundles sharing a field" should "not error" in { + ChiselStage.elaborate { + new RawModule { + val foo = new Bundle { + val x = UInt(8.W) + } + val bar = new Bundle { + val y = foo.x + } + } + } + } } -- cgit v1.2.3