AR# 66517

Manual Eye Scan with UltraScale GTY in 10 steps


Manual Eye Scan:

UltraScale GTY allows a real-time, not disruptive Eye Scan. The User can at the same time receive data and check the equalized signal eye extension for a full BER and signal margin control, without missing a single bit.

Most of the information required can be found in (UG578) UltraScale and UltraScale+ GTY, RX Margin Analysis.

This Answer Record will guide you through a step-by-step simple case of running a Manual Eye Scan.


The Eye Scan feature is already implemented in IBERT, where a GUI helps with a simple customization of the Eye Scan, and IBERT drives the Eye Scan automatically.

However, some additional HDL is required to pair the Eye Scan feature with your design (this option is referred to here as Manual Eye Scan).

Because the Eye Scan engine is controlled by a few attributes mapped in the DRP space, most of the required code is just to take care of the DRP Read, Modify and Write operations.

For those designs where the DRP port is already used, this comes for free.

The ports required for the Eye Scan are listed in Table 4-18 of UG578. In a small number of cases, one additional port (EYESCANRESET) might be needed.

The following steps are required once before a Manual Eye Scan:

    1. Correctly set the Eye Scan attributes
    2. Reset the GT (with EYESCANRESET included)


The following steps can be cycled during an Eye Scan sweep

    1. Set the offset sampler position
    2. Trigger the Eye Scan State Machine
    3. Evaluate the counters values at the end of the scan process


The Manual Eye Scan can get very sophisticated, and can do the following:

  • Sweep the full eye or part of it
  • Run continuously or one shot
  • Vary the BER target depending on the offset sampler position
  • Evaluate the signal quality and monitor its changes with time

It can also have different utilities to a plain Eye Scan, as will be shown later.

However, the atomic access to the Eye Scan will always step through the simple passages given. There are many options to get to the same result; probably the more flexible is to let a microprocessor handle the Eye Scan.

A very fast Eye Scan could be developed entirely in HDL. (Xilinx Answer 64098) is a good example of a simple Eye Scan measurement realized with the ILA.

Differences between ES2 and Production Silicon

There are important differences between the two silicon releases. The setup for ES2 will give incorrect results if applied to Production Silicon. The differences are given in the table below:


Datarate < 10Gbps Datarate >= 10Gbps
ES_HORZ_OFFSET[11] same as [10] same as [10]

Table 1 - ES_HORZ_OFFSET[11] and USE_PCS_CLK_PHASE_SEL setup per datarate and ES2 Silicon


Datarate < 10Gbps Datarate >= 10Gbps
(*) might need the phase realignment

Table 2 - ES_HORZ_OFFSET[11] and USE_PCS_CLK_PHASE_SEL setup per datarate and Production Silicon

GTY DRP address:

The relevant DRP addresses for GTY Eye Scan can be found in the table below  

DRP Address Hex US DRP Bits R/W Name Attribute Bit
251 15:0 R es_error_count 15:0
252 15:0 R es_sample_count 15:0
253 3:0 R es_control_status 3:0
28C 15:0 R es_rdata_byte9 159:144
28B 15:0 R es_rdata_byte8 143:128
28A 15:0 R es_rdata_byte7 127:112
289 15:0 R es_rdata_byte6 111:96
288 15:0 R es_rdata_byte5 95:80
254 15:0 R es_rdata_byte4 79:64
255 15:0 R es_rdata_byte3 63:48
256 15:0 R es_rdata_byte2 47:32
257 15:0 R es_rdata_byte1 31:16
258 15:0 R es_rdata_byte0 15:0
287 15:0 R es_sdata_byte9 159:144
286 15:0 R es_sdata_byte8 143:128
285 15:0 R es_sdata_byte7 127:112
284 15:0 R es_sdata_byte6 111:96
283 15:0 R es_sdata_byte5 95:80
259 15:0 R es_sdata_byte4 79:64
25A 15:0 R es_sdata_byte3 63:48
25B 15:0 R es_sdata_byte2 47:32
25C 15:0 R es_sdata_byte1 31:16
25D 15:0 R es_sdata_byte0 15:0


