Hi xbitmanip group,
One thing as far as the spec goes that may be worthwhile for clarity. In the section on shuffle and unshuffle, it's not immediately clear that the LSB of rs2 or the mode immediate being set indicates an unshuffle, or it being unset indicates a shuffle. Tables 2.2 and 2.3 hint at this after a bit of closer reading, and the supplied verilog samples in the xbitmanip repo clearly show this; however, the C code explanations starting on page 13 after Figure 2.3 of the permutation network without flip stages does not agree with this, or at best leads to confusion. In the C provided at there, for the input rs2 we check if bits zero, one, two, etc are set, rather than checking if bits one, two, three, and so on are set, which is closer to everything around it.
If I'm incorrect in understanding how the (un)shuffle operations are intended to be denoted via rs2 or the mode field, please let me know. But it still would seem to me that the C code in the spec seems a little off when looked at next to the verilog and other notes around in that section.
Thanks
John Burke