Eye Scan Architecture

Versal Adaptive SoC GTY and GTYP Transceivers Architecture Manual (AM002)

Document ID
AM002
Release Date
2023-10-26
Revision
1.3 English

The blocks shaded gray in the figure below describe the portion of the PMA architecture that supports eye scan. The horizontal offset (HORZ_OFFSET) advances or delays the sampling time of the offset samples relative to the data samples. The vertical offset (VERT_OFFSET) raises or lowers the differential voltage threshold to which the equalized waveform is compared. The data samples are deserialized into the Rdata bus, and the offset samples are deserialized into the Sdata bus.

When in DFE mode (CH*_RXLPMEN=0), due to the unrolled first DFE tap, two separate eye scan measurements are needed, one at +UT and one at –UT, to measure the TOTAL BER at a given vertical and horizontal offset.

Figure 1. PMA Architecture to Support Eye Scan

The figure below describes the portion of the PCS architecture that supports eye scan. The 80-bit Rdata bus contains the data samples, and each bit of the 80-bit Sdata bus is one if and only if the corresponding data sample and offset sample are not equal. (See ES_ERRDET_EN in Table 2.)

Figure 2. PCS Architecture to Support Eye Scan

In the figure above, the sample counter and error counter count the total number of bits examined and the total number of errors observed. (The sample count is scaled by ES_PRESCALE and int_datawidth. See Figure 4 and Figure 5.) The state machine controls the recording of Rdata and Sdata values in the FIFOs and the accumulation of counts in the sample counter and error counter. The functions of the various blocks in the above figure are as follows.

  • The FIFOs retain the two most recent cycles (a maximum of 160 bits) of Rdata and Sdata. This data serves the following purposes:
    • Support detection of errors by examination of Sdata.
    • Support detection of desired data patterns by examination of Rdata.
    • Provide data snapshots for external examination. The state machine might stop operation of the FIFOs under certain conditions, after which the FIFO contents can be read out to interconnect logic via the APB3 interface.
  • The count qualifier compares the Rdata FIFO contents against ES_QUALIFIER. Its output goes High to indicate a match, which enables the sample counter (via the prescaler) and the error counter to advance. High ES_QUAL_MASK bits omit selected bits of Rdata from the comparison. If all the bits are High, no bits of Rdata have to match, which means operation of the counters is always enabled. Setting some ES_QUAL_MASK bits Low inhibits counter operation unless the corresponding bits of Rdata match the specified pattern in ES_QUALIFIER. The count qualifier output is High if the condition (Rdata_FIFO[k] EQUALS ES_QUALIFIER[k]) OR ES_QUAL_MASK[k] is satisfied for every k in the range 0 to 159. For a statistical eye view, ES_QUAL_MASK is set to {160{1’b1}}. For a waveform view, some ES_QUAL_MASK bits can be set to 0 to constrain counter operation or to define a trigger for capturing Rdata and Sdata for examination.
  • The prescaler receives the count qualifier output signal and passes some sub-multiple of High values to the sample counter so that each increment of the sample counter corresponds to some multiple number of High outputs received from the count qualifier. ES_PRESCALE defines the number of High count qualifier outputs indicated by each sample counter increment, 2ES_PRESCALE+1, in the range 2 to 4,294,967,296.
  • The sample counter counts the total number of cycles (scaled by ES_PRESCALE) in which counting of bit errors is enabled by the count qualifier.
  • The error counter accumulates an error count over time. Counting the total number of bit errors for a statistical eye view requires setting ES_SDATA_MASK[159:80] = {80{1’b1}}. For this usage, the error counter counts the total number of bit errors (1-bits) in Sdata[79:0]. High ES_SDATA_MASK bits can omit selected bits of Sdata from being checked. Commonly, a statistical eye view uses ES_SDATA_MASK[159:0] = {80{1’b1}, 80{1’b0}} for 80-bit data (see the RX Margin Analysis Attributes table). Error bits in Sdata[159:80] are not counted because Sdata[159:80] contains the previous value of Sdata[79:0] that was counted in the previous cycle. The number of bit errors counted in a given cycle is the number of values of k in the range 0 to 79 for which the condition Sdata_FIFO[k] AND NOT ES_SDATA_MASK[k] is satisfied.

    For other usages of eye scan data (such as waveform view), exactly one bit of ES_SDATA_MASK[159:0] is set to 0. The error counter counts the number of errors in Rdata_FIFO[k] (i.e., Sdata_FIFO[k] = 1) for the bit k with ES_SDATA_MASK[k] = 0. Alternatively, if ES_ERRDET_EN is FALSE, the error counter counts the total number of times the offset data Sdata_FIFO[k] is 1, regardless of whether or not this is the erroneous value. If exactly one bit of ES_SDATA_MASK[159:0] is 0, or if at least one bit of ES_SDATA_MASK[159:80] is 0, then the error counter increments by 1 if the count qualifier output is High and the condition Sdata_FIFO[k] AND NOT ES_SDATA_MASK[k] is satisfied for any k in the range 0 to 159. If any bit of ES_SDATA_MASK[159:80] is 0, then error counter increments only by 1, and not by the total number of bit errors that might otherwise be detected within a single cycle.

  • The state machine controls the operation of the eye scan block to count errors or to capture snapshots of interest for Rdata and Sdata. It has two modes of operation, Run and Arm:
    • Run mode (the left loop in the figure below) supports statistical data collection for statistical eye, waveform, and scope views. It initiates operation of the sample counter and error counter as described above, stopping the operation when either the sample counter or the error counter saturates (reaches its maximum value), or when a APB3 operation terminates Run mode.
    • Arm mode (the right loop in the figure below) supports the capture of Rdata and Sdata snapshots (by disabling further FIFO operation) that can be read out through the APB3 interface. Arm mode can be used, for example, to determine data patterns that are prone to causing poor eye margin. These patterns can then drive generation of waveform views for further analysis. The state machine can be configured to stop Rdata and Sdata FIFO operation in these cases:
      • An error occurs (anywhere in Sdata_FIFO[159:0], subject to masking by ES_SDATA_MASK[159:0]).
      • Rdata matches a specified pattern (defined by ES_QUALIFIER and ES_QUAL_MASK).
      • Interconnect input EYESCANTRIGGER causes a trigger by going High.
      • A trigger is forced via an attribute write to ES_CONTROL.

