news 2026/6/10 2:22:53

usb3 协议

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
usb3 协议

一、 基本概念


低频周期性信令(LFPS,Low frequency periodic signaling)
Low frequency periodic signaling (LFPS) is used for side band communication between the two ports across a link that is in a low power link state. It is also used when a link is under training, or when a downstream port issues Warm Reset to reset the link.
For x2 operation, LFPS signals are only transmitted on the Configuration Lane.


SCD1/SCD2
SuperSpeedPlus Capability Declaration (SCD) is a step for a SuperSpeedPlus port, while in the Polling.LFPS substate, to identify itself as SuperSpeedPlus capable by transmitting
Polling.LFPS signals with specific patterns unique to SuperSpeedPlus ports. This section defines SuperSpeedPlus specific patterns in SCD1 and SCD2.

LBPM SuperSpeedPlus LFPS Based PWM Message
LBPM is defined as a low power signaling mechanism for two SuperSpeedPlus ports to communicate with each other based on LFPS signals. The adoption of Pulse Width Modulation (PWM) is to embed the transmitting clock in data and to allow for easy data recovery at the receiver based on LFPS clock defined in Table 6-29. T

二、physical layer


gen1 8b/10b 编码
gen2 128b/132b 编码

gen1 data scrambling

Special Symbols for Framing and Link Management


Training sequence TS1, TS2, TSEQ

三、link layer

3.1 包结构

link layer 包结构,分为 LMP/TP/DP/ITP header packet 和 data packet payload
LMP TP DP ITP header packet
header packet 包括 link control word、packet header



Data Packet Payload

3.2 link commands

Link commands are used for link level data integrity, flow control and link power management.
Link commands are a fixed length of eight symbols and contain repeated symbols to increase the error tolerance. Refer to Section 7.3 for more details. Link command names have the L-preface to differentiate their link level usage and to avoid confusion with packets

Link Commandb10-9b8-7b6-4b3-0
LGOOD_n0000000HP Sequence Number
0000:LGOOD_0

1111:LGOOD_15
n: Header Sequence Number.
Sent by a port receiving a header packet when all of the following conditions are true:
• The header packet has a valid structure and can be recognized by the receiver.
• CRC-5 and CRC-16 are valid.
• Header Sequence Number in the received header packet matches the expected Rx Header Sequence Number.
• An Rx Header Buffer in the receiver is available for storing the received header packet.
Mismatch between a Header Sequence Number in the received header packet and the expected Rx Header Sequence Number will result in a port transitioning to Recovery.
Received by a port sending a header packet. This is an acknowledgement from a link partnerthat a header packet with the Header Sequence Number of “n” is received properly. Receipt of LGOOD_n mismatching the expected ACK Tx Header Sequence Number will result in a porttransitioning to Recovery.
Also sent by a port upon entry to U0 as the Header Sequence Number Advertisement to initialize the ACK Tx HeaderSequence Number of the two ports.
LCRD_x
LCRD1_x
LCRD2_x
0001000Gen 1x1, Gen 1x2, Gen 2x1:
b3: Reserved
b2: Credit series
0: LCRD_x or LCRD1_x
1: LCRD2_x
b1~0: Rx Header Buffer Credit
00: LCRD_A/LCRD1_A/LCRD2_A
01: LCRD_A/LCRD1_A/LCRD2_A
10: LCRD_A/LCRD1_A/LCRD2_A
11: LCRD_A/LCRD1_A/LCRD2_A
used to signal the availability of Rx Header Buffers in terms of Credit.
LRTY0010000reservedSent by a port before resending the first header packet in response to receipt of LBAD.
LBAD0011000reservedBad header packet.
Sent by a port receiving the header packet in response to an invalid header packet. Packet that was received has corrupted CRC-5 and/or CRC-16.
Receipt of LBAD will cause a port to resend all header packets after the last header packet that has been acknowledged with LGOOD_n.
Refer to Section 7.2.4.1 for details.
LGO_Ux01000000001: LGO_U1
0010: LGO_U2
0011: LGO_U3
Others: Reserved
Sent by a port requesting entry to U1.
Sent by a port requesting entry to U2
Sent by a downstream port requesting entry to U3. An upstream port shall accept the request.
LAU0101000reservedSent by a port accepting the request to enter U1, U2, or U3.
LXU0110000reservedSent by a port rejecting the request to enter U1 or U2.
LPMA0111000reservedSent by a port upon receiving L AU. Used in conjunction with LGO_Ux and LAU handshake to guarantee both ports are in the same state.
LDN10-00000reservedDownstream port present in U0. Sent by a downstream port every 10 µs when there are no packets or other link commands to be transmitted. Refer to Section 7.5.6.1 for detail
LUP1001000reservedDevice present in U0. Sent by an upstream port every 10 µs when there are no packets or other link commands to be transmitted. Refer to Section 7.5.6.1 for details.

