Re: [Fx2lib-devel] Isochronous Streaming Using LibUSB from FPGA
Status: Beta
Brought to you by:
mulicheng
From: Phil B. <phi...@gm...> - 2011-07-08 04:27:10
|
Xiaofan, Thanks for the help. I'm using Linux with a 2.6.38.2 custom compiled kernel. In addition to the python application, I wrote a basic C program to do the same thing, but I still have the same problem. Both the python-libusb1 app and the C program are using async transfers. The maximum isoc data rate of 24MBps should hopefully be enough, since my data from the FPGA is at 19MBps. I've been experimenting with the data rate from the FPGA to the FX2; I can slow the data rate way down to ~6MBps and everything works great, but any faster than that and it starts to fail. :-/ I'm not sure how to determine my USB chipset. Chris - Thanks for your help. I will check out FPGALink on your site as I am using the Nexys2 board. (Great blog BTW; I've been using it as a reference over the past couple months while developing this project.) -Phil On Thu, Jul 7, 2011 at 9:51 PM, Xiaofan Chen <xia...@gm...> wrote: > On Fri, Jul 8, 2011 at 12:33 AM, Phil Behnke <phi...@gm...> > wrote: > > Hi All, > > > > I've been have a issue streaming data from an FPGA to a PC using the > FX2LP > > and LibUSB. The FPGA is sending 8 bits to the FX2 at a rate of 20MHz > (152 > > Mbps) using isochronous mode. The problem I'm having is that I cannot > get > > data from the FX2's buffer to the PC fast enough and the buffer becomes > > full, causing me to miss some data. I'm not sure where the bottle neck > is. > > The FX2 is set to iso mode, with 1024 bytes per packet, and 3 packets per > > microframe, so I should have enough bandwidth to empty the buffer. I'm > > attached my firmware (fpga.c), descriptor file, and libusb driver. The > > driver was written in Python using python-libusb1 wrappers. I have a LED > on > > the FPGA board which will read the FULL flag on the FX2 and light an LED > > when full. By inspection, it looks like the LED is lit at about 50% duty > > cycle. I've been working on this for quite a while and would really > > appreciate any tips. > > > > BTW, your device violates the USB spec since you need to have > zero bandwidth for the default alt interface (0) for isoc, which means > that you need to add that and put your high speed high bandwidth > isoc endpoint in alt interface 1. > > But this might not cause a problem for you depending on the OS > since the OS may not reject it. > > -- > Xiaofan > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Fx2lib-devel mailing list > Fx2...@li... > https://lists.sourceforge.net/lists/listinfo/fx2lib-devel > |