The following figure documents the state transitions in the eye scan state machine.

Figure 3. Eye Scan State Machine

ES_CONTROL[1:0] are the signals arm and run, respectively. From the WAIT state, run initiates the BER measurement loop (left) and arm starts the diagnostic loop (right).

The RESET state zeros the error and sample counters, then enters the COUNT state or the ARMED state (depending on whether run or arm is active).

In the COUNT state, samples and errors are accumulated in the counters. When either counter is saturated, both counters stop and transition to the END state. This transition to the END state is detected by polling es_control_status[3:0]. Bit 0 (done) is set active only in the END, READ, and WAIT states. Bits [3:1] display the current state of the state machine.

The END state transitions to the WAIT state when run is set back to zero. The es_sample_count[15:0] and es_error_count[15:0] can be read either in the END or WAIT state.

In LPM mode, the BER is calculated as:

Figure 4. BER

In DFE mode, two error accumulations are required, one with EYESCAN_VS_UT_SIGN = 0 and one with EYESCAN_VS_UT_SIGN = 1. The bit error ratio is then calculated as:

Figure 5. BER in DFE Mode

To maintain resolution and repeatability of these error accumulations for “deep” BER values, ES_PRESCALE must be adjusted dynamically between accumulations, balancing the need for good repeatability against the desire to not take any longer than needed. That is, 1 or 2 errors on one accumulation might be 0 or 3 or 5 errors on a repeated accumulation, changing BER significantly. But 30 errors on one accumulation changing to 27 or 35 errors on another accumulation does not change BER significantly. The following table shows the required maximum ES_PRESCALE to confirm a given BER with a given bus width.

Table 1. Required Maximum ES_PRESCALE to Confirm BER at a Given Bus Width
Bus Width BER Floor (99.5% Confidence)
1E-06 1E-07 1E-08 1E-09 1E-10 1E-11 1E-12 1E-13 1E-14 1E-15
16 2 5 8 12 15 18 22 25 28 32
20 1 5 8 11 15 18 21 25 28 31
32 1 4 7 11 14 17 21 24 27 31
40 0 4 7 10 14 17 20 24 27 30
64 0 3 6 10 13 16 20 23 26 30
80 0 3 6 9 13 16 19 23 26 29

In the ARMED state, the FIFOs (successive cycles of Rdata and of Sdata) are stopped when a trigger event occurs. The trigger event is either the count qualifier pulse, the logical OR of all bits into the error counter, or a manual trigger provided from a APB3 data input or from a port. One of these four options is selected by trig[3:0] = ES_CONTROL[5:2].

In the READ state, the last two cycles of Rdata can be read from the APB3 read-only register, es_rdata[159:0], and the last two cycles of Sdata can be read from the APB3 read-only register, es_sdata[159:0].

