PCIE TLP header fields

本文详细解析了PCIE TLP(Transaction Layer Packet)Header字段的构成与作用,包括不同类型的请求与完成消息,如Memory Read Request、Memory Write Request等,以及关键字段如Fmt、Type、TC、Attr、TD、EP、Length、Address、RequestID、Tag、First DWBE、Last DWBE、CompleterID、Completion Status、BCM和ByteCount的作用和含义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

最近在看PCIE 资料,整理了一些笔记

       以下是TLP header 字段的总结

header filedheader locationfiled Use备注
Fmt[1:0]bits 6:5 of byte 000b :3 DW header, no data
01b :4 DW header, no data
10b :3 DW header, with data
11b :4 DW header, with data
common
Type[4:0]bits 4:0 of byte 00 0000 :MRd ,Fmt[1:0] 00 or 01,Memory Read Request
0 0001 :MRdLk ,Fmt[1:0] 00 or 01,Memory Read Request-Locked
0 0000 :MWr ,Fmt[1:0] 10 or 11,Memory Write Request
0 0010 :IORd ,Fmt[1:0] 00,I/O Read Request
0 0010 :IOWr,Fmt[1:0] 10,I/O Write Request
0 0100 :CfgRd0,Fmt[1:0] 00,Configuration Read Type 0
0 0100 :CfgWr0,Fmt[1:0] 10,Configuration Write Type 0
0 0101 :CfgRd1,Fmt[1:0] 00,Configuration Read Type 1
0 0101 :CfgWr1,Fmt[1:0] 10,Configuration Write  Type 1
1 0r2r1r0:Msg,Fmt[1:0] 01,Message Request,r2r1r0 specifies the Message routing mechanism
1 0r2r1r0:MsgD,Fmt[1:0] 11,Message Request with data payload
0 1010 :Cpl,Fmt[1:0] 00,Completion without Data– Used for I/O and Configuration Write Completions and Read Completions (I/O, Configuration, or Memory) with Completion Status other than Successful Completion.
0 1010 :CplD,Fmt[1:0] 10,Completion with Data – Used for Memory, I/O, and Configuration Read Completions
0 1011 :CplLk,Fmt[1:0] 00,Completion for Locked Memory Read without Data – Used only in error case
0 1011 :CplDLk,Fmt[1:0] 10,Completion for Locked Memory Read –otherwise like CplD.
common
TC[2:0]bits [6:4] of byte 1Traffic Class,  differentiation of transactions into eight traffic
classes
common
 Attr[1:0] bits [5:4] of byte 2bit 5: relaxed ordering,允许某些事务(TRANSACTION)提前执行,而不是按先前的执行顺序,从而提高系统性能
          0:Default Ordering,PCI Strongly Ordered Model
          1:Relaxed Ordering,PCI-X Relaxed Ordering Model
bit 4 :No Snoop
          0:Default,Hardware enforced cache coherency
expected
          1:No Snoop,Hardware enforced cache coherency
not expected
common
TDbit 7 of byte 21b indicates presence of TLP digest in the form of a single DW at the end of the TLPcommon
EPbit 6 of byte 2Error Forwardingindicates the TLP is poisoned
optional
common
(Write Request (Posted or Non-Posted) or a
Read Completion)
Length[9:0]bits 1:0 of byte 2 bits 7:0 of byte 3 Length of data payload in DW
00 0000 0001b:1 DW
00 0000 0010b:2 DW
…                      :...
11 1111 1111b:1023 DW
00 0000 0000b:1024 DW
common
Address[63:0]64bits address :
all bits of byte8-15
32bits address :
bits of byte8-11
 address routing 
bus Number[7:0]Bits 7:0 of Byte 8specify the destination Device for the TLPID routing 
Device Number[4:0]Bits 7:3 of Byte 9
Function Number[2:0]Bits 2:0 of Byte 9
Request ID[15:0]all bits of byte 4-5[15:8]:bus Number[7:0]
[7:3] :Device Number
[2:0]:Function Number
Transaction ID is included with all Requests and Completions
tag[7:0]bits [7:0] of byte 6?由产生请求包的器件生成的,如果请求器件需要应答,则每个Tag[7:0]是独一无二的
1.By default, only the lower 5 bits of the Tag field are used with the remaining upper 3 bits required to be all 0’s
2.If the Extended Tag Field Enable(Device Control Register ) bit  is set,the maximum is increased to 256(default 32), and the entire Tag field is used
3.For Requests which do not require Completion (Posted Requests), the value in the Tag[7:0] field is undefined and may contain any value
Request ID+Tag = Transaction ID
first  DW BE[3:0]bits[3:0] of Byte7[0]: affected data Byte 0
[1]: affected data Byte 1
[2]: affected data Byte 2
[3]: affected data Byte 3
Memory, I/O, and Configuration Requests
Last DW BE[3:0] bits[7:4] of Byte7[0]: affected data Byte N-4
[1]: affected data Byte N-3
[2]: affected data Byte N-2
[3]: affected data Byte N-1
Assuming the data referenced is N bytes in length (Byte 0 to Byte N-1)
Completer ID[15:0]all bits of byte 4-5Identifies the Completer
[15:8]:bus Number[7:0]
[7:3] :Device Number
[2:0]:Function Number
Completion
Completion Status[2:0]bit 7:5 of byte6Indicates the status for a Completion
000b: Successful Completion (SC),请求(Request)被正确的处理
001b: Unsupported Request (UR),表示请求是非法的或者不能被Completer所识别的
010b: Configuration Request Retry Status (CRS),Completer暂时不能响应的配置请求,需要Requester稍后再次尝试
100b: Completer Abort (CA),Completer可以响应该请求,但是却发生了其他的错误,该错误是Uncorrectable Error
all others: Reserved
Completion
BCM Byte Count Modified
must not set by PCI Express Completers, and may only be set by PCI-X completers
Completion
Byte Count[11:0]bit 3:0 of byte6
bit 7:0 of byte7
 The remaining byte count for Request
0000 0000 0000b :  4096 bytes
0000 0000 0001b : 1 byte
……
1111 1111 1111b : 4095 bytes
Completion
tag[7:0]bit 7:0 of byte10in combination with the Requester ID field, corresponds to the Transaction IDCompletion
Lower Address[6:0]bit 6:0 of byte11lower byte address for starting byte of CompletionCompletion
仅针对pcie 1.0a,不同的版本会有所不同  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值