https://github.com/lambdaconcept/minerva/blob/master/minerva/units/shifter.py#L27 found something that can simplify this: https://git.libre-riscv.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part_shift/bitrev.py;hb=HEAD
michael i thought this is a neat trick, refer to the signal with a reverse slice.