firrtl-spec
firrtl-spec copied to clipboard
Add a bitcast primitive to match CIRCT's `firrtl.bitcast` ?
https://github.com/llvm/circt/blob/main/docs/Dialects/FIRRTL/RationaleFIRRTL.md#firrtlbitcast seems like a generally useful thing, but there doesn't appear to be a corresponding primitive operation that could be called from a .fir file, would it make sense to add it to the spec (and FIRParser) ?
@darthscsi or @dtzSiFive, WDYT?
I was working with a user who was converting vectors around and realized that there was no bitcast available. It is probably useful. It requires positions on bit and field orderings. It also has to be extremely clear it is not making some aliasing reinterpretation of it's arguments (e.g. can't be used on the lhs of a connect).