luyuan_0922的个人空间 https://blog.eetop.cn/106870 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

日志 [2014年12月22日]

已有 647 次阅读| 2014-12-22 22:29

 【博客大赛】PCIE学习分享之配置空间寄存器发布时间:2013-08-01 11:44:33
技术类别:CPLD/FPGA     个人分类:PCIE

概述

         当一个板卡出入到一个PCI、PCI-X或者PCI-E总线的时候,通过自动向配置空间读出和写入来完成总线的配置。在altera wiki上看到一篇关于pcie配置空间的文章,由于自己对于pcie是新手,想办法把自己的理解尽量写出来,有错误之处在所难免。

表头和性能寄存器集(Header & Capability Register Sets

    When a capability register set is enabled it is tied together by a linked list starting with an 8-bit pointer at address 34h in the configuration space header.

  • Each capability structure set also has a unique Capability ID
  • To find the next capability pointer we look at the base address of the capability register set and add an offset of 01h
  • When you reach a capability structure with an ID of 10h then you have reached the PCI Express Capability Structure
  • When you reach a capability structure with Next Capability Pointer of 00h then you have reached the end of the linked list

实例演示寄存器配置空间

         1、首先查看地址34h,从这个地址空间中得到一个8-bit目标数据,即下一个capability寄存器设置,如图1所示,该目标数据为50h。

2.jpg

图1:

         2、根据图1所示,我们跳到地址50h,如图2所示,从该地址查到一个capability ID为05h(即MSI Capability Structure)。接着我们察看下一个capability指针,即51h,我看到该地址存放的数据是78h,那么我们跳到该指针处。

 

2.jpg

图2

3、我们跳到指针78h处,如图3所示,在该指针处,我们得到一个Capability ID为01h(即Power Management Capability Structure)。接着我们在79h处察看下一个capability指针,并找到其地址为80h,跳到80h处。

2.jpg

图3

         4、我们跳到80h处,如图4所示,在该地址处我们得到一个Capability ID值为10h(即PCI Express Capability Structure)。我们看到地址81h处的指针值为00h,表示已经到了连接表的末尾了。

 

2.jpg

点赞

全部作者的其他最新日志

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 4

    粉丝
  • 1

    好友
  • 1

    获赞
  • 11

    评论
  • 1002

    访问数
关闭

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

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

GMT+8, 2024-5-3 05:04 , Processed in 0.023363 second(s), 13 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部