chisel2-deprecated
chisel2-deprecated copied to clipboard
Support bulk connects in `when`?
Feature request: It would be nice to mux Bundles in when statements, e.g.,
when (somesignal) {
bundle <> otherBundle
}
.otherwise {
bundle <> defaultBundle
}
The idea would be to generate a bunch of
bundle.x := Mux(somesignal, otherBundle.x, defaultBundle.x)
...
statements. This would save a lot of typing, e.g., in arbiting xbars with large protocols (AXI, Wishbone, ...).
I guess that won't be as easy as it sounds since there's a lot of special cases to be caught, but I think it would be very useful. In case you can't support it, it would also be helpful to generate a compiler error for the code above.