Are you an LLM? You can read better optimized documentation at /zh/docs/UB-Base-Specification-2.1.0/physical-layer/3_4/3_4_1/ltb.md for this page in Markdown format
LTB
LTB(Link Training Block)是LMB的一种。在链路训练期间,在一条Link的两端互相收发LTB进行链路训练。
本规范定义了4种类型的LTB:
DLTB(Discovery LTB),CLTB(Config LTB),RLTB(Retrain LTB),ELTB(Equalization LTB)。
如果当前LTB的symbol0 ~ symbol11等于前一个LTB的symbol0 ~ symbol11,并且CRC校验通过,则认为前后两个LTB是连续的。
LTB中的Reserved bit要求如下:
- TX应将Reserved bit置为0;
- RX不能通过检测Reserved bit来判断LTB是否有效;
- RX不能通过检测Reserved bit来决定执行任何的控制功能;
- LTB的symbol0 ~ symbol11参与CRC计算且将CRC结果填入LTB CRC[7:0](symbol 12)和LTB CRC[15:8](symbol 13);CRC多项式如下:
x^16 + x^14 + x^12 + x^11 + x^8 + x^5 + x^4 + x^2 + 1
各种LTB的主要功能如下:
DLTB:用于在Discovery状态中进行符号锁定,交换链路初始化信息,确定TX/RX Link Width;以及在固定速率模式下用于RXEQ_Optimize状态中进行符号锁定及RX均衡适配。
CLTB:用于在Config状态中协商均衡模式、FEC模式等。
RLTB:用于在Retrain状态中进行Link速率切换以及Link宽度调整,错误恢复等。
ELTB:用于在Equalization状态中进行链路均衡协商。
上述LTB格式及其域段详细定义如下面表3-13~表3-16所示。
表 3-13 DLTB定义表
Symbol号 | 描述 |
|---|
0 | Type 0xA0: Discovery.Active; 0xA1: Discovery.Confirm; 0xE0: RXEQ_Optimize; Others: Reserved。 |
1 | Link_ID Bits [7:0]: 0-254, NULL; NULL值是8'hFF。 |
2 | Lane_ID Bits [7:0]: 0-7, NULL; NULL值是 8'hFF。 |
3 | TLW (TX Link Width) Bits [5:0]: 6'b00_0001: x1 6'b00_0010: x2 6'b00_0100: x4 6'b00_1000: x8 Others: Reserved Bits [7:6]: Reserved。 |
4 | RLW (RX Link Width) Bits [5:0]: 6'b00_0001: x1 6'b00_0010: x2 6'b00_0100: x4 6'b00_1000: x8 Others: Reserved Bits [7:6]: Reserved。 |
5 | Data_Rate_Support_1 每个比特值为1'b1表示支持相应的速率等级,为1'b0表示不支持相应的速率等级。 Bit 0: Data Rate 0 (PHY Mode-1:4.0 Gbps;PHY Mode-2:2.578125 Gbps)。 Bit 1: Data Rate 1 (Reserved)。 Bit 2: Data Rate 2 (PHY Mode-2:25.78125 Gbps)。 Bit 3: Data Rate 3 (PHY Mode-1:自定义速率1)。 Bit 4: Data Rate 4 (PHY Mode-2:53.125 Gbps)。 Bit 5: Data Rate 5(PHY Mode-1:自定义速率2)。 Bit 6: Data Rate 6 (Reserved)。 Bit 7: Data Rate 7 (PHY Mode-1:自定义速率3)。 |
6 | Data_Rate_Support_2 Bit 0: Data Rate 8 (PHY Mode-2:106.25 Gbps)。 Bit 1: Data Rate 9 (PHY Mode-1:自定义速率4(224.0 Gbps))。 Bit 2: Data Rate 10 (PHY Mode-1:256.0 Gbps;PHY Mode-2:212.5 Gbps)。 Bits [7:3]: Reserved。 |
7 | FEC_Mode_Support Bit 0: RS(128,120,T=2)。 1'b0:不支持此FEC模式; 1'b1:支持此FEC模式。 Bit 1: RS(128,120,T=4)。 1'b0:不支持此FEC模式; 1'b1:支持此FEC模式。 Bit 2: RS(256,240,T=8)。 1'b0:不支持此FEC模式; 1'b1:支持此FEC模式。 Bits [7:3]: Reserved。 |
8 | Bit 0:Port_Type 1'b0: Secondary Port; 1'b1: Primary Port。 Bits [7:1]:PortNego_Random_Value 1-127, NULL; NULL值为0。 |
9 | Reserved |
10 | FEC_Interleave_Support 每个比特值为1'b1表示相应的Link Width支持FEC交织模式,为1'b0表示不支持。 Bit 0: x1 Bit 1: x2 Bit 2: x4 Bit 3: x8 Bits [7:4]: Reserved。 |
11 | Bits [2:0]: RX_Lane0_ID 链路中Logic RX Lane0的位置: 3'b000: Logic RX Lane0在Physical Lane0上 3'b001: Logic RX Lane0在Physical Lane1上 3'b011: Logic RX Lane0在Physical Lane3上 3'b100: Logic RX Lane0在Physical Lane7上 Others:Reserved。 Bits [5:3]: MAX_LINK_WIDTH 最大链路宽度: 3'b000: x1 3'b001: x2 3'b010: x4 3'b011: x8 Others: Reserved Bits [7:6]: Reserved。 |
12 | Bits [7:0]:CRCL DLTB Symbol0-Symbol11的CRC[7:0]。 |
13 | Bits [7:0]:CRCH DLTB Symbol0-Symbol11的CRC[15:8]。 |
14 | 填充0x5A |
15 | 填充0x5A |
表 3-14 CLTB定义表
Symbol号 | 描述 |
|---|
0 | Type 0xB0: Config.Active 0xB1: Config.Check 0xB2: Config.Confirm Others: Reserved |
1 | Link_ID Bits [7:0]: 0-254, NULL NULL值为8'hFF |
2 | Lane_ID Bits [7:0]: 0-7, NULL NULL值为8'hFF |
3 | TLW (TX Link Width) Bits [5:0]: 6'b00_0001: x1 6'b00_0010: x2 6'b00_0100: x4 6'b00_1000: x8 Others: Reserved Bits [7:6]: Reserved |
4 | RLW (RX Link Width) Bits [5:0]: 6'b00_0001: x1 6'b00_0010: x2 6'b00_0100: x4 6'b00_1000: x8 Others: Reserved Bits [7:6]: Reserved |
5 | Reserved |
6 | EQ_Mode_Ctrl Bits [1:0]:EQ_Mode 2'b00: Full_EQ 2'b01: Only_Highest_Data_Rate_EQ 2'b10: Skip_EQ 2'b11: Reserved 当变量LinkUp==0且支持Data Rate 1或者更高速率时,此域段用于Config状态进行均衡模式协商确定。 Bits [4:2]:FEC_Mode_Ctrl 3'b000: FEC Bypass 3'b001: RS(128,120,T=2) 3'b010: RS(128,120,T=4) 3'b011: RS(256,240,T=8) Others: Reserved Bit 5:FEC_Interleave_Ctrl 1'b1: Enable FEC Interleave 1'b0: Disable FEC Interleave Bits [7:6]: Reserved |
7 | Bits [7:0]: Reserved |
8 | Bits [7:0]: Reserved |
9 | Bits [7:0]: Reserved |
10 | Bits [7:0]: Reserved |
11 | Bits [7:0]: Reserved |
12 | Bits [7:0]: CRCL CLTB Symbol0-Symbol11的CRC[7:0] |
13 | Bits [7:0]: CRCH CLTB Symbol0-Symbol11的CRC[15:8] |
14 | 填充0x5A |
15 | 填充0x5A |
表 3-15 RLTB定义表
Symbol号 | 描述 |
|---|
0 | Type 0xC0: Retrain.Active 0xC1: Retrain.Confirm 0xC2: Retrain.LP1_PHY_Up 0xC3: Retrain.EQ_Initial Others: Reserved |
1 | Bits [7:0]: Reserved |
2 | EQ_Ctrl1 Bits [5:0]: 当RLTB.Type == Retrain.EQ_Initial时,该域段为: Local_HS:在Retrain.Confirm状态中用于下一个速率的Local_HS值。 否则,该域段为: Post-Cursor:当前速率下的Post-Cursor系数值。 Bits [7:6]: Reserved |
3 | EQ_Ctrl2 当RLTB.Type == Retrain.EQ_Initial时: Bits [5:0]: Local_LS 在Retrain.Confirm状态中传递用于下一个速率的Local_LS值。 Bits [7:6]: Reserved 否则: 如果当前速率的调制模式是NRZ: Bits [5:0]: Pre-Cursor当前速率下的Pre-Cursor系数值。 Bits [7:6]: Reserved 如果当前速率的调制模式是PAM4: Bits [3:0]: Second_Pre-Cursor 当前速率下的Second_Pre-Cursor系数值。 Bits [7:4]: Third_Pre-Cursor 当前速率下的Third_Pre-Cursor系数值。 |
4 | EQ_Ctrl3 当RLTB.Type == Retrain.EQ_Initial时: Bits [3:0]:Remote_Initial_TX_Preset Bits [7:4]: Reserved 否则: Bits [7:0]: Cursor当前速率下的Cursor系数值。 |
5 | Data_Rate_Support_1 每个比特值为1'b1表示支持相应的速率等级,为1'b0表示不支持相应的速率等级。 Bit 0: Data Rate 0 (PHY Mode-1:4.0 Gbps;PHY Mode-2:2.578125 Gbps) Bit 1: Data Rate 1 (Reserved) Bit 2: Data Rate 2 (PHY Mode-2:25.78125 Gbps) Bit 3: Data Rate 3 (PHY Mode-1:自定义速率1) Bit 4: Data Rate 4 (PHY Mode-2:53.125 Gbps) Bit 5: Data Rate 5 (PHY Mode-1:自定义速率2) Bit 6: Data Rate 6 (Reserved) Bit 7: Data Rate 7 (PHY Mode-1:自定义速率3) |
6 | Data_Rate_Support_2 Bit 0: Data Rate 8 Supported (PHY Mode-2 106.25 Gbps) Bit 1: Data Rate 9 (PHY Mode-1:自定义速率4(224.0 Gbps)) Bit 2: Data Rate 10 (PHY Mode-1:256.0 Gbps;PHY Mode-2:212.5 Gbps) Bits [6:3]: Reserved Bit 7: Change_Speed当链路想启动切速时有效(值为1'b1)。 |
7 | Bits [2:0]: FEC_Mode_Ctrl 3'b000: FEC Bypass 3'b001: RS(128,120,T=2) 3'b010: RS(128,120,T=4) 3'b011: RS(256,240,T=8) Others: Reserved Bit 3: FEC/CRC_Mode_Reject 1'b0: 不拒绝; 1'b1: 拒绝。 Bits [5:4]:Pre-FEC_BER_Measurement_Status 2'b00: 不测量BER,或者使用软件配置的FEC模式; 2'b01: 开始测量BER; 2'b10: 完成测量BER; 2'b11: Reserved。 Bit 6: FEC_Interleave_Enable 1'b0: 不使能FEC交织; 1'b1: 使能FEC交织。 Bit 7: FEC_Interleave_Ctrl_Reject 1'b0: 不拒绝; 1'b1: 拒绝。 |
8 | Bits [7:0]: Reserved |
9 | Link_Ctrl Bits [6:0]: Reserved Bit 7:Equalization_Redo_Request 1'b0:无重做均衡请求; 1'b1:有重做均衡请求。 |
10 | Bits [2:0]: CRC_Mode_Ctrl 3'b000: No CRC 3'b001: CRC30 3'b010: CRC62 Others: Reserved Bit [3]: Reserved Bits [7:4]:Local_TX_Preset 当前速率下的Local TX Preset值。 |
11 | 如果当前速率的调制模式是PAM4: Bits [5:0]: First_Pre-Cursor 当前速率下的First_Pre-Cursor系数值。 Bits [7:6]: Reserved 否则: Bits [7:0]:Reserved |
12 | Bits [7:0]:CRCL RLTB Symbol0-Symbol11的CRC[7:0] |
13 | Bits [7:0]:CRCH RLTB Symbol0-Symbol11的CRC[15:8] |
14 | 填充0x5A |
15 | 填充0x5A |
表 3-16 ELTB定义表
Symbol号 | 描述 |
|---|
0 | Type 0xD0: Equalization Others: Reserved |
1 | Bits [4:0]: Reserved Bit 5:EQ_Reject 1'b0: 接受; 1'b1: 拒绝。 Bits [7:6]: Reserved |
2 | EQ_Ctrl1 Bits [1:0]: Current_EQ_Phase 2'b00: Coarsetune_Active 2'b01: Coarsetune_Confirm 2'b10: Secondary Port: EQ.Active/Primary Port: EQ.Passive 2'b11: Secondary Port: EQ.Passive/Primary Port: EQ.Active Bit 2: Reserved Bit 3: Preset_Mode_En 1'b0: 不使用Preset方式; 1'b1: 使用Preset方式。 Bits [7:4]: TX_Preset |
3 | EQ_Ctrl2 仅当Preset_Mode_En==0时有效。 如果当前速率的调制模式是NRZ: Bits [5:0]: Pre-Cursor当前速率下的Pre-Cursor系数值。 Bits [7:6]: Reserved。 如果当前速率的调制模式是PAM4: Bits [3:0]: Second_Pre-Cursor当前速率下的Second_Pre-Cursor系数值。 Bits [7:4]: Third_Pre-Cursor当前速率下的Third_Pre-Cursor系数值。 |
4 | EQ_Ctrl3 仅当Preset_Mode_En==0时有效。 Bits [5:0]: Post-Cursor当前速率下的Post-Cursor系数值。 Bits [7:6]: Reserved。 |
5 | EQ_Ctrl4 仅当Preset_Mode_En==0时有效。 Bits [7:0]: Cursor当前速率下的Cursor系数值。 |
6 | 如果当前速率的调制模式是PAM4: Bits [5:0]: First_Pre-Cursor当前速率下的First_Pre-Cursor系数值。 Bits [7:6]: Reserved。 否则: Bits [7:0]: Reserved。 |
7-11 | Reserved。 |
12 | Bits [7:0]:CRCL ELTB Symbol0-Symbol11的CRC[7:0]。 |
13 | Bits [7:0]:CRCH ELTB Symbol0-Symbol11的CRC[15:8]。 |
14 | 填充0x5A |
15 | 填充0x5A |