Transmitters and receivers are used to perform communications over an optical link between communication devices. A transmitter is used to transmit an optical signal over the optical link, where the optical signal is received by a receiver. Before a transmitter and a receiver can successfully communicate data over an optical link, a link training process is performed over the optical link between the transmitter and the receiver. The link training process can be used to recognize capabilities of the communication devices on both ends of the optical link, to negotiate link frequencies, and so forth.
Some embodiments are described with respect to the following figures:
Communication devices (e.g. computers, storage devices, network devices, input/output (I/O) devices, processors, memory devices, etc.) that are coupled over an optical link can include transmitters and receivers that are used for transmitting optical signals and receiving optical signals, respectively. Examples of optical links include optical fibers, optical waveguides, and so forth.
In some implementations, the transmitters and receivers of the communication devices on the two ends of the optical link can use different core clock frequencies. A “core clock” refers to an oscillating signal having a particular frequency in a given communication device, where the oscillating signal is produced by a clock source that has an oscillator. The core clock can be used to drive various electrical circuitry in the transmitter or receiver.
At the transmitter, the electrical circuitry can include a signal driver that produces output electrical signals corresponding to data bits to be communicated. The electrical signals from the signal driver are provided to an optical element such as a laser diode, which is able to convert the electrical signals into corresponding optical signals that are transmitted over the optical link. The signal driver can be clocked by a core clock of the transmitter. An example of a laser diode is a vertical-cavity surface-emitting laser (VCSEL). Other examples of optical elements for transmitting optical signals can also be employed.
At the receiver, received optical signals are converted by an optical element, such as a photo diode or other type of photo detector, into electrical signals that are processed by electrical circuitry at the receiver. The electrical circuitry at the receiver can be clocked by a core clock at the receiver.
In some cases, the frequency of the core clock at transmitter in a first communication device can be different from a frequency of the core clock at the receiver in a second communication device.
In addition, the optical link can be associated with a link frequency, which is the frequency at which data signals are communicated over the optical link. The link frequency of data signals in a first direction from a first communication device to a second communication device over the optical link can differ from the link frequency of data signals from the second communication device to the first communication device over the optical link.
Due to the potential presence of different core clock frequencies and link frequencies in different directions over the optical link, there may initially be a lack of synchronization between a particular pair of a transmitter and a receiver in respective communication devices coupled to the two ends of an optical link. If synchronization between the transmitter and the receiver is not present, then a link training process cannot be successfully performed between the transmitter and the receiver over the optical link. A link training process can involve sending a predefined training pattern (referred to more generally as “training data”) from the transmitter to the receiver, to allow for the capabilities of the transmitter and the receiver to be determined, to negotiate link frequency, and so forth. If the transmitter and receiver are not synchronized, one of the transmitter and receiver may not be ready to transmit or receive data, respectively. In such a scenario, link training would fail since the training data would not be properly communicated between the transmitter and the receiver. In some examples, link training may be based on a timer-based protocol, where timer-based state transitions are used in the transmitter and receiver during the link training. Lack of synchronization between the transmitter and receiver would lead to the timer-based state transitions at the transmitter and receiver going out-of-sync.
In accordance with some implementations, techniques or mechanisms are provided to allow for an initial synchronization point to be identified before a link training process is started between a transmitter and a receiver. The initial synchronization can be achieved despite the fact that the transmitter and receiver coupled over an optical link may be associated with different core clock frequencies, and despite the fact that the link frequencies in a first direction over the optical link may differ from the link frequency in a second, opposite direction over the optical link.
The first communication device 102 includes a clock source 118 that outputs a core clock 120. Similarly, the second communication device 104 includes a clock source 122 that outputs a core clock 124. The core clock 120 is used by the transmitter 110 and receiver 116 in the first communication device 102, while the core clock 124 is used by the receiver 112 and the transmitter 114 in the second communication device 104. The frequency of the core clock 120 that is associated with the transmitter 110 and receiver 11 in the first communication device 102 can be different from the frequency of the core clock 124 in the second communication device 104. Moreover, it is noted that the link frequency between the communication devices 102 and 104 in a first direction over the lane 108 can differ from a link frequency in a second direction over the lane 108.
Before a link training process can begin over a given lane 108, an initial synchronization point between a transmitter and receiver in the respective communication devices 102 and 104 is first identified.
The receiver receives (at 202) a predetermined pattern over a given lane 108 of the optical link 106 from the respective transmitter (e.g. transmitter 110 or transmitter 114). The predetermined pattern can include a sequence of edge transitions (low-to-high edge transition and high-to-low edge transition). An example of a predetermined pattern 300 is depicted in
In the synchronization process 200, the receiver applies noise filtering (at 204) to the received predetermined pattern (e.g. 300 in
A “valid” predetermined pattern is one that satisfies at least one filter criterion (discussed further below in connection with
As part of the noise filter application (at 204), the receiver determines (at 206) whether the at least one filtering criterion is satisfied. In implementations where the filtering is performed in multiple stages, the determination (at 206) of whether the at least one filtering criterion is satisfied can be performed at each of the multiple stages. Further details regarding the determination at 206 are discussed further below in connection with
In response to determining that the predetermined pattern satisfies the at least one filtering criterion, the receiver indicates (at 208) that a synchronization point has been reached between the transmitter and receiver to allow link training to proceed with respect to the given lane. On the other hand, in response to detecting that the predetermined pattern does not satisfy the at least one filtering criterion, the receiver returns to task 202 to re-iterate the synchronization process 200 using another predetermined pattern.
The first filtering stage of the Detect state 402 receives a slow pattern (300). The first filtering stage checks that each of a predetermined number of transition edges (e.g. 314, 316, 318, and 320 in
In some examples, the predefined time interval can be expressed using the following parameters: PERIOD_MIN and PERIOD_MAX. PERIOD_MIN defines the leading edge of the predefined time interval, while PERIOD_MAX defines the lagging edge of the predefined time interval. In some examples, PERIOD_MIN and PERIOD_MAX can be expressed as respective numbers of core clock periods. In other examples PERIOD_MIN and PERIOD_MAX can be expressed in terms of absolute time.
For a given transition edge (e.g. 316 in
If a given transition edge occurs within the predefined interval defined by PERIOD_MIN and PERIOD_MAX, then an edge counter 408 associated with the Detect state 402 is incremented. The foregoing process continues for each subsequent transition edge of the slow pattern 300. The edge counter 408 is incremented each time a subsequent transition edge falls within the predefined interval from the last transition edge. When the edge counter 408 reaches a predefined count number (which can be expressed in a parameter EDGE_COUNT, for example), then the state machine 400 can transition from the Detect state 402 to the Calc state 404.
Once the edge counter 408 reaches the predefined count number in EDGE_COUNT, then the first filter stage of the Detect state 402 is considered to have observed the EDGE_COUNT number of transition edges in the slow pattern 300, where each of such transition edges satisfies the criterion of occurring within the predefined time interval (defined by PERIOD_MIN and PERIOD_MAX) from the last transition edge.
The transition from the Detect state 402 to the Calc state 404 is an indication that the lane over which the slow pattern 300 was received is chosen for purposes of the synchronization process.
A second filtering stage is applied in the Calc state 404. In some examples, the second filtering stage can include two filters. The second filtering stage samples data on the chosen lane, where the sampled data includes the slow pattern 300 on the chosen lane.
The two filters of the second filtering stage can operate independently of each other, and can be applied on the same sampled data (or alternatively, different sampled data). The first filter of the second filtering stage checks the slow pattern 300 for short-term instability of the slow pattern 300, while the second filter of the second filtering stage checks the slow pattern 300 for long-term instability. The state machine 400 remains in the Calc state 404 so long as the second filtering stage determines that the slow pattern 300 on the chosen lane satisfies the filter criteria of the first and second filters, until the following condition occurs: a predefined number (represented in a parameter NUM_EDGES, for example) of transition edges of the slow pattern 300 have been detected. If the slow pattern 300 on the chosen lane violates either of the filter criteria of the first and second filters of the second filtering stage, then the state machine 400 resets and returns to the Detect state 402.
In some implementations, the first filter of the second filtering stage checks that the length between a particular pair of slow pattern transition edges is within ±m (m≧1) core clock cycles of the length between a preceding pair of slow pattern transition edges. For example, in
Assuming m=2, then the following slow pattern sequence (where each digit corresponds to one core clock cycle) would satisfy the first filter criterion:
000001110000111111 . . .
In the foregoing sequence, each occurrence of “01” corresponds to a low-to-high transition edge, and each occurrence of “10” corresponds to a high-to-low transition edge. In the sequence, the first portion (00000) is five core cycles long, the second portion (111) is three core clock cycles long (which is within ±2 of five), the third portion (0000) is four core clock cycles long (which is within ±2 of three), and the fourth portion (111111) is six core clock cycles long (which is within ±2 of four).
However, assuming m=2, then the following slow pattern sequence would not satisfy the first filter criterion:
00000111000000111111 . . .
This sequence is the same as the former sequence, except that the third portion (000000) is six core clock cycles long, which is not within ±2 of three (which is the length of the second portion, 111).
Effectively, as noted above, the first filter checks for short-term instability in the slow pattern 300. If there is excessive variation (greater than ±m core clock cycles) in the lengths of successive pairs of transition edges, then that indicates that there is short term instability in the slow pattern 300. If short-term instability is detected, then the first filter criterion is violated, and the state machine 400 resets.
As noted above, the second filter of the second filtering stage checks for long-term instability in the slow pattern 300. The second filter determines whether lengths of successive sets of slow pattern transition edges are within ±p core clock cycles of each other. A set of slow pattern transition edges can include some predefined number (three or more, for example) of transition edges. Assuming the predefined number of transition edges is four, then the following would be an example set of transition edges of the slow pattern 300:
000111000111.
The above example first set is 12 core clock cycles long.
Assuming that p=1, the following second set (that immediately follows the above set in the slow pattern 300) would satisfy the second filter criterion:
00011000111.
The second set above is 11 core clock cycles long, which is within ±1 (note p=1 in this example) length (in terms of core clock cycles) of the first set.
However, the following third set (that immediately follows the second set) would not satisfy the second filter criterion:
0001110000111.
The third set is 13 core clock cycles long, which is not within ±1 of the length (in terms of core clock cycles) of the second set.
In the Calc state 404, a counter 410 is used to count the number of core clock cycles (at the receiver) it takes to receive a predefined number (NUM_EDGES) of transition edges in the slow pattern 300. This count value of the counter 410 corresponds to the ratio of the receiver link frequency to the receiver core frequency. The ratio can either be set equal to the count value of the counter 410, or be derived from the count value of the counter 410. The ratio can be used during link training to keep both sides of the optical link in synchronization. It is noted that the ratio can also be used to maintain optical link synchronization during other operations over the optical link that involve the transmitter and receiver.
Once the state machine 400 has detected NUM_EDGES transition edges and slow pattern 300 satisfies the filtering criteria of the second filtering stage, the state machine 400 transitions from the Calc state 404 to the Done state 406.
An example of how the ratio noted above can be used to keep both sides of the optical link in synchronization is discussed here. Once the Calc state is complete in the receiver at each side of an optical link, the corresponding receiver has its corresponding ratio, which effectively represents the number of receiver core clock cycles per slow pattern period. For example, a slow pattern period can have 7.5 receiver core clock cycles (Ratio 1) at a first side of the optical link, and can have 5 receiver core clock cycles (Ratio 2) at a second side of the optical link. The ratio information (Ratio 1 and Ratio 2) can be used for timer-based (also referred to as counter-based) link training state transitions. A link training state transition can refer to a transition of a state machine used in performing a link training procedure.
As an example, a link training state transition on either side of the optical link can occur after a programmable number (e.g. 10) of slow pattern periods. In this example, the state transition on a given side occurs after the time it takes for the transmitter to transmit 10 slow pattern periods or to receive 10 slow pattern periods, whichever is longer. Note that the transmitter does not have to be transmitting the slow pattern anymore, and can be transmitting data at the full link rate. In the foregoing example where it is assumed that Ratio 1 is 7.5 and Ratio 2 is 5, in performing a link training procedure, the first side waits 7.5*10 (=75) core clock cycles or waits for the transmitter to send 10 slow pattern periods worth of data (whichever is longer) before making a state transition, while the second side waits 5*10 (=50) core clock cycles or waits for the transmitter to send 10 slow pattern periods worth of data (whichever is longer) before making a state transition. Since the receivers and transmitters at both sides of the optical link perform state transitions in accordance with the above, the sides can remain synchronized with each other.
In
Note that if one of the lanes over which a slow pattern is broken (e.g. lane 6), then the optical link 106 can still be trained using the other lane, at half width.
Although slow patterns are transmitted over a specific combination of lanes in
Lane reversal in the example of
If a slow pattern is detected on a lane that is a reversed version of the transmission lane, such as detecting a slow pattern on lane 8 at the receiver side when the slow pattern was actually transmitted on lane 1 at the transmitter side, then lane reversal can be indicated. The ability to detect lane reversal of the optical link 106 can be accomplished prior to performing bit lock and symbol lock on the optical link 106 (when synchronization in communication of data bits and symbols has been achieved).
The various tasks discussed above, including those depicted in
Data and instructions are stored in respective storage devices, which are implemented as one or more computer-readable or machine-readable storage media. The storage media include different forms of memory including semiconductor memory devices such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; optical media such as compact disks (CDs) or digital video disks (DVDs); or other types of storage devices. Note that the instructions discussed above can be provided on one computer-readable or machine-readable storage medium, or alternatively, can be provided on multiple computer-readable or machine-readable storage media distributed in a large system having possibly plural nodes. Such computer-readable or machine-readable storage medium or media is (are) considered to be part of an article (or article of manufacture). An article or article of manufacture can refer to any manufactured single component or multiple components. The storage medium or media can be located either in the machine running the machine-readable instructions, or located at a remote site from which machine-readable instructions can be downloaded over a network for execution.
In the foregoing description, numerous details are set forth to provide an understanding of the subject disclosed herein. However, implementations may be practiced without some or all of these details. Other implementations may include modifications and variations from the details discussed above. It is intended that the appended claims cover such modifications and variations.