Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- The 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 --- Quote End --- you are right.Actrually,It's 64 bit words in this case.You just reminded me other cases that I've not noticed.In my case,I need input [63:0]data to the FIFO,and read out as the sequence of [63:56]、[55:48].....[7:0].So I must reverse all bytes at the input port first.