On Fri, Jul 8, 2011 at 12:33 AM, Phil Behnke <[email protected]> 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.

Typically on the PC side and typically it is for IN transfer.

> 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.

That is high speed high bandwidth ISOC and the best speed you can
get is 24MB/sec (3 x 1024B /125us).

The host will be able to schedule the transfer but you must make sure
that the IN request is always there. Using async transfer helps.

What is your OS and your USB chipset? They play a part as well.

> 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.
>

I am not familiar with python-libusb1. pyusb is more matured. Unfortunately
it does not support isoc transfer yet.

Maybe you want to use libusb-1.0 and C to see if that helps. Take out
all the other USB device attached to the same root hub and see if that
helps.

This thread may help, it is not for isoc transfer but the idea should
be the same.
http://libusb.6.n5.nabble.com/Fwd-FT2232H-asynchronous-maximum-data-rates-td4519549.html

You can probably post the question to libusb mailing list. There are
quite a few USB experts there (both Linux and Windows).
http://www.libusb.org

Travis has got a FX2LP development board and he will try to develop
the benchmark firmware to test high speed high bandwidth isoc transfer
for libusbk in the future. Right now we are using AVR UC3 (AVR32)
sponsored by Atmel for high speed USB related testing but it only
support max packet size of 512 and the MCU core may still be slow
to deal with high speed USB.
http://code.google.com/p/usb-travis/

-- 
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/fx2lib-devel

Reply via email to