Table 2. ES_HORZ_OFFSET Phase Offset Decoding Table
Rate Min Count [Dec(Bin)] Eye Center [Dec(Bin)] Max Count [Dec(Bin)]
Full –32 (11'b11111100000) +0 (11'b00000000000) +32 (11'b00000100000)
Half –64 (11'b11111000000) +0 (11'b00000000000) +64 (11'b00001000000)
Quarter –128 (11'b11110000000) +0 (11'b00000000000) +128 (11'b00010000000)
Octal –256 (11'b11100000000) +0 (11'b00000000000) +256 (11'b00100000000)
Hex –512 (11'b11000000000) +0 (11'b00000000000) +512 (11'b01000000000)
Table 3. ES_SDATA_MASK Description Table
ES_SDATA_MASK Description

ES_SDATA_MASK0

ES_SDATA_MASK1

ES_SDATA_MASK2

ES_SDATA_MASK3

ES_SDATA_MASK4

These five 32-bit quantities comprise the 160-bit ES_SDATA_MASK.

(ES_SDATA_MASK4[31:0] holds bits [159:128], etc.) This attribute masks up to two cycles of the 80-bit Sdata bus. Binary 1 causes the corresponding bus bit to be masked, and binary 0 leaves it unmasked.

To support the statistical eye view, the error counter accumulates the total number of unmasked 1's on the most recent cycle of the Sdata bus (masked by ES_SDATA_MASK[79:0]).

To support the waveform view, the error counter increments by only one for any non-zero number of unmasked 1’s on the previous cycle of the Sdata bus (masked by ES_SDATA_MASK[159:80]).

This attribute and ES_QUAL_MASK must also mask out unused bits for bus widths narrower than 80 bits. For the statistical eye view, this attribute would assume the following values as a function of bus width:

  • 80-bit width: ES_SDATA_MASK = ({80{1'b1}}, {80{1'b0}})
  • 64-bit width: ES_SDATA_MASK = ({80{1'b1}}, {16{1'b1}},{64{1'b0}})
  • 40-bit width: ES_SDATA_MASK = ({80{1'b1}}, {40{1'b1}}, {40{1'b0}})
  • 32-bit width: ES_SDATA_MASK = ({80{1'b1}}, {48{1'b1}},{32{1'b0}})
  • 20-bit width: ES_SDATA_MASK = ({80{1'b1}}, {60{1'b1}},{20{1'b0}})
  • 16-bit width: ES_SDATA_MASK = ({80{1'b1}}, {64{1'b1}},{16{1'b0}})

Scope and waveform views require a sequence of measurements, unmasking only a single bit per measurement.

Table 4. ES_QUALIFIER Description Table
ES_QUALIFIER Description

ES_QUALIFIER0

ES_QUALIFIER1

ES_QUALIFIER2

ES_QUALIFIER3

ES_QUALIFIER4

These five 32-bit quantities comprise the 160-bit ES_QUALIFIER.

(ES_QUALIFIER4[31:0] holds bits [159:128], etc.) Eye scan can qualify BER measurement based on patterns up to 80 contiguous bits long in any position in the input data. Because the data, and therefore the qualifier pattern, is not aligned, the position of the pattern must be discovered by a barrel-shifting search. For example, looking for the pattern 10’b0011111010 (K28.5 in 8B/10B code) with a 20-bit data width would require a sequence of measurements such as the following, searching for a non-zero sample count at the correct alignment:

  • ES_QUALIFIER = ({130{1’b?}}, 10’b0011111010, {20{1’b?}})
  • ES_QUALIFIER = ({129{1’b?}}, 10’b0011111010, {21{1’b?}})
  • ES_QUALIFIER = ({128{1’b?}}, 10’b0011111010, {22{1’b?}})
  • …etc… (where ? represents a DON’T CARE bit that will be masked)

The qualifier pattern is shifted only over the valid bits for the bus width (80, 64, 40, 32, 20, or 16). See the description of RX_INT_DATA_WIDTH.

Table 5. ES_QUAL_MASK Description Table
ES_QUAL_MASK Description

ES_QUAL_MASK0

ES_QUAL_MASK1

ES_QUAL_MASK2

ES_QUAL_MASK3

ES_QUAL_MASK4

These five 32-bit quantities comprise the 160-bit ES_QUAL_MASK. (ES_QUAL_MASK4[31:0] holds bits [159:128], etc.) This attribute masks those bits not included in the qualifier pattern. For example, the corresponding value for the K28.5 example above would be:

  • ES_QUAL_MASK = ({130{1’b?}}, {10{1’b0}}, {20{1’b?}})
  • ES_QUAL_MASK = ({129{1’b?}}, {10{1’b0}}, {21{1’b?}})
  • ES_QUAL_MASK = ({128{1’b?}}, {10{1’b0}}, {22{1’b?}})
  • ...etc...
Table 6. ES_RDATA_DWORD (Read-Only) Description Table
ES_RDATA_DWORD Description

ES_RDATA_DWORD0

ES_RDATA_DWORD1

ES_RDATA_DWORD2

ES_RDATA_DWORD3

ES_RDATA_DWORD4

These five 32-bit quantities comprise the 160-bit ES_RDATA. (ES_RDATA_DWORD4[31:0] hold bits [159:128], etc.) When a trigger event occurs in the ARMED state, ES_RDATA[79:0] is the present state of the Rdata bus, and ES_RDATA[159:80] is the previous state of the Rdata bus.

Note: This is a read-only attribute.
Table 7. ES_SDATA_DWORD (Read-Only) Description Table
ES_SDATA_DWORD Description

ES_SDATA_DWORD0

ES_SDATA_DWORD1

ES_SDATA_DWORD2

ES_SDATA_DWORD3

ES_SDATA_DWORD4

These five 32-bit quantities comprise the 160-bit ES_SDATA. (ES_SDATA_DWORD4[31:0] hold bits [159:128], etc.) When a trigger event occurs in the ARMED state, ES_SDATA[79:0] is the present state of the Rdata bus, and ES_SDATA[159:80] is the previous state of the Rdata bus.

Note: This is a read-only attribute.