阅读:3529回复:2
使用9054rdk-little开发板中遇到的问题
//使用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( <ime ); /* Obtain coordinated universal time: */ newtime = gmtime( <ime ); printf( "Coordinated universal time is %s\n", asctime( newtime ) ); rc = PlxPciDeviceOpen( &Device, &hDevice ); PlxPciBoardReset( hDevice ); if (rc != ApiSuccess) { printf("ERROR |
|