chisel2-deprecated icon indicating copy to clipboard operation
chisel2-deprecated copied to clipboard

Support bulk connects in `when`?

Open jkorinth opened this issue 9 years ago • 0 comments

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.

jkorinth avatar Sep 03 '16 06:09 jkorinth