LCRD 发送规则
初始时根据 buffer 数量发送相应的 LCDR_x
进入 U0 后 → 发送 LGOOD_n → 马上发 LCRD_x。

Local Rx Header Buffer Credit Count要发送的 LCRD 报文
1LCRD_A
2LCRD_A, LCRD_B
3LCRD_A, LCRD_B, LCRD_C
4LCRD_A, LCRD_B, LCRD_C, LCRD_D

正常工作时
处理完一个 header packet 后 发送一个新的LCRD_x
A B C D 循环发送

3.3 LTSSM

四、protocol layer

Packet Types

  1. 00000b Link Management Packet (LMP)
    subtype
    0000b Reserved
    0001b Set Link Function
    0010b U2 Inactivity Timeout
    0011b Vendor Device Test
    0100b Port Capability
    0101b Port Configuration
    0110b Port Configuration Response
    0111b Precision Time Management
    1000b-1111b Reserved
  2. 00100b Transaction Packet (TP)
    subtype
    0000b Reserved
    0001b ACK
    0010b NRDY
    0011b ERDY
    0100b STATUS
    0101b STALL
    0110b DEV_NOTIFICATION
    0111b PING
    1000b PING_RESPONSE
    1001b – 1111b Reserved
  3. 01000b Data Packet Header (DP)
  4. 01100b Isochronous Timestamp Packet (ITP)

4.1Link Management Packets (LMP)

4.2 Transaction Packet (TP)










4.3 Data Packet (DP)

4.4 Isochronous Timestamp Packet (ITP)

4.5 TP sequence

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/5 16:10:50

分布式计算框架优化

1、非修改序列算法 这些算法不会改变它们所操作的容器中的元素。 1.1 find 和 find_if find(begin, end, value):查找第一个等于 value 的元素,返回迭代器(未找到返回 end)。find_if(begin, end, predicate):查找第…

作者头像 李华
网站建设 2026/6/5 14:52:39

Python十大常见错误及其解决方法(避坑指南)

SQLAlchemy是Python中最流行的ORM(对象关系映射)框架之一,它提供了高效且灵活的数据库操作方式。本文将介绍如何使用SQLAlchemy ORM进行数据库操作。目录安装SQLAlchemy核心概念连接数据库定义数据模型创建数据库表基本CRUD操作查询数据关系操…

作者头像 李华
网站建设 2026/6/9 21:15:14

深入理解Python的if __name__ == ‘__main__‘

SQLAlchemy是Python中最流行的ORM(对象关系映射)框架之一,它提供了高效且灵活的数据库操作方式。本文将介绍如何使用SQLAlchemy ORM进行数据库操作。目录安装SQLAlchemy核心概念连接数据库定义数据模型创建数据库表基本CRUD操作查询数据关系操…

作者头像 李华
网站建设 2026/6/9 14:10:43

计算机视觉--Opencv(郁金香图像轮廓提取与多边形逼近)

本次项目的核心目标有两个: 一是从郁金香图像中精准提取出整束花的外部原始轮廓,排除图像中的背景杂质与无关干扰; 二是通过多边形逼近算法对原始轮廓进行简化,得到平滑的近似轮廓,同时保留郁金香的核心形状特征。 …

作者头像 李华
网站建设 2026/6/9 23:36:57

LLM Weekly(2026.1.19-2026.1.25)

🌐 网络资讯 谷歌浏览器端Gemini新增“技能”功能,向全功能AI智能体演进。谷歌正将浏览器侧边栏中原本被动响应的Gemini,升级为具备主动能力的AI智能体。测试阶段可通过chrome://skills页面访问全新的“技能”功能,用户可自定义技能名称和指令,让Gemini执行特定工作流。…

作者头像 李华
网站建设 2026/6/9 21:02:10

自动化与脚本

SQLAlchemy是Python中最流行的ORM(对象关系映射)框架之一,它提供了高效且灵活的数据库操作方式。本文将介绍如何使用SQLAlchemy ORM进行数据库操作。 目录 安装SQLAlchemy 核心概念 连接数据库 定义数据模型 创建数据库表 基本CRUD操作…

作者头像 李华