Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThe answer is somewhat more complex: the swapping depends on what your 64 bits at the input represent. For a 64 bit packet representing 8 bytes in little-endian we basically have 4 choices in big-endian format:
8 bit words -> the byte order remains -> b0 b1 b2 b3 b4 b5 b6 b7 16 bit words -> swap/reverse every pair -> b1 b0 b3 b2 b5 b4 b7 b6 32 bit words -> swap/reverse every quad -> b3 b2 b1 b0 b7 b6 b5 b4 64 bit words -> reverse all 8 -> b7 b6 b5 b4 b3 b2 b1 b0