PCIE学习笔记(三)事务层协议

目录

事务层包(TLP)概述

TLP 包结构

TLP 包帧头格式

TLP包帧头格式解析:

TLP包类型编码

处理层描述符(Transaction Descriptor)

TLP寻址

包请求和完成过程的帧头格式详解

I/O request 包

Memory request 包

Configuration request包

Completions 完成包

Message Request 包

TLP报文例子 


本文主要内容来自PCI_Express System Architecture 第四章“Packet-Based Transactions”内容学习。

事务层包(TLP)概述


前面介绍过TLP包主要四种类型为:

  • 内存Memory
  • IO
  • 配置Configuration
  • 消息Message

对memory的读写包分为读请求包和响应包、写请求包(不需要存储器的响应包);I/O类型的读写请求都需要相应包;配置类型的包的读写请求也有响应包。这些包请求还可以按属性来分类:NP-nonposted, 即请求需要返回completion的响应包;还有一种就是post,不需要completion返回响应包。TLP 包类型如下表

TLP 包结构


事务层包(TLP) 有三部分组成,帧头、数据、摘要(或者称ECRC),如下图所示:

每种TLP包都有一定的格式的帧头,根据不同包的特性还有数据负荷(Data Payload)和摘要(TLP Digest).帧头中的数据用来对包的管理和控制,Data Playload 用啦存放有效数据。TLP Digest中存放32位的ECRC校验。TLP包传递以DW为长度单位,发送端不得超过“Device Control Register” 中的“max payload Size”的数值,接收端中,所接收的数据量也不能超过接收端”Device Control Register”中的“Max Payload Size”数值。

TLP包组件

协议层

功能

帧头(HDR

事务层

TLP 头标长 3 或者 4 DW,格式和内容随事物类型变化

数据(DATA

事务层

可选段,为 TLP 帧头定义下的数据段,如果该 TLP 不携带数据,那该段为空

摘要(DIG

事务层

可选段,基于头标、数据字段计算出来的 CRC,称为 ECRC。通常长度为1DW

TLP 包帧头格式


如下图所示,1个DW为4Byte,头标(HDR)长度可以是3DW或者4DW,图中以4DW为例子。

 

TLP包帧头格式解析:


Header Field

Header Location

Field Use

Fmt[1:0]

Byte 0->Bit 6:5

TLP 头的大小是由 3 个双字还是 4 个双字组成,当前 TLP 是否包含有效负载。

Type[4:0]

Byte 0->Bit 4:0

TLP 使用的总线事务

TC(Traffic Class)

Byte 1->Bit 6:4

TLP 的服务层次和用于映射的虚拟通道,PCIe 总线规定了 8 </

处理协议( transaction Layer specification transaction Layer specificationtransaction Layer specificationtransaction Layer specification transaction Layer specificationtransaction Layer specification transaction Layer specificationtransaction Layer specificationtransaction Layer specification transaction Layer specificationtransaction Layer specificationtransaction Layer specificationtransaction Layer specificationtransaction Layer specification transaction Layer specificationtransaction Layer specificationtransaction Layer specification transaction Layer specificationtransaction Layer specificationtransaction Layer specification transaction Layer specification) ◆TLPTLPTLP概况。 ◆寻址 定位和路由导向 定位和路由导向 定位和路由导向 定位和路由导向 。 ◆i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request i/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message requesti/o,memory,configuration,message request、completion completioncompletioncompletioncompletioncompletioncompletioncompletioncompletion详解。 详解。 ◆请求和 ◆请求和 响应 处理机制。 处理机制。 处理机制。 ◆virtual channel(vc)Mechanism虚拟通道机制。 ◆data integrity数据完整性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值