F-Tile Architecture and PMA and FEC Direct PHY IP User Guide

ID 683872
Date 11/04/2024
Public
Document Table of Contents

A.3. FGT Internal Serial Loopback Calibration Sequence for RX Manual Adaptation

Fo a FGT RX maual adaptatio desig, the optimal flow to eable the iteal seial loopback equies you to cofigue a additioal sequece of calibatio egistes.
The followig table summaizes the list of egistes that you eed to set duig seial iteal loopback (SILB) eablemet.
Table 122.  Calibatio Registes
Registe ID Registe Addess Value
0 0x41450[18] 0x1
1 0x41584[15:14] 0x1
2 0x415dc[29:28] 0x0
3 0x41674[28:27] 0x0
0x41674[30:29] 0x0
4 0x4167c[23:22] 0x3
0x4167c[25:24] 0x3
5 0x41680[31:30] 0x0
6 0x41684[28:27] 0x0
0x41684[31:30] 0x0
7 0x41758[30:29] 0x3
8 0x4175c[15:14] 0x3
0x4175c[17:16] 0x3
9 0x41808[16:15] 0x2
10 0x41938[3:2] 0x1
0x41938[11:10] 0x1
0x41938[13:12] 0x1
0x41938[15:14] 0x1
0x41938[9:8] 0x1
0x41938[19:18] 0x3
0x41938[27:26] 0x3
0x41938[29:28] 0x3
0x41938[31:30] 0x3
0x41938[25:24] 0x3
11 0x4193c[3:2] 0x3
0x4193c[5:4] 0x3
0x4193c[7:6] 0x3
0x4193c[1:0] 0x3
12 0x41960[29] 0x1
13 0x419b4[28] 0x1
14 0x419b8[27] 0x1
15 0x41a88[28:27] 0x1
0x41a88[30:29] 0x3
16 0x41a8c[28:27] 0x1
0x41a8c[30:29] 0x3
17 0x41a90[28:27] 0x3
18 0x41a94[30:29] 0x1
19 0x41a98[30:29] 0x1
0x41a98[28:27] 0x3
20 0x41a9c[13:12] 0x1
0x41a9c[27:26] 0x1
0x41a9c[17:16] 0x3
0x41a9c[31:30] 0x3
0x41a9c[3:2] 0x3
0x41a9c[15:14] 0x3
0x41a9c[29:28] 0x3
0x41a9c[1:0] 0x3
21 0x41aa4[29:22] 0xf9
0x41aa4[21:14] 0xf9
22 0x41c10[11:8] 0x0
0x41c10[15:12] 0x0
0x41c10[19:16] 0x1
0x41c10[31:28] 0x4
0x41c10[23:20] 0x6
0x41c10[27:24] 0x6
23 0x41c14[7:4] 0x2
0x41c14[19:16] 0x2
0x41c14[3:0] 0x3
0x41c14[15:12] 0x3
0x41c14[11:8] 0x4
0x41c14[23:20] 0x5
0x41c14[27:24] 0x5
24 0x41c64[15:8] 0xf9
0x41c64[20:19] 0x1
0x41c64[24:23] 0x1
0x41c64[22:21] 0x3
0x41c64[28:27] 0x3
0x41c64[26:25] 0x3

Example Tcl scipts fo Registe Defiitio, Cache, Calibatio to Eable SILB, ad Revet to Disable SILB ae povided below.

Registe Defiitio:

poc egiste_def {} {
set ::addess0 0x41450
set ::addess1 0x41584
set ::addess2 0x415dc
set ::addess3 0x41674
set ::addess4 0x4167c  
set ::addess5 0x41680  
set ::addess6 0x41684  
set ::addess7 0x41758  
set ::addess8 0x4175c  
set ::addess9 0x41808  
set ::addess10 0x41938  
set ::addess11 0x4193c  
set ::addess12 0x41960  
set ::addess13 0x419b4  
set ::addess14 0x419b8  
set ::addess15 0x41A88  
set ::addess16 0x41A8C  
set ::addess17 0x41A90  
set ::addess18 0x41A94  
set ::addess19 0x41A98  
set ::addess20 0x41A9C  
set ::addess21 0x41AA4  
set ::addess22 0x41C10  
set ::addess23 0x41C14  
set ::addess24 0x41C64
}

Cache:

