TLP的用途、格式、定义

1. 简介

与并行总线不同,像PCIe这样的串行传输总线不使用控制信号来识别给定时间链路上发生的事情。相反,它们发送的数据流必须具有预期的大小和可识别的格式,以便接收方能够理解内容。此外,PCIe在传输数据包时不使用任何立即握手。

除了Logical Idle symbols(逻辑空闲符号) 和Ordered Sets(有序集)外,信息以由符号组成的数据包的基本块在活动PCIe链路上移动。两大类数据包是TLPs和DLLPs。信息包及其流在下图中进行了说明。有序集也是数据包,但是它们不像tlp和dllp那样带有开始和结束符号。
在这里插入图片描述

2. TLP (Transaction Layer Packet)详细信息

2.1 TLP Assembly And Disassembly

在这里插入图片描述
红色的是TLP的格式,Data是事务层上层给的数据,事务层给它头上加个Header,然后尾巴上再加个CRC校验(如果支持AER),就构成了一个TLP;这个TLP下传到数据链路层,又被数据链路层头上加了个包序列号,尾巴再加个CRC校验,构成一个DLLP;然后DLLP下传到物理层,头上加个Start,尾巴加个End符号,把这些数据分派到各个Lane上,然后每个Lane上加扰码,经8/10或128/130编码,最后通过物理传输介质传输给接收方。

接收方物理层是最先接收到这些数据的,然后执行逆操作;在数据链路层,校验序列号和LCRC,如果没错,剥掉序列号和LCRC,往事务层走;如果校验出差,通知对方重传;在事务层,校验ECRC,有错,数据抛弃,没错,去掉ECRC,获得数据。

2.2 TLP Header Format

在这里插入图片描述

3. Specific TLP Formats: Request & Completion TLPs

3.1 IO Requests

IO Request Header Format.
在这里插入图片描述
IO Request Header Fields
在这里插入图片描述
在这里插入图片描述

3.2 Memory Requests

Memory Request Header Format.
在这里插入图片描述
Memory Request Header Fields
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
内存请求注意事项。
内存请求的特性包括:

  1. Memory data transfers are not permitted to cross a 4KB boundary.
  2. All memory‐mapped writes are posted to improve performance.
  3. Either 32‐ or 64‐bit addressing may be used.
  4. Data payload size is between 0 and 1024 DW (0‐4KB).
  5. Quality of Service features may be used, including up to 8 Traffic Classes.
  6. The No Snoop attribute can be used to relieve the system of the need to
    snoop processor caches when transactions target main memory.
  7. The Relaxed Ordering attribute may be used to allow devices in the packet’s
    path to apply the relaxed ordering rules in hopes of improving perfor‐
    mance.

3.3 Configuration Requests

Configuration Request Header Format
在这里插入图片描述
Definitions Of Configuration Request Header Fields.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

3.4 Completions

Completion Header Format
在这里插入图片描述

Definitions Of Completion Header Fields.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

完成状态代码摘要。
•000b (SC)成功完成:请求得到了正确的处理。
•001b (UR)不支持的请求:请求不合法或未被完成者识别。
•010b (CRS)配置请求重试状态:完成程序暂时无法处理配置请求,请求应该稍后再尝试。
•100b (CA) Completer Abort:完成程序应该能够处理请求,但由于某种原因失败了。这是一个无法纠正的错误。

3.5 Message Requests

Message Request Header Format
在这里插入图片描述

Message Request Header Fields.
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
消息说明:表格指定了9个消息组中使用的消息编码,并基于表5‐8中列出的消息编码字段。定义的消息组包括:

  1. INTx Interrupt Signaling
  2. Power Management
  3. Error Signaling
  4. Locked Transaction Support
  5. Slot Power Limit Support
  6. Vendor‐Defined Messages
  7. Ignored Messages (related to Hot‐Plug support in spec revision 1.1)
  8. Latency Tolerance Reporting (LTR)
  9. Optimized Buffer Flush and Fill (OBFF)

3.5.1 INTx Interrupt Messages

