intel / rohd-hcl

A hardware component library developed with ROHD.
https://pub.dev/packages/rohd_hcl
BSD 3-Clause "New" or "Revised" License
81 stars 23 forks source link

Width inference on Mux #140

Open desmonddak opened 1 week ago

desmonddak commented 1 week ago

Motivation

It's frustrating to use the mux and then have to expand the operands to the correct width as a convenience.

Desired solution

mux infers widths properly likely using zeroExtend to match operands to a common width.

Alternatives considered

No response

Additional details

No response

mkorbel1 commented 2 days ago

Do you mean zero-extending the smaller of the two data inputs of a mux by default? That seems reasonable to me as well. Should this be filed on https://github.com/intel/rohd instead, or was there something component-specific you had in mind?