On Sat, 2009-06-20 at 11:13 +0800, Xiaofan Chen wrote:
> On Fri, Jun 19, 2009 at 3:36 AM, Freddie Chopin<freddie_cho...@op.pl> wrote:
> > Anyway, about that "equal" performance with libftdi:
> > Tested with a ~29kB image on LPC2103 (upload to flash):
> >
> > libftdi:
> >  > Start address 0x3c, load size 29640
> >  > Transfer rate: 6 KB/sec, 14820 bytes/write.
> > ftd2xx:
> >  > Start address 0x3c, load size 29640
> >  > Transfer rate: 15 KB/sec, 14820 bytes/write.
> >
> > So: libftdi is 2.5x slower
> >
> > Tested with ~114kB image on STM32 (upload to flash):
> >
> > libftdi:
> >  > Start address 0x8000134, load size 114432
> >  > Transfer rate: 8 KB/sec, 16347 bytes/write.
> > ftd2xx:
> >
> >  > Start address 0x8000134, load size 114432
> >  > Transfer rate: 11 KB/sec, 16347 bytes/write.
> >
> > Again slower, this time only about 30%, but still, that's nowhere to
> > "comparable"
> 
> >From libftdi mailing lists and various places, it seems the major
> issue of libftdi compared to FTD2XX is because of the use of
> libusb 0.1 and synchronous I/O.
> 
> ************************
> http://developer.intra2net.com/mailarchive/html/libftdi/2009/msg00093.html
> "
> >> My second question is: Does anyone know why an FT_Read with FT's D2XX
> >> lib does return so fast? (I measured approx. 0.01ms compared to my 1ms
> >> with the ftdi_read_data.)
> >
> >D2XX uses threads to constantly poll and read the device.
> >The read function just fetches the data from the internal buffer AFAIK.
> >
> ***************************
> 
> Actually libusb-win32 0.1 already supports asynchronous I/O.
> And libusb 1.0 under Linux and Mac OS X supports asynchronous I/O
> as well. So it is possible to fix this issue with libftdi. It will be a major
> change for OpenOCD as well.

I think many developers realize the benefits of non-blocking I/O, and --
as you say -- they also realize the changes will be fairly dramatic.
This is on The List (the TODO file) in the JTAG section (search for
'non-blocking'), but it is definitely post 0.2.0.

For 0.2.0, you can build your own personal binaries that use FTD2XX or
use distributed binaries with libftdi (and try to live with any
performance degradations).  Such is the GPL.  However, I hope this
motivates the community at large to work on removing the limitations in
our open source solutions.

Cheers,

Zach

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to