|
From: Dan E. <Dan...@di...> - 2006-11-22 12:59:56
|
OK, I'll just eat my own words. I think I've only really been testing on Intel motherboard host controllers, which don't have trouble achieving 260Mb/s. I've just tried an old NEC chip on a PCI plug in card, and it's only giving me 163Mb/s, so I guess your mileage may vary. Dan. Dan Ellis wrote: > I haven't seen any example code, I just worked it out from the API. > Basically you need 2 buffers and flags to mark if the buffer is in > transit or not, and when a buffer becomes full (we typically use 16k) > you call usb_submit_async, and then if the other buffer was in > transit, wait for it to become free by calling usb_reap_async so that > it can be filled again. =20 >=20 > I'm not personally aware of any high speed host controllers which > can't achieve that speed - i.e. no we didn't use anything special.=20 >=20 > Dan. >=20 > Brad Kingston wrote: >> Dan, >>=20 >> Thanks for the prompt reply. Is there an example on the website, or >> somewhere else, of the double buffering and async call technique? >>=20 >> The target hardware we are trying to communicate with sounds similar >> to your setup where we have an FPGA consuming the data via DMA, >> except it is not using NetChip hardware. I don't know what USB >> hardware it is using as it is being custom built by a subcontractor. >> It is good to know that such high rates are possible, since that is >> what I'm trying to prove to them. >>=20 >> Did you use any special host controller hardware on the PC in order >> to get the 260Mbps rate? I read something in the list archives that >> some controllers are slower than others. >>=20 >> Thanks. >> Brad >>=20 >>=20 >>> From: "Dan Ellis" <Dan...@di...> >>> Reply-To: lib...@li... >>> To: <lib...@li...> >>> Subject: Re: [Libusb-win32-devel] How Fast? >>> Date: Fri, 17 Nov 2006 13:42:57 -0000 >>>=20 >>> 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 >>>> 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.=20 >>>=20 >>> We never tried bulk reads. >>>=20 >>> 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.=20 >>>=20 >>> In 8 bit mode this drops to 180Mbps. >>>=20 >>>> 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 >>>=20 >>> --------------------------------------------------------------------- >>> --=20 >>> -- Take Surveys. Earn Cash. Influence the Future of IT Join >>> SourceForge.net's Techsay panel and you'll get the chance to share >>> your opinions on IT & business topics through brief surveys - and >>> earn cash >>> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DE >>> VD EV _______________________________________________ >>> Libusb-win32-devel mailing list >>> Lib...@li... >>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel=20 >>=20 >> _________________________________________________________________ >> MSN Shopping has everything on your holiday list. Get expert picks by >> style, age, and price. Try it! >> http://shopping.msn.com/content/shp/?ctId=3D8000,ptnrid=3D176,ptnrdata=3D= 200 >> 601&tcode=3Dwlmtagline=20 >>=20 >>=20 >> ---------------------------------------------------------------------- >> --- Take Surveys. Earn Cash. Influence the Future of IT Join >> SourceForge.net's Techsay panel and you'll get the chance to share >> your opinions on IT & business topics through brief surveys - and >> earn cash >> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEV >> DEV _______________________________________________ >> Libusb-win32-devel mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel=20 |