news 2026/6/25 4:38:34

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/21 23:37:42

电机电磁振动噪声 NVH 的救星——Manatee 1.09

manatee电磁噪声振动计算softwareManatee 1.09 电机电磁振动噪声NVH终结者 带教程,带教程,带教程重要的话说3遍 史上最强后处理软件,甩jmag、Maxwell、flux几条街,极强的后处理,丰富图表,无需任何编程改写…

作者头像 李华
网站建设 2026/6/21 23:38:16

内存对齐与缓存友好设计

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

作者头像 李华
网站建设 2026/6/21 23:39:17

华为OD技术面真题 - 数据库MySQL - 2

文章目录 介绍一下MySQL查询语句执行过程简述一下MySQL的架构说一下你理解的数据库索引?分别说说索引的优点和缺点说说MySQL中索引类型?如何创建合适的索引?怎么优化查询速度 介绍一下MySQL查询语句执行过程 执行SQL查询语句会经过上述组件和…

作者头像 李华
网站建设 2026/6/21 11:54:12

自定义类型转换机制

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

作者头像 李华
网站建设 2026/6/18 11:57:40

Transformer 大模型架构深度解析(4)详解 Transformer 架构

目录 文章目录目录Transformer 架构Input EmbeddingPositional EncodingEncoder软对齐注意力的思想词向量相似度的计算方法Scaled Dot-Product AttentionSelf-AttentionMulti-Head Attention(Self-Attention)Feed Forward Neural NetworkResidual Connec…

作者头像 李华
网站建设 2026/6/25 0:38:04

‌别再手动对比日志了!AI日志分析工具实测TOP3

软件测试中的日志分析痛点‌ 在软件测试工作中,日志分析是核心环节,涉及错误追踪、性能监控和测试报告生成。传统手动方法耗时耗力:测试工程师需逐行比对日志文件,识别异常模式,平均每个项目消耗20-30小时。常见问题包…

作者头像 李华