PLX---linux平台下的PCI驱动

       以前总是没写博客的习惯,总感觉记录些东西太过麻烦。但还是慢慢的感觉,有些东西还是记录下吧,好记性不如烂笔头嘛。

      最近公司要我负责linux下的PCI驱动,感觉挺无处下手的。大概的驱动框架肯定没问题的,这个问题不大,但问题就在于具体的实现细节。翻阅了很多书和资料,都没找到很合适的参考实例,往往都是给出了一个泛泛的框架,参考价值不大。后来仔细问下我们小组组长,才知道用的芯片是9054,通过9054控制器去控制一个FPGA模块,所有的数据从FPGA采集,然后经过PCI总线传输至linux系统。仔细查了下,从PLX官网下下载了一份PLX的SDK。

    安装SDK里面的使用说明,安装了SDK,分别表演了API库,APItest等实例,当然了还有9054的驱动模块。SDK里面提供了一些很有用的工具,startlog就是一个很不错的调试工具,可以很方便的打印出调试信息,一些对驱动执行操作的时候驱动程序执行的操作等。Apitest程序是sdk里提供的一个测试程序,用来测试api函数是否正常工作,也可以用来检测驱动程序是否有问题的。plxcm则是一个调试器,可以方便的对pci(9054)的内存,寄存器等进行读写的工具。但是,个人感觉非常不好用,本人就成功运行一次,其他的N次都是执行的过程中在monitor函数中卡死了。具体原因不是很清楚,追踪了下代码,一层层的封装函数,实在费劲,最终无奈放弃。驱动调试暂告一段,待继续。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
PCI8系列 PCI9系列 PCI9054 linux驱动程序 PLX SDK Samples ================================================================ ABOUT This document provides a brief description of the samples included in the PLX SDK. Please refer to the source code in each sample & the PLX SDK User's Manual for additional details. The PLX samples are intended to demonstrate use of the PLX API. The samples are not intended for debug or real world applications, although they can be extended to complex applications. They should be treated as a reference for writing custom software that utilizes the PLX API. Not all samples work with all PLX devices. The PLX API supports numerous PLX chip families in PCI/PCIe, including 6000-series PCI-to-PCI bridges, 9000-series PCI-to-Local bus bridges, & 8000-series PCI/PCIe bridges & switches. Some samples are provided only for specific chip families. SAMPLES - ApiTest Simple application that calls various PLX APIs for a selected device & verifies return codes & parameters. The API calls made depend upon the type of device selected. - DSlave Demonstrates how to read/write from a PLX 9000 PCI BAR space using the PLX API/driver to perform the data transer. This operation is often referred to as "Direct Slave". - DSlave_BypassApi Similar to the 'DSlave' sample, except this sample uses the PLX API only to map a PCI BAR space directly to the application's virtual space. The application can then directly access the space via simple memory dereferencing, bypassing the PLX API/driver & resulting in greater performance, especially for small transfers. The application is responsible for initializing the BAR space, such as setup of translation/remap registers. - LocalToPciInt [9000-series & 8311] Demonstrates how to wait for a generic Local-to-PCI interrupt using the PLX Notification API. - NT_DmaTest [8000-series switches with DMA & NT support] Demonstrates using the DMA engine in a PLX 8000 switch to transfer data through a PLX

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值