chisel
chisel copied to clipboard
Chisel 3.5.1 incorrectly warns on some Bundle traits
Type of issue: bug report
Impact: no functional change
Development Phase: request | proposal
Other information
If the current behavior is a bug, please provide the steps to reproduce the problem:
It seems to happen on Bundle traits that only have virtual methods, eg.
trait Foo extends Bundle {
val foo: UInt
}
class Bar extends Foo {
val foo = UInt(8.W)
val bar = UInt(8.W)
}
class Example extends Module {
val in = IO(Input(new Bar))
val out = IO(Output(new Bar))
out := in
}
This seems to be due to the changes that make it possible to generate _elementsImpl since we know process non-concrete Bundles. That being said, this only seems to affect abstract Bundles that only have virtual methods so I don't think it affects the correctness of capturing the elements since those virtual methods will need to be implemented later.
What is the current behavior?
Chisel 3.5.1 warns on trait Foo: https://scastie.scala-lang.org/0J6M9n2URSCvzfAEnkZPcw
What is the expected behavior?
Chisel 3.5.0 does not: https://scastie.scala-lang.org/l1P8OyIMQ9aX3Ge22WGSEA
Please tell us about your environment:
Chisel v3.5.1
What is the use case for changing the behavior?