I am fairly new to Chisel, and is currently attempting to rewrite a Chisel project from Chisel 3.4 to 3.5. The issue I have faced is the project initializes IO()'s with a custom class that extends a bundle like this:
Component with IO:
val io = IO(new GenericInterface(n) {
val input = Input(Bool())
})
Interface:
class GenericInterface(n: Int) extends Bundle {
val out = Output(UInt(n.W))
}
My issue is that I am unable to access io.input
in the component. My current workaround is creating two separate io's, but this seems like a suboptimal solution at best. Is there a more pleasing workaround than the one below?
val io = IO(new GenericInterface(n))
val io2 = IO(new Bundle {
val input = Input(Bool())
})