Re: [Fx2lib-devel] Isochronous Streaming Using LibUSB from FPGA
Status: Beta
Brought to you by:
mulicheng
From: Xiaofan C. <xia...@gm...> - 2011-07-08 05:43:35
|
On Fri, Jul 8, 2011 at 1:16 PM, Xiaofan Chen <xia...@gm...> wrote: > On Fri, Jul 8, 2011 at 12:26 PM, Phil Behnke <phi...@gm...> wrote: >> 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 see. It may not be that easy to achieve 24MB/s since your host side > code and the FPGA side logic need to be both good. > > I suggest you to post questions to libusb mailing list. I remember > there are reports there about sustaining this 24MB/s isoc transfer > and 35MB-45MB/s bulk transfer speed using FX2. > One quick test you can try. You might want to reduce the transfer buffer size, now it is 1024 * 500, which may be a bit too big. What if you reduce it to 1024 * 30? You are submitting 5 transfer simultaneously which is good. transfer_object1=self.iso_xfer_object.fx2.getTransfer(500) transfer_object1.setIsochronous(endpoint=0x82,buffer_or_len=(1024*500),callback=self.createDataThread) And try to get rid of the sleep code. #must sleep or LibUSB will start to fail time.sleep(0.005) -- Xiaofan |