Maximizing XferData,  currently hitting 291MB/s over gpif

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        I am transferring data over the GPIF in 32 bit mode with Auto DMA and I am having trouble hitting the theoretical maximum(380MB/s) and I am also missing data on short transfers. I found that if I transferred 4*16384 bytes with a 5ms timeout I maxed out at 291 MB/s. When I do tiny bursty data around 2 MBs in length, I end up missing data. I find that it I can do complete transfers with a 10 ms time out. Am I using this time out value right? It would make sense to me that it would work very fast with longer timeouts. It doesnt work at all if I set it to default timeout of 10 seconds. Here is my code below. static void Main(string[] args) { int packets = 4, pklen = 16384 * packets, len = pklen,; double transfer = 0; byte[] buffer = new byte[pklen]; usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB); MyDevice = usbDevices[0x04B4, 0x00F1] as CyUSBDevice; curEndpt = MyDevice.USBCfgs[0].Interfaces[0].EndPoints[1] as CyUSBEndPoint; bulkEpt = curEndpt as CyBulkEndPoint; MyDevice.USBCfgs[0].Interfaces[0].EndPoints[1].TimeOut = 10; // 10 ms while(true) { if (bulkEpt.XferData(ref buffer, ref len)) { transfer += len; Console.WriteLine(transfer.ToString()); } len = pklen; } }   
0 Likes
1 Reply
Anonymous
Not applicable
        I am not sure how to go back and edit the post as the code looks awful but anyways. I finally did hit 379 MB/s but the initial latency is slow. I have my FPGA transfer over just a 2MB file it will not make it to the host. I can receive about 1MB.   
0 Likes