summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/chiselTests/BundleSpec.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/BundleSpec.scala b/src/test/scala/chiselTests/BundleSpec.scala
index 4fc7d7d0..d30b64b3 100644
--- a/src/test/scala/chiselTests/BundleSpec.scala
+++ b/src/test/scala/chiselTests/BundleSpec.scala
@@ -115,4 +115,17 @@ class BundleSpec extends ChiselFlatSpec with BundleSpecUtils {
}
}
}
+
+ "Bundles" should "not have aliased fields" in {
+ (the[ChiselException] thrownBy {
+ elaborate { new Module {
+ val io = IO(Output(new Bundle {
+ val a = UInt(8.W)
+ val b = a
+ }))
+ io.a := 0.U
+ io.b := 1.U
+ } }
+ }).getMessage should include("aliased fields")
+ }
}