|
From: Dan E. <Dan...@di...> - 2006-11-17 13:43:08
|
Brad Kingston wrote: > What is the practical sustained speed limit I should expect when > using the usb_bulk_read and usb_bulk_write calls? I'm seeing a limit > of about 20MB/sec when talking to a PXI NetChip peripheral card and > another custom board. I'm not sure if its the libusb side or the > peripheral side that is limiting me to 20MB/sec. =20 >=20 > In a tight loop that sends 1GB of data, I send 150MB in each > usb_bulk_write call in order to get up to the 20MB/sec speed I'm > seeing. As I drop the size down for each write, the sustained rate > decreases also. =20 We've managed to get sustained 260Mbps (32.5MB/s) doing bulk writes to a NetChip NET2272 with it operating in 16 bit DMA mode (and using libusb with 2 buffers and async transfers). We had an FPGA consuming the data from the DMA. I don't think the NetChip could achieve that rate on the PCI card. We never tried bulk reads. The bus won't accommodate more traffic than that - there was no NAKing going on, the gaps between the transactions looked on the analyzer to be about long enough for the data to be read over PCI ready for the next transaction, so I think PCI is the limiting factor. It's possible that a read could get more data bandwidth out of the bus. In 8 bit mode this drops to 180Mbps. >From a software perspective, it's quite important to use double buffering and the async calls so that you keep the controller busy with work to do. On Linux which doesn't have an aynchronous interface to libusb (yet!) I'm struggling to get more than 140Mbps. --=20 Dan Ellis Senior Development Engineer DisplayLink (UK) Ltd. =20 |