在这里插入图片描述
Rules regarding the use of INTx Messages:

  1. They have no data payload and so the Length field is reserved.
  2. They’re only issued by Upstream Ports. Checking this rule for received
    packets is optional but, if checked, violations will be handled as Malformed
    TLPs.
  3. They’re required to use the default traffic class TC0. Receivers must check
    for this and violations will be handled as Malformed TLPs.
  4. Components at both ends of the Link must track the current state of the four
    virtual interrupts. If the logical state of one interrupt changes at the
    Upstream Port, it must send the appropriate INTx message.
  5. INTx signaling is disabled when the Interrupt Disable bit of the Command
    Register is set = 1 (as would be the case for physical interrupt lines).
  6. If any virtual INTx signals are active when the Interrupt Disable bit is set in
    the device, the Upstream Port must send corresponding Deassert_INTx
    messages.
  7. Switches must track the state of the four INTx signals independently for
    each Downstream Port and combine the states for the Upstream Port.
  8. The Root Complex must track the state of the four INTx lines indepen‐
    dently and convert them into system interrupts in an implementation‐spe‐
    cific way.
  9. They use the routing type “Local‐Terminate at Receiver” to allow a Switch
    to remap the designated interrupt pin when necessary (see “Mapping and
    Collapsing INTx Messages” on page 808). Consequently, the Requester ID
    in an INTx message may be assigned by the last transmitter

3.5.2 Power Management Messages.

在这里插入图片描述

Power Management Message Rules:

  1. Power Management Messages don’t have a data payload, so the Length
    field is reserved.
  2. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  3. PM_Active_State_Nak is sent from a Downstream Port after it observes a
    request from the Link neighbor to change the Link power state to L1 but it
    has chosen not to do so (Local ‐ Terminate at Receiver routing).
  4. PM_PME is sent upstream by the component requesting a Power Manage‐
    ment Event (Implicitly Routed to the Root Complex).
  5. PM_Turn_Off is sent downstream to all endpoints (Implicitly Broadcast
    from the Root Complex routing).
  6. PME_TO_Ack is sent upstream by endpoints. For switches with multiple
    Downstream Ports, this message won’t be forwarded upstream until all
    Downstream Ports have received it (Gather and Route to the Root Complex
    routing)

3.5.3 Error Messages

在这里插入图片描述

Error Signaling Message Rules:

  1. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  2. They don’t have a data payload, so the Length field is reserved.
  3. The Root Complex converts Error Messages into system‐specific events.

3.5.4 Locked Transaction Support

在这里插入图片描述
Unlock Message Rules:

  1. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  2. They don’t have a data payload, and the Length field is reserved.

3.5.5 Set Slot Power Limit Message

在这里插入图片描述
Set_Slot_Power_Limit Message Rules:

  1. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  2. The data payload is 1 DW and so the Length field is set to one. Only the
    lower 10 bits of the 32‐bit data payload are used for slot power scaling; the
    upper payload bits must be set to zero.
  3. This message is sent automatically anytime the Data Link Layer transitions
    to DL_Up status or if a configuration write to the Slot Capabilities Register
    occurs while the Data Link Layer is already reporting DL_Up status.
  4. If the card in the slot already consumes less power than the power limit
    specified, it’s allowed to ignore the Message.

3.5.6 Vendor‐Defined Message 0 and 1

在这里插入图片描述
Vendor‐Defined Message Rules:

  1. A data payload may or may not be included with either type.
  2. Messages are distinguished by the Vendor ID field.
  3. Attribute bits [2] and [1:0] are not reserved.
  4. If the Receiver doesn’t recognize the Message:
    • Type 1 Messages are silently discarded
    • Type 0 Messages are treated as an Unsupported Request error condition

3.5.7 Ignored Messages

在这里插入图片描述

Hot Plug Message Rules:
• They are driven by a Downstream Port to the card in the slot.
• The Attention Button Message is driven upstream by a slot device.

3.5.8 Latency Tolerance Reporting Message

在这里插入图片描述
在这里插入图片描述

LTR Message Rules:

  1. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  2. They don’t have a data payload, and the Length field is reserved.

3.5.9 Optimized Buffer Flush and Fill Messages

在这里插入图片描述
OBFF Message Rules:

  1. They’re required to use the default traffic class TC0. Receivers must check
    for this and handle violations as Malformed TLPs.
  2. They don’t have a data payload, and the Length field is reserved.
  3. The Requester ID must be set to the Transmitting Port’s ID.
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值