hwtypes icon indicating copy to clipboard operation
hwtypes copied to clipboard

[RFC] Special handling of None or 0 (constant) parameter for adc

Open leonardt opened this issue 4 years ago • 1 comments

This is a minor thought, but a case came up where I wanted to use the adc operation but only need the carry out (not the carry in). I can simply set it 0, and it's likely that downstream tools will optimize this out, but perhaps we can support either a constant 0 or None as the carry input and optimize the behavior (avoid generating the extra add for the carry in in hardware/smt, avoid doing the add with 0 in software). Thoughts?

leonardt avatar Jan 27 '21 20:01 leonardt

Seems completely reasonable optimization. Does anything have to change on the hwtypes side?

cdonovick avatar Jan 27 '21 22:01 cdonovick