Altera_Forum
Honored Contributor
13 years agoALTGX byte ordering?
I'm receiving data via the ALTGX PIPE interface (PCI Express). I'm seeing that the byte ordering is random. The Arria II GX handbook states (page 1-35) that
"Byte Ordering Depending on when the receiver PCS logic comes out of reset, byte ordering at the output of the byte deserializer may not match the original byte ordering of the transmitted data. The byte misalignment resulting from byte deserialization is unpredictable because it depends on which byte is being received by the byte deserializer when it comes out of reset." and "The byte ordering block looks for the user-programmed byte ordering pattern in the byte-deserialized data. You must select a byte ordering pattern that you know appears at the LSByte(s) position of the parallel transmitter data. If the byte ordering block finds the programmed byte ordering pattern in the MSbyte(s) position of the byte-deserialized data, it inserts the appropriate number of user-programmed PAD bytes to push the byte ordering pattern to the LSByte(s) position, thereby restoring proper byte ordering." Apparently, the byte ordering block is not part of the PCS in PIPE mode. Then, how can I find the order of the bytes as they were sent on the wire? I suppose I could detect the COM+SKP+SKP+SKP ordered set which is periodically sent and swap the bytes if in the incorrect order. This, however, will not work when receiving the PCI Express compliance test pattern or some other data that may not have the SKIP ordered set in it (for some reason).