US 7814376 B2
A frame delineation mechanism which alternately considers even and odd sync pattern position possibilities. With the addition of toggle logic, each of 66 possible states of even and odd alignment are exhausted in turn, odd, followed by even, followed by odd and so on, providing synchronization more quickly than known mechanisms. Additionally, faster convergence is reached due to the use of an exhaust register which keeps track of those alignment states that were tested but did not provide synchronization. Until synchronization is acquired, the states indicated in the exhaust register are ignored in further attempts to acquire synchronization.
1. A device for determining the frame boundaries of serialized framed data, the device comprising:
a serial to parallel converter for converting the serialized framed data to a parallel framed data;
a first register for receiving the parallel framed data from the serial to parallel converter and outputting a first output data word of the parallel framed data at a current cycle clock;
a second register for receiving the first output data word, and outputting a second output data word corresponding to a previous first output data word from the first register of a previous cycle clock;
a selector having a first port coupled to the second output data word, a second port coupled to a concatenated data word, and a third port configured to select the second output data word or the concatenated data word, wherein the concatenated data word is a concatenation of a portion of the first output data word and a portion of the second output data word;
a guesser for guessing a position of a frame boundary in the output data word selected by the selector;
a rotator for rotating the selected data word in accordance with the position guessed by the guesser;
a third register for storing a previous version of the rotated data word;
a select logic unit for combining a portion of the data word held in the rotator and a portion of data word held in the third register to form a data output block comprising two or more synchronization patterns;
a fourth register for storing the data output block;
a tester coupled to the fourth register for simultaneously monitoring the two or more synchronization patterns in the data output block;
a counting mechanism coupled to the tester and being configured to count the number of valid and invalid synchronization patterns; and
a state machine determining if the device is in a state of synchronization based on the counting mechanism, wherein said state machine is coupled to the third port of the selector and alternately provides the second output data word or the concatenated data word to the guesser and the rotator.
2. The device of
an exhaust register, the exhaust register storing one or more positions guessed by the guesser determined not to contain a frame boundary at a position guessed by the guesser.
3. The device of
4. The device of
5. The device of
6. The device of
7. The device of
8. The device of
9. The device of
a first counter for counting the number of valid synchronization patterns in the data output block; and
a second counter for counting the number of invalid synchronization patterns in the data output block.
10. The device of
11. The device of
12. The device of
13. The device of
The present invention relates generally to data communications, and more particularly to delineating the frame boundaries of framed data that is in a serial format.
In data communications, data is typically organized in structures such as packets which include multiple bits of data arranged in a predefined format. In transmission, it is common for data to be serialized and transmitted over a medium for reception at a remotely located receiver. At the receiver, in order to properly interpret the received data, it is necessary to reconstruct the received data in its original structure; e.g., if the data was originally organized in packets, it is necessary to delineate the original packet boundaries from the serialized data.
Frame delineation or alignment typically refers to a process or mechanism at the receive side of the network medium interface which realigns serially transmitted data into a known format and alignment for subsequent packet/frame or cell processing.
In some data communications systems, the individual bits of serialized data are recovered at the receiver using a clock derived from the serial data stream itself. Since the clock derived is dependent only on the “0” and “1” bit transitions, the recovered traffic need not be aligned to any position on the data path. Additional, synchronization information must be inserted into the serial data stream at the transmitter in order to mark or delineate packet or frame boundaries.
When performing packet or frame delineation, the probability that the synchronization information (e.g., “sync” bits, bytes, words) will be at an odd location with respect to the data path is the same as the probability that it will be at an even location. Due to the randomness of traffic from the network, a known approach has been to iteratively take a best guess at the position of the synchronization information and to prove or disprove the guess through repetitive checks. Prior art algorithms tend to stay on the odd or on the even guesses until all possibilities are exhausted. This approach may cause the acquisition time to be unnecessarily long.
In data communications, packet delineation functions are carried out by the Physical Coding Sub-layer (PCS). Components of this layer reside in both the transmitting and receiving ends of a communication. The PCS codes the data on transmission so that the alignment is recoverable on reception. At the transmitter, the PCS adds to each packet, at a fixed location within each packet, a pattern which the receiver looks for at reception.
In 10 Gb Ethernet for example, defined by IEEE Standard 802.3ae, the PCS packet delineation algorithm is referred to as “66b/64b .” In accordance with this algorithm, a two-bit sync pattern (or “sync header”) is inserted after every 64 bits of data. As such, for every 64 bits of data, 66 bits are transmitted. The 64b/66b algorithm replaces the 10b/8b algorithm used for Gigabit Ethernet (and below). This change was primarily motivated by the fact that a 25% overhead for this function was too costly at 10 Gb speeds which meant a loss of 2.5 Gb of bandwidth.
The implementation of a PCS algorithm involves a systematic transition among a synchronized state, an unsynchronized state, and a so-called “slip” state. The synchronized state is said to have been attained when a predetermined number of consecutive frames (e.g., 64) have been received correctly (i.e., with proper frame alignment). Synchronization is lost and the unsynchronized state is said to have been entered if a predetermined proportion of frames (e.g. 16 out of 64) are not received with proper frame alignment or the bit error rate (BER) exceeds a predetermined threshold. Once that occurs, the PCS algorithm will enter the slip state in which it attempts to acquire synchronization.
The duration of the slip state, which is indicative of the performance of the PCS algorithm, is typically sensitive to several considerations. A first consideration is the bias that the algorithm has as to whether the sync headers occur at even or odd positions (relative to some initial reference) within the serial data stream. An algorithm with an even bias will exhaust all of the even possibilities before considering any odd possibilities, whereas an algorithm with an odd bias will exhaust all of the odd possibilities before considering any even possibilities.
A second consideration is whether the algorithm looks for the sync header pattern only at a fixed position in the serial bit stream or whether it is capable of varying the position along the bit stream at which it will look for the sync header pattern. The former approach, which is typical of known implementations, further delays the acquisition of synchronization. This is because unless a hit occurs with the aligned position at the right time, several false sync positions may be taken, based on the pattern of data, until proven to be incorrect.
The present invention avoids the above discussed limitations of the prior art which contribute to delays in acquiring synchronization.
The present invention provides apparatus and methods for performing frame alignment (or synchronization) on serialized data. In an exemplary embodiment adapted to the 64b/66b scheme of 10 Gb Ethernet, the present invention provides a mechanism for acquiring frame synchronization substantially faster than known approaches. Unlike known algorithms which tend to stay on the odd or on the even possibilities until all possibilities are exhausted, the present invention alternates between the odd as well as even possibilities, increasing the likelihood of a faster acquisition of synchronization. The mechanism of the present invention tests various sync header positions by alternating between even and odd candidate alignments without being biased to first search all odd (even) candidates before searching all even (odd) candidates. This effectively consolidates the 66 possible states to 33, thereby reducing implementation complexity. Moreover, the mechanism of the present invention can search for synchronization headers wherever they may appear in the incoming serial bit stream, without needing to wait for the headers to occur at a particular position.
In a further aspect of the present invention, synchronization is achieved faster due to the use of an exhaust register which keeps track of candidate alignments which were tested but did not provide synchronization. By avoiding those candidates, the correct alignment can be attained more quickly. Several invalid iterations are thus avoided by steering the mechanism in the right direction.
These and other aspects of the present invention are described below.
In an exemplary embodiment of the present invention, a frame alignment method and apparatus are provided for 10 Gb Ethernet which uses a 66b/64b scheme, as described above.
Even though the exemplary embodiment described is for 10 Gb Ethernet with a 66b/64b scheme, as will be apparent, the present invention is not limited to a particular protocol or scheme.
As the serial data is received, it can be thought of as being shifted bit-wise into a 128-bit wide window whose contents are represented in
The table of
Another set of 33 possible states is illustrated in the right column for the case in which the sync bits are shifted by one bit position relative to those of the left column. When the first bit of each sync header falls at an odd bit position of the 128-bit window, the 128-bit window will successively take on the 33 states shown in the right column, which will be referred to as the “odd” states.
As such, there are a total of 66 possible states in which the 128-bit input shift register can be. The even and odd states in the table of
Frame alignment is achieved when the receiver has determined the position of the sync bits within the 128-bit window, or in other words, when it has determined which of the 66 states illustrated in
An exemplary embodiment of a synchronization acquisition method in accordance with the present invention entails making a best guess at the current positions of the sync bits within a 128-bit segment of the incoming bit stream (i.e., guessing which state of
An exemplary embodiment of a synchronization acquisition mechanism in accordance with the present invention will now be described with reference to
In describing the operation of the apparatus of
The parallel outputs of the S/P converter 303 are coupled to a first register 301 which is also 128 bits wide. For every 128 bits of the input serial data stream D(i) that is shifted into the S/P converter 303, the register 301 is clocked to latch in the outputs of the S/P converter 303. Given a bit rate of 10 Gb/sec, the first register 301 is clocked at a rate of 77 MHz. The period of this clock is also referred to herein as a cycle. As such, 128 bits of the input serial data stream D(i) are shifted into the S/P converter 303 and latched into the first register 301 every cycle.
The first register 301 is coupled to a second register 302, which is also 128 bits wide. During a second cycle, the contents of the first register 301 are latched into the second register 302. As such, the contents of the second register 302 are the same as the contents of the first register 301 one cycle later. In other words, after two cycles, the contents of the second register 302 are D(0)-D(127) and the contents of the first register 301 are D(128)-D(255), where D(0) is the earliest bit of the input serial bit stream.
A multiplexer 305 is coupled to the registers 301 and 302 so that bit 0 of register 301 and bits 1 through 127 of register 302 are coupled to a first set of 128 inputs of the multiplexer (labeled “ODD”) and bits 0 through 127 of register 302 are coupled to a second set of 128 inputs of the multiplexer (labeled “EVEN”). Under the control of a selection signal (ODD/EVEN), the multiplexer 305 provides either the 128 ODD inputs or the 128 EVEN inputs to corresponding outputs of the multiplexer. The 128 outputs of the multiplexer 305 are coupled in parallel to a variable rotator 308.
Given the aforementioned contents of the first and second registers after two cycles, when the EVEN inputs of the multiplexer 305 are selected, bits D(0)-D(127) are provided to the variable rotator 308. When the ODD inputs of the multiplexer 305 are selected, bits D(1)-D(128) are provided to the variable rotator 308. This mechanism thereby allows toggling (in accordance with the ODD/EVEN selection signal) between the even and odd states of the same number, as shown in
The output of the multiplexer 305 is monitored by a state guess block 306. When the system is in the slip state (i.e., when trying to establish synchronization) the state guess block 306 attempts to determine the location of the synchronization bits (01 and 01 or 10 and 10 separated by 64 bits) within the 128 bit data stream segment (i.e., D(0)-D(127)) currently at the output of the multiplexer 305. Stated differently, based on the output of the multiplexer 305, the state guess block 306 attempts to determine which of the 66 possible states illustrated in
When generating a guess, the state guess block 306 also considers the contents of an exhausted guess register 318. The exhausted guess register 318 keeps track of those states that have already been used as guesses since losing synchronization. The state guess block 306 further eliminates these states from the subset of possible states. The state guess block 306 then selects one of the subset of states as its guess of the current state of the incoming bit stream.
In an exemplary embodiment, the exhausted guess register 318 may comprise a 66-bit register, with each of the states of
The number of bits by which the variable rotator 308 rotates its input is controlled by a rotation controller 328. Upon generating a guess, the state guess block 306 indicates to the rotation controller 328 the state that was guessed. The rotation controller 328 determines the number of bit positions by which the variable rotator 308 is to rotate the 128-bit segment at its input.
The variable rotator 308 in conjunction with the state guess block 306 attempt to rotate the two-bit sync headers (ss), wherever they may be in the incoming bit stream, into fixed positions at the output of the variable rotator; in this embodiment, bit positions 0, 1 and 66, 67. Because the sync headers shift by four bits with each cycle (see
After the variable rotator 308 has performed the aforementioned rotation, its output is loaded into a register 309 which is 128 bits wide. The register 309 is loaded once every cycle. The contents of the register 309 at a given cycle correspond to the output of the variable rotator 308 at the previous cycle.
The output of the variable rotator 308 and the contents of the register 309 are then combined using selection logic 312 and provided to a register 314, which is 132 bits wide. The selection logic 312 selects the x most significant bits (MSBs) at the output of the rotator 308 and the 132-x least significant bits (LSBs) of the register 309, where x is equal to the rotate amount as determined by the rotate controller 328. As such, bit positions 0 through 131-x of register 314 correspond to the 132-x LSBs of register 309 and the remaining, higher order bits of register 314 correspond to the x MSBs of the output of the variable rotator 308.
This operation of combining the outputs of the variable rotator 308 and the register 309 to form the 132-bit contents of register 314 is illustrated in the table of
As a result of the above operations, if the state guessed by the state guess block 306 is correct, there will be sync headers at bit positions 0, 1 and 66, 67 of register 314. These bit positions are monitored by a sync header test block 310 which determines if they contain proper sync headers. The sync header test block 310 is coupled to a valid frame counter 315 and an invalid frame counter 316. If both sync headers are correct, i.e., if the sync header test block 310 determines that the bits 0, 1 and 66, 67 of register 314 have the proper values (i.e., 0101 or 1010) for a given cycle, the valid frame counter 315 is incremented by two for that cycle. If both sync headers are incorrect, i.e., if the sync header test block 310 determines that the bits 0, 1 and 66, 67 of register 314 do not have the proper values (0101/1010), the invalid frame counter 316 is incremented by two for that cycle. If one of the headers in register 314 is correct and the other is incorrect, both the valid frame counter 315 and the invalid frame counter 316 are incremented by one.
The counters 315 and 316 are reset whenever the system changes states (i.e., from in synchronization to out of synchronization or the reverse).
The contents of the counters 315 and 316 are provided to a PCS state machine 320 which keeps track of and manages the state of the synchronization mechanism. The PCS state machine 320 determines when the system is in a state of synchronization, when it is out of synchronization, and when to enter the “slip” state. The other elements of the apparatus 300 operate accordingly.
As each guess by the state guess block 306 is implemented, the PCS state machine 320 qualifies each guess over 64 frames of the incoming bit stream data. If there are 64 consecutive valid frames, i.e., if the valid counter 315 has a count of 64, the system is deemed to be in synchronization (i.e., the current guess is correct). The PCS state machine 320 transitions to the synchronized state and asserts the IN_SYNC signal.
If, however, the guess made by the state guess block 306 is incorrect, the invalid frame counter 316 will eventually reach 16, in which case the PCS state machine 320 transitions to the unsynchronized state and asserts the OUT_SYNC signal. All parameters including the contents of the counters 315 and 316 and of the exhaust register 318 are cleared and the above-described synchronization acquisition process is repeated, starting with a new guess by the state guess block 306.
The above-described odd/even state toggling mechanism (301, 302, 305) allows the system to quickly transition between the even and odd states illustrated in the table of
A counter 322 keeps track of the number of frames that have been processed since the last change of state of the PCS State Machine 320.
Further, as an additional test of synchronization, the bit error rate is monitored over 125 μs and constant above par errors, even if they are not enough to lose synchronization will trigger a high bit error rate test and take the synchronizer out of sync. A bit error rate (BER) block 324 is included in the exemplary embodiment for this purpose.
It is to be understood that while the invention has been described above in conjunction with preferred specific embodiments, the description is intended to illustrate and not to limit the scope of the invention, as defined by the appended claims. Indeed, various modifications of the invention in addition to those described herein will become apparent to those skilled in the art from the foregoing description and the accompanying figures. Such modifications are intended to fall within the scope of the appended claims.
It is further to be understood that all values are to some degree approximate, and are provided for purposes of description.
The disclosures of any patents, patent applications, and publications that may be cited throughout this application are incorporated herein by reference in their entireties.