JESD Appnote
JESD Appnote
This document deals with basics of JESD and debug hooks for JESD link. It doesn’t deal with programming and assumes the programming
is correctly done, as generated by the Latte tool.
For accessing JESD registers, first the appropriate page should be selected.
There are two types of SERDES registers. Some registers are common to the 4 lanes, and there are lane specific registers.
Accessing the SERDES registers is not direct as they are 16-bit wide and SPI is 8-bit. For writing to register address, A, first write the
MSB 8-bits of the data to address 2*((A+0x2000)[13:0])+1 and then the LSB 8-bits to 2*((A+0x2000)[ [13:0]). Accessing only 8-bits
is not possible. The complete 16-bits should be accessed in the same sequence.
For example to write 0x1234 to register 0x8413,
Step 1: Data to write is 0x12. Address to write 0x413*2+1=0x827.
0x4827 0x12
Step 2: Data to write is 0x34. Address to write 0x413*2=0x826.
0x4826 0x34
Read is also similar, however, each read should happen twice and only the second read is valid. To read register, 0x8413,
Step1: Read 0x4827 discard the read.
Step2: Read 0x4827 the read back value is the MSB.
Step3: Read 0x4826 discard the read.
Step4: Read 0x4826 the read back value is the LSB.
Note: In register map, the MSB and LSB addresses are directly given. While accessing, you need to access both together. Not doing so
will result in invalid access to SerDes resulting in bad state of SerDes which can be recovered from only on reset.
Lane Page Select Serdes Lane Prefix (16-bit Serdes Lane Prefix (8-Bit
Format) Format)
1 0x0016 0x20 0x81xx 0x42xx, 0x43xx
2 0x0016 0x20 0x80xx 0x40xx, 0x41xx
3 0x0016 0x20 0x82xx 0x44xx, 0x45xx
4 0x0016 0x20 0x83xx 0x46xx, 0x47xx
5 0x0016 0x40 0x83xx 0x46xx, 0x47xx
6 0x0016 0x40 0x82xx 0x44xx, 0x45xx
7 0x0016 0x40 0x80xx 0x40xx, 0x41xx
8 0x0016 0x40 0x81xx 0x42xx, 0x43xx
3. SERDES PLL:
There is one PLL each for SERDES TX and SERDES RX of top 4 lanes and another set of PLLs for bottom 4 lanes.
When SERDES firmware is loaded, bit 7 of 0x160 register of the JESD RX page, gives the status of the SERDES PLL lock. If this bit
is 1, PLL didn’t lock and if it is 0, PLL locked. Note that the alarm has to be cleared before reading.
Address
Register Property Name (choose the right MSB LSB
lane)
RX_PRBS_CONFIGURAT RX_POLARITY_FLIP 0x8042 0 0
ION
NRZ_TX_TEST_PATTER TX_POLARITY_FLIP 0x80a0 0 0
N_CONFIGURATION
Address
Register Property Name (choose the right MSB LSB
lane)
Register 54h adc_jesd_sync_n0 0x54 2 0
Register 54h adc_jesd_sync_n1 0x54 6 4
Register 55h adc_jesd_sync_n2 0x55 2 0
Register 55h adc_jesd_sync_n3 0x55 6 4
Register 56h adc_jesd_sync_n4 0x56 2 0
Register 56h adc_jesd_sync_n5 0x56 6 4
d. Try overriding the Sync signal and see if the response is as expected. Each of these below map to 6 sync signals.
The ‘_ovr’ will override the pin value with the corresponding value of ‘_val’. Writing 0s into ‘_val’ will send K characters and
writing 1 will send K characters. To let the sync signal determine what is being sent, write 0 to ‘_ovr’.
Address
Register Property Name (choose the right MSB LSB
lane)
Register 58h adc_jesd_sync_n_sel0_spi_ovr 0x58 0 0
Register 58h adc_jesd_sync_n_sel1_spi_ovr 0x58 1 1
Register 58h adc_jesd_sync_n_sel2_spi_ovr 0x58 2 2
Register 58h adc_jesd_sync_n_sel3_spi_ovr 0x58 3 3
Register 58h adc_jesd_sync_n_sel4_spi_ovr 0x58 4 4
Register 58h adc_jesd_sync_n_sel5_spi_ovr 0x58 5 5
LINK0_SYNC_REQUEST_ENA 0x78 7 0 Each of the bits for the above-mentioned lane errors are
mapped to:
bit7 = JESDB: multiframe alignment error
bit6 = JESDB: frame alignment error
Lanes and corresponding registers: Note that the lane numbers are post lane mux (towards the protocol layer).
As a common possibility for any of the following errors, ensure that the Eye is in good, polarities are as expected, and the lane rates of AFE
and the ASIC/FPGA are same.
received.
3 elastic buffer match error Didn’t receive 1C as first non-K -do-
character.
4 elastic buffer overflow Elastic buffer has overflown. Change RBD Value.
5 link configuration error ILA parameters are not matching. Ensure that all ILA parameters are as
expected and lane IDs are same for
transmitter and receiver. This is important
to check this when lane mux is employed.
6 frame alignment error Frame Alignment failed. Ensure that F is same for transmitter and
receiver.
7 multiframe alignment error Multi-Frame Alignment failed. Ensure that K is same for transmitter and
receiver.
As a common possibility for any of the following errors, ensure that the Eye is in good, polarities are as expected, and the lane rates of AFE
and the ASIC/FPGA are same.
7. RBD Setting:
8. SERDES Debug:
a. Read out the Eye Margin for each lane (post equalization) using the below C function and ensure that it is more than 800. The
read value *0.5 is the approximate serdes eye height in peak. If the SERDES Eye is poor, continue debugging as below.
getSerdesRxLaneEyeMarginValue function can be used.
b. Ensure that before the AFE is initialized, the ASIC serdes TX is configured and sending a random pattern on the lanes.
c. The STX cursor can be set using SetSerdesTxCursor function.
d. There are PRBS 9, 15, 23 and 31 available both on SERDES TX and RX.
C Functions below can be used to check do the PRBS test.
1. enableSerdesRxPrbsCheck: Enable and setting the PRBS Mode for SERDES RX.
2. getSerdesRxPrbsError: Count the number of PRBS errors.
3. sendSerdesTxPrbs: Enable and setting the PRBS Mode for SERDES TX.
Receiver test can be done by setting same pattern in ASIC/FPGA TX and then reading the receiver errors using:
getSerdesRxPrbsError function. If this value is changing, that means there are errors.
e. Complete eye diagram of the SerDes can be read using the C function getSerdesEye.
The cursors of a 3-tap FFE can be adjusted for SerDes TX pre-emphasis. The settings are the
values to be programmed to the SerDes register/C function. Higher is the main cursor value, the
larger is the swing. The pre-cursor and post-cursor equalizations are to be looked at in relative
sense. Those may not be absolute equalization provided.
0 19 0 0 3 0
0 17 0 0 4 0
0 15 0 0 5 0
0 13 0 0 6 0
0 11 0 0 7 0
0 24 0.72 0 0 1
0 20 0.87 0 2 1
0 16 1.09 0 4 1
0 12 1.45 0 6 1
0 23 1.51 0 0 2
0 21 1.66 0 1 2
0 15 2.33 0 4 2
0 22 2.38 0 0 3
0 13 2.69 0 5 2
0 21 3.35 0 0 4
0 19 3.71 0 1 4
0 14 3.78 0 4 3
0 17 4.17 0 2 2
0 20 4.44 0 0 5
0 15 4.75 0 3 2
0 16 5.62 0 2 5
0 19 5.68 0 0 6
0 17 6.41 0 1 6
0 18 7.13 0 0 7
0.72 24 0 1 0 0
0.87 20 0 1 2 0
0.87 22 1.66 1 0 2
1.09 16 0 1 4 0
1.09 20 3.71 1 0 4
1.45 12 0 1 2 0
1.45 14 2.69 1 4 2
1.45 16 4.75 1 2 4
1.45 18 6.41 1 0 6
1.51 23 0 2 0 0
1.66 21 0 2 1 0
1.66 22 0.87 2 0 1
2.33 15 0 2 4 0
2.33 19 4.17 2 0 4
2.38 22 0 3 0 0
2.69 18 5.62 2 0 5
2.69 13 0 2 5 0
2.69 14 1.45 2 4 1
2.69 17 4.75 2 1 4
3.35 21 0 4 0 0
3.71 19 0 4 1 0
3.71 20 1.09 4 0 1
3.78 18 4.75 3 0 4
3.78 14 0 3 4 0
4.17 17 0 4 2 0
4.17 19 2.33 4 0 2
4.44 20 0 5 0 0
4.75 15 0 4 3 0
4.75 16 1.45 4 2 1
4.75 18 3.78 4 0 3
4.75 17 2.69 4 1 2
5.62 16 0 5 2 0
5.62 18 2.69 5 0 2
5.68 19 0 6 0 0
6.41 18 1.45 6 0 1
6.41 17 0 6 1 0
7.13 18 0 7 0 0