I'm tring to use aggregate memory in chisel.
As recommended in github, https://github.com/ucb-bar/chisel3-wiki/blob/master/Chisel-Memories.md
My code looks like follows:
class Interface(val w:Int) extends Bundle{
val a: UInt = UInt(w.W)
val b: UInt = UInt(w.W)
val c: UInt = UInt(w.W)
}
val mem = Mem(16,new Interface(4))
Then I use mask as below:
mem.write(io.addr, inter, mask)
where the type of 'inter' is Interface, the type of 'mask' is Vec[Bool]
The following error is given:
Cannot prove that mytest.Interface <:< chisel3.Vec[_].
I have done some searching, found that mask can only be used when the memory is defined by Vec.
There is any solution to make this work?