Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFIFO output BigEndian or LittleEndian!
hi,when using FIFO of LPM,output width is made different from input width,if I make input[63:0] and output[7:0],the waveform shows that the output starts from the LSB of the input ,ie,[7:0]、...
Altera_Forum
Honored Contributor
15 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