Altera Corporation
2–117
October 2007
Stratix II GX Device Handbook, Volume 2
Stratix II GX Transceiver Architecture Overview
Two critical aspects related to PLD-controlled byte ordering process are:
■
What to choose as the byte ordering pattern
■
When to assert the
rx_enabyteord
signal
In Stratix II GX configurations, PLD-controlled byte ordering is available
only in SONET/SDH OC-48 mode or Basic double-width mode. In
SONET/SDH OC-48 mode, byte A2 of the A1A2 word alignment pattern
is automatically selected as the byte ordering pattern. In Basic
Double-Width mode, you programs the byte ordering pattern while
configuring the transceiver using the MegaWizard Plug-In Manager.
Since the byte ordering block is designed to place the byte ordering
pattern at the LSByte position, you must select a pattern that appears at
the LSByte position at the source. This ensures that when the byte
ordering block pushes the byte ordering pattern byte to the LSByte
position at the receiver, the data is correctly byte ordered. Ideally, if this
pattern is unique and is guaranteed to appear only at the LSByte position
at the source, the instance at which the
rx_enabyteord
signal is
asserted becomes irrelevant. For example, in packet-based 8B/10B
encoded links, you could choose the Start of Packet (SOP) byte as the byte
ordering pattern if it is a unique control code (say K28.0). In non 8B/10B
scrambled data links, it may be difficult to find a unique pattern since
there is a possibility of the pattern appearing in the scrambled payload
and causing the byte ordering block to add pad bytes incorrectly. In such
cases, the instance at which the
rx_enabyteord
signal is asserted
becomes critical.
The
rx_enabyteord
signal must be asserted after the word aligner has
aligned to the correct word boundary. This ensures that the byte ordering
block does not find a byte ordering pattern between the word boundaries.
If the
rx_enabyteord
signal is asserted before the intended byte
ordering byte appears at the receiver, then the byte ordering block will
add necessary pad bytes to achieve correct byte ordering. If the
rx_enabyteord
signal is asserted before the unintended data byte that
matches the byte ordering pattern, then the byte ordering block may
incorrectly add pad bytes and assert the
rx_byteorderalignstatus
signal. In the SONET/SDH OC-48 configuration, since the receiver
anticipates the byte ordering pattern A2 every 125
μ
s, the
rx_enabyteord
signal assertion can be easily timed to avoid incorrect
byte ordering. In Basic Double-Width mode, it is up to you to either select
a unique byte ordering pattern or an appropriate instance to assert
rx_enabyteord
, depending on the dynamics of the implemented
protocol.