How to pack oddly sized chunks of data into 128-bit FIFO
I think the term for this is a &quot;gearbox&quot;.  They are used all the time when interfacing with serializers - converting between 66 and 64 bits, 66 and 16 bits, etc.  Not sure about the proper way to do it aside from whatever gets the job done, although there may be more efficient techniques that I'm not currently aware of.  Personally, I wouldn't worry too much about wasting 3 bits.  It's a trade-off in logic complexity.  To use those 3 bits, you would probably have to implement a rather large barrel shifter, which consumes a lot of logic resources.  Another concern may be what's on the other end of the link, perhaps wasting a few bits as zero padding could be an advantage so you don't have to barrel-shift again when pulling things out of the FIFO.