diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/BundleSpec.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/BundleSpec.scala b/src/test/scala/chiselTests/BundleSpec.scala index df02aa20..5d3f23ec 100644 --- a/src/test/scala/chiselTests/BundleSpec.scala +++ b/src/test/scala/chiselTests/BundleSpec.scala @@ -141,4 +141,17 @@ class BundleSpec extends ChiselFlatSpec with BundleSpecUtils with Utils { } } } + + "Bound Data" should "have priority in setting ref over unbound Data" in { + class MyModule extends RawModule { + val foo = IO(new Bundle { + val x = Output(UInt(8.W)) + }) + foo.x := 0.U // getRef on foo.x is None.get without fix + val bar = new Bundle { + val y = foo.x + } + } + ChiselStage.emitChirrtl(new MyModule) + } } |
