workbee
驱动牛犊
驱动牛犊
  • 注册日期2001-04-24
  • 最后登录2012-05-30
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望10点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:3529回复:2

使用9054rdk-little开发板中遇到的问题

楼主#
更多 发布于:2001-08-06 18:08
//使用9054rdk-little开发板,利用plx-sdk pro v3.20 自带的驱动程序,和其本身的
//api函数做了一个如下的测试速度的程序,发现速度很慢,用逻辑分析仪看,DMA传输
//本身仅需要180us,但两次DMA传输之间有1MS的延时,不知如何解决此问题?
//环境:win98se,vc++6.0(sp4),plx-sdk pro v3.20



#include "stdafx.h"
#include <time.h>

#include <stdio.h>
#include <conio.h>

#include "PlxApi.h"

# define bufferward 4096



int main(int argc, char* argv[])
{
HANDLE hDevice;
RETURN_CODE rc;
DEVICE_LOCATION Device;
DMA_TRANSFER_ELEMENT DmaData;
DMA_CHANNEL_DESC DmaDesc;


PCI_MEMORY PciBuffer;

struct tm *newtime;
   long ltime;

U32 tempdataIn[bufferward];//原始数据


VIRTUAL_ADDRESSES Va;


int i,t,temp;
int result;

int tcount=bufferward*4;//传输计数TransferCount,最终为字节


// Open for the  device matching a specific Vendor ID,Device Id
Device.BusNumber = (U32)-1;
Device.SlotNumber = (U32)-1;
Device.VendorId = 0x10b5; // PLX Vendor ID
Device.DeviceId = 0x5406;
Device.SerialNumber[0] = '\0';


//得到程序开始时间
time( &ltime );

   /* Obtain coordinated universal time: */
   newtime = gmtime( &ltime );
   printf( "Coordinated universal time is %s\n",
                               asctime( newtime ) );


rc = PlxPciDeviceOpen(
&Device,
&hDevice
);


    
PlxPciBoardReset(
hDevice
);


if (rc != ApiSuccess)
{
 printf("ERROR
游客

返回顶部