Table 3 - Relevant Eye Scan attributes: DRP address for GTY US

Flow diagram and step by step GTY Eye Scan

Once the transceiver is correctly set up and working, the basic Eye Scan goes through the measurement loop of the FSM. The FSM default startup state is WAIT.

By changing the ES_CONTROL[1:0] (the signals arm and run, respectively), from the WAIT state, run initiates the BER measurement loop (left) and arm starts the diagnostic loop (right). In this Answer Record only the measurement loop is explored.

The FSM automatically starts the error counting and the received samples counting. The counters are updated continuously, until one of the two counters reaches the saturation point. At this point the FSM reaches the state END.

We always have access to the FSM actual status by reading the ES_CONTROL_STATUS.

In the END status it is possible to read the counters and calculate the BER.


10 Steps for a BER measurement

The following step by step path should guide you to a single sample position error measurement in LPM mode, when the offset sampler is on 0V differential and +4/64 UI right offset.

By sweeping the offset sampler position inside the eye extension, the user can complete the Eye Scan. Please refer to the User Guide for the complete description of each attribute used.


Step 1: Set ES_HORZ_OFFSET[11] and USE_PCS_CLK_PHASE_SEL in accordance with Table 1 and Table 2

Step 2: Reset the GT: the GT should be up and running. Here for example, you configure the transmitter and receiver equalizers, run the reset sequences, wait for reset done, and check that buffers are not overflowing etc.. In this example the LPM mode is used.

Step 3: Be ready for the scan:

ES_CONTROL [5:0] = 6b000000

ES_EYE_SCAN_EN = 1b1 enables the Eye Scan

ES_ERRDET_EN = 1b1 enables the error detection: each bit of the Sdata bus is 1 if and only if the corresponding offset data sample does not agree with the recovered data sample.

ES_PRESCALE according to the BER target (we can set it to be very small initially: i.e. 5b00100)

Step 4: Before running the error counting, we need to tell the Eye Scan engine what to measure. This is well described in the User Guide, in the Eye Scan Architecture chapter. 

Commonly, a statistical eye view uses the following:

ES_SDATA_MASK = {80{1b1}, 80{1b0}} for 80-bit data

ES_QUAL_MASK = {160{1b1}}

Step 5: set the vertical offset. For example:

RX_EYESCAN_VS_NEG_DIR = 1b0 (Equivalent to ES_VERT_OFFSET[7] in 7 series devices)

RX_EYESCAN_VS_UT_SIGN = 1b0 (Equivalent to ES_VERT_OFFSET[8] in 7 series devices)

RX_EYESCAN_VS_CODE = 7b0000000 (Equivalent to ES_VERT_OFFSET[6:0] in 7 series devices)

RX_EYESCAN_VS_RANGE = 2b00 (This sets scale factor for eye scan)

Step 6: set the horizontal offset position. For example, 4 taps to the right with respect to the data sampler:

ES_HORZ_OFFSET[10:0] = 11'b00000000100

Step 7: run the Scan by bringing the FSM to RESET and decide on the measurement loop:

Set the ES_CONTROL = 6b000001

Step 8: check that the FSM is in END status.

Read ES_CONTROL_STATUS should be equal to 3b010

Step 9: when the FSM is in END status we can finally read errors, samples, and calculate the BER.

Step 10: bring back the FSM to WAIT status and cycle again.

set ES_CONTROL [5:0] = 6b000000


Repeat for a different offset position starting from Step 5.

The Realignment sequence

The realignment sequence has been introduced for Production silicon and datarates below 10Gbps. The aim of this sequence is to get a correct sync between the Eye Scan clock and the data clock. 

In case of bad synchronization, the error counter will saturate and the Eye Scan will show a closed eye. The sequence should be executed at the end of the Eye Scan measurement, if the eye appears completely closed, even if there are no data errors.

The sequence below moves the Eye Scan clock in 2 UI increments. The realignment sequence is as follows:

  1. ES_HORZ_OFFSET = x880
  3. ES_HORZ_OFFSET = x800


AR# 66517
日期 05/09/2017
状态 Active
Type 综合文章