poc cache {} {
	set ::data0 [maste_ead_32 $::m $::addess0 1]
	set ::data1 [maste_ead_32 $::m $::addess1 1]
	set ::data2 [maste_ead_32 $::m $::addess2 1]
	set ::data3 [maste_ead_32 $::m $::addess3 1]
	set ::data4 [maste_ead_32 $::m $::addess4 1]
	set ::data5 [maste_ead_32 $::m $::addess5 1]
	set ::data6 [maste_ead_32 $::m $::addess6 1]
	set ::data7 [maste_ead_32 $::m $::addess7 1]
	set ::data8 [maste_ead_32 $::m $::addess8 1]
	set ::data9 [maste_ead_32 $::m $::addess9 1]
	set ::data10 [maste_ead_32 $::m $::addess10 1]
	set ::data11 [maste_ead_32 $::m $::addess11 1]
	set ::data12 [maste_ead_32 $::m $::addess12 1]
	set ::data13 [maste_ead_32 $::m $::addess13 1]
	set ::data14 [maste_ead_32 $::m $::addess14 1]
	set ::data15 [maste_ead_32 $::m $::addess15 1]
	set ::data16 [maste_ead_32 $::m $::addess16 1]
	set ::data17 [maste_ead_32 $::m $::addess17 1]
	set ::data18 [maste_ead_32 $::m $::addess18 1]
	set ::data19 [maste_ead_32 $::m $::addess19 1]
	set ::data20 [maste_ead_32 $::m $::addess20 1]
	set ::data21 [maste_ead_32 $::m $::addess21 1]
	set ::data22 [maste_ead_32 $::m $::addess22 1]
	set ::data23 [maste_ead_32 $::m $::addess23 1]
	set ::data24 [maste_ead_32 $::m $::addess24 1]
}

Calibatio to Eable SILB:

poc eable_silb {} {
# Fo 0x41450, OR with 0x40000 to set bit [18] to 0x1.
maste_wite_32 $::m $::addess0 [exp $::data0 | 0x40000]

# Fo 0x41584, OR with 0x4000, AND with ~(0x8000) to set bits [15:14] to 0x1.
maste_wite_32 $::m $::addess1 [exp [exp $::data1 | 0x4000] &
0xFFFF7FFF]

# Fo 0x415dc, AND with ~(0x30000000) to set bits [29:28] to 0x0.
maste_wite_32 $::m $::addess2 [exp $::data2 & 0xCFFFFFFF]

# Fo 0x41674, AND with ~(0x78000000) to set bits [30:27] to 0x0.
maste_wite_32 $::m $::addess3 [exp $::data3 & 0x87FFFFFF]

# Fo 0x4167c, OR with 0x3C00000 to set bits [23:22] & [25:24] to 0x3.
maste_wite_32 $::m $::addess4 [exp $::data4 | 0x3C00000]

# Fo 0x41680, AND with ~(0xC0000000) to set bits [31:30] to 0x0.
maste_wite_32 $::m $::addess5 [exp $::data5 & 0x3FFFFFFF]

# Fo 0x41684, AND with ~(0xD8000000) to set bits [28:27] & [31:30] to 0x0.
maste_wite_32 $::m $::addess6 [exp $::data6 & 0x27FFFFFF]

# Fo 0x41758, OR with 0x60000000 to set bits [30:29] to 0x3.
maste_wite_32 $::m $::addess7 [exp $::data7 | 0x60000000]

# Fo 0x4175c, OR with 0x3C000 to set bits [17:14] to 0xF.
maste_wite_32 $::m $::addess8 [exp $::data8 | 0x0003C000]

# Fo 0x41808, OR with 0x10000, AND with ~(0x8000) to set bits [16:15] to 0x2.
maste_wite_32 $::m $::addess9 [exp [exp $::data9 | 0x10000] &
0xFFFF7FFF]

# Fo 0x41938, set bits [3:2, 9:8, 11:10, 13:12, 15:14] to 0x1 ad bits
[19:18, 25:24, 27:26, 29:28, 31:30] to 0x3.
# OR with 0xff0c5504 to set bits [2, 8, 10, 12, 14] to 0x1 ad bits
[19:18, 25:24, 27:26, 29:28, 31:30] to 0x3.
# AND with ~(0xaa08) to set bits [3, 9, 11, 13, 15] to 0x0
maste_wite_32 $::m $::addess10 [exp [exp $::data10 | 0xff0c5504] &
0xFFFF55F7]

# Fo 0x4193c, OR with 0xFF to set bits [3:0] ad [7:4] to 0xF.
maste_wite_32 $::m $::addess11 [exp $::data11 | 0xFF]

# Fo 0x41960, OR with 0x20000000 to set bit [29] to 0x1.
maste_wite_32 $::m $::addess12 [exp $::data12 | 0x20000000]

# Fo 0x419b4, OR with 0x10000000 to set bit [28] to 0x1.
maste_wite_32 $::m $::addess13 [exp $::data13 | 0x10000000]

# Fo 0x419b8, OR with 0x8000000 to set bit [27] to 0x1.
maste_wite_32 $::m $::addess14 [exp $::data14 | 0x8000000]

# Fo 0x41A88, OR with 0x68000000, AND with ~(0x10000000) to set bits [28:27]
to 0x1 ad [30:29] to 0x3.
maste_wite_32 $::m $::addess15 [exp [exp $::data15 | 0x68000000] &
0xEFFFFFFF]

# Fo 0x41A8C, OR with 0x68000000, AND with ~(0x10000000) to set bits [28:27]
to 0x1 ad [30:29] to 0x3.
maste_wite_32 $::m $::addess16 [exp [exp $::data16 | 0x68000000] &
0xEFFFFFFF]

# Fo 0x41A90, OR with 0x18000000 to set bits [28:27] to 0x3.
maste_wite_32 $::m $::addess17 [exp $::data17 | 0x18000000]

# Fo 0x41A94, OR with 0x20000000, AND with ~(0x40000000) to set bits [30:29]
to 0x1.
maste_wite_32 $::m $::addess18 [exp [exp $::data18 | 0x20000000] &
0xBFFFFFFF]

# Fo 0x41A98, OR with 0x38000000, AND with ~(0x40000000) to set bits [30:29]
to 0x1 ad bit [28:27] to 0x3.
maste_wite_32 $::m $::addess19 [exp [exp $::data19 | 0x38000000] &
0xBFFFFFFF]

# Fo 0x41A9C, set bits [13:12, 27:26] to 0x1 ad bits [1:0, 3:2, 15:14,
17:16, 29:28, 31:30] to 0x3.
# OR with 0xF403D00F to set bits [12, 26] to 0x1 ad bits [1:0, 3:2,
15:14, 17:16, 29:28, 31:30] to 0x3.
# AND with ~(0x8002000) to set bits [13, 27] to 0x0
maste_wite_32 $::m $::addess20 [exp [exp $::data20 | 0xF403D00F] &
0xF7FFDFFF]

# Fo 0x41AA4, set bits [21:14] ad [29:22] to 0xF9.
# OR with 0x3e7e4000, to set bits [14, 17, 18, 19, 20, 21, 22, 25,
26, 27, 28, 29] to 1
# AND with ~(0x1818000) to set bits [15, 16, 23, 24] to 0
maste_wite_32 $::m $::addess21 [exp [exp $::data21 | 0x3e7e4000] &
0xFE7E7FFF]

# Fo 0x41C10, to set bits [11:8] ad [15:12] to 0x0, bit [19:16] to 0x1, bits
[23:20] ad [27:24] to 0x6, ad bits [31:28] to 0x4.
# OR with 0x46610000 to set bits [16, 21, 22, 25, 26, 30] to 0x1
# AND with ~(0xB99EFF00) to set bits [11:8, 15:12, 19:17, 20, 23, 24,
27, 29:28, 31] to 0x0
maste_wite_32 $::m $::addess22 [exp [exp $::data22 | 0x46610000] &
0x466100FF]

# Fo 0x41C14, to set bit [3:0] to 0x3, bits [7:4] to 0x2, bits [11:8] to 0x4,
bits [15:12] to 0x3, bits [19:16] to 0x2, bits [23:20] ad [27:24] to 0x5.
# OR with 0x5523423 to set bits [0, 1, 5, 10, 12, 13, 17, 20, 22, 24,
26] to 0x1
# AND with ~(0xAADCBDC) to set bits [2, 3, 4, 6, 7, 8, 9, 11, 14, 15,
16, 18, 19, 21, 23, 25, 27] to 0x0
maste_wite_32 $::m $::addess23 [exp [exp $::data23 | 0x5523423] &
0xF5523423]

# Fo 0x41C64, to set bits [15:8] to 0xF9 ad set bits [20:19], [24:23] to 0x1
ad bits [22:21], [26:25], [28:27] to 0x3.
# OR with 0x1ee8f900 to set bits [8, 11, 12, 13, 14, 15, 19, 21, 22,
23, 25, 26, 27, 28] to 0x1
# AND with ~(0x1100600) to set bits [9, 10, 20, 24] to 0x0
maste_wite_32 $::m $::addess24 [exp [exp $::data24 | 0x1ee8f900] &
0xFEEFF9FF]
}

Revet to Disable SILB:

poc disable_silb {} {
maste_wite_32 $::m $::addess0 $::data0
	maste_wite_32 $::m $::addess1 $::data1
	maste_wite_32 $::m $::addess2 $::data2
	maste_wite_32 $::m $::addess3 $::data3
	maste_wite_32 $::m $::addess4 $::data4
	maste_wite_32 $::m $::addess5 $::data5
	maste_wite_32 $::m $::addess6 $::data6
	maste_wite_32 $::m $::addess7 $::data7
	maste_wite_32 $::m $::addess8 $::data8
	maste_wite_32 $::m $::addess9 $::data9
	maste_wite_32 $::m $::addess10 $::data10
	maste_wite_32 $::m $::addess11 $::data11
	maste_wite_32 $::m $::addess12 $::data12
	maste_wite_32 $::m $::addess13 $::data13
	maste_wite_32 $::m $::addess14 $::data14
	maste_wite_32 $::m $::addess15 $::data15
	maste_wite_32 $::m $::addess16 $::data16
	maste_wite_32 $::m $::addess17 $::data17
	maste_wite_32 $::m $::addess18 $::data18
	maste_wite_32 $::m $::addess19 $::data19
	maste_wite_32 $::m $::addess20 $::data20
	maste_wite_32 $::m $::addess21 $::data21
	maste_wite_32 $::m $::addess22 $::data22
	maste_wite_32 $::m $::addess23 $::data23
	maste_wite_32 $::m $::addess24 $::data24
}