在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
EETOP诚邀模拟IC相关培训讲师 创芯人才网--重磅上线啦!
查看: 3091|回复: 7

[求助] 4 kilobyte boundary这句话的理解为?

[复制链接]
发表于 2011-4-11 10:38:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
《Introduction to PCI Express: A Hardware and Software Developers Guide》

TLP Data Payload


requests must not specify an address and length combination that crosses a 4 kilobyte boundary.
 楼主| 发表于 2011-4-11 10:42:14 | 显示全部楼层
原文来自如下摘录: 请大家帮忙,谢谢。
TLP Data Payload
       As shown in Figure 6.2, if a packet uses a data payload, it is appended to the end of the TLP header. Whether or not a TLP contains a data payload depends on the type of packet. If present, the data payload is DWordaligned for both the first and last DWord of data. DWord byte enables within the header indicate if “garbage” bytes are appended to either the beginning or ending of the payload to achieve this DWord alignment.
      The Length field (bits[1:0] of byte 2 and all of byte 1 in the header) indicates the length of the data payload in DWords. This length value only identifies the length of the data payload and not of the entire TLP. The header and TLP digest lengths are not directly accounted for in this field (though they are in other header fields). A value of 00 0000 0001b in this location indicates a data payload that is one DWord long. A value of 00 0000 0010b indicates a two DWord value, and so on up to a maximum of 1024 DWords. The data payload for a TLP must not exceed the maximum allowable payload size, as defined in the device’s control register (and more specifically, the Max_Payload_Size field of that register). TLPs that use a data payload must have the value in the Length field match the actual amount of data contained in the payload. Receivers must check to verify this rule and, if violated, consider that TLP to be malformed and report the appropriate error. Additionally, requests must not specify an address and length combination that crosses a 4 kilobyte boundary.
发表于 2011-4-11 11:49:59 | 显示全部楼层
4M字节范围
 楼主| 发表于 2011-4-11 15:19:42 | 显示全部楼层
回复 3# suxiaoli3000


   1 . 谢谢,是 4K 字节范围?

   2.请问为什么会安排这样的限制?

   3. 假设在计算机中由软件分配一块用于接收数据的内存区域其起始地址0x80000010,而PCIE板卡准备通过DMA方式向其连续写入4096个字节的数据,max payload size为128字节,故进行MWr的次数为32次(4096/128),但最后一次Mwr只能写入(128-0x10)=112个字节。一共写入了4080个字节的数据。
   如果想把剩余的16个字节也写到内存,需要再发一次MWr?起始地址设为0x80001000,发送最后的16个字节?

   谢谢各位。向版内各位大侠学习。
发表于 2011-4-11 16:35:52 | 显示全部楼层
是4K字节,哈哈
 楼主| 发表于 2011-4-11 22:03:02 | 显示全部楼层
回复 5# suxiaoli3000


    大侠们,我的问题还没回答全呢,继续帮忙啊。
发表于 2011-4-12 16:22:17 | 显示全部楼层
PCIE 都是以DW为单位传递数据的,TLP的LENGTH是10bit ,所以最大的传输范围是1024个DW
 楼主| 发表于 2011-4-14 08:49:55 | 显示全部楼层
继续等待,
2.请问为什么会安排这样的限制?

   3. 假设在计算机中由软件分配一块用于接收数据的内存区域其起始地址0x80000010,而PCIE板卡准备通过DMA方式向其连续写入4096个字节的数据,max payload size为128字节,故进行MWr的次数为32次(4096/128),但最后一次Mwr只能写入(128-0x10)=112个字节。一共写入了4080个字节的数据。
   如果想把剩余的16个字节也写到内存,需要再发一次MWr?起始地址设为0x80001000,发送最后的16个字节?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-28 05:15 , Processed in 0.026244 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表