[Fx2lib-devel] Optimizing throughput.
Status: Beta
Brought to you by:
mulicheng
From: Dennis M. <de...@ub...> - 2009-04-17 19:01:55
|
Lately, I've been working on getting my firmware to transfer data a lot faster. I've found the FX2 is just fast enough at 48 Mhz to commit data to the USB host at about 43-44 MBps IF (IF is big here), you don't do any extra processing until after you've committed a packet to the host. I originally did some calculations about how many bytes I needed to transfer, and then committed data. Doing the math first can slow down the transfer speed as much as 50%. Instead, you need to commit a packet and then do whatever other processing is required. Hopefully, the USB transfer will be taking place in the time that you're doing the processing and you can finish and commit another packet without causing the host to pause. Anyhow, I wrote up a blog post about all this and posted an SDCC/fx2lib port of the Cypress CyStream Application on my blog: http://allmybrain.com/2009/04/14/fx2-cystream-throughput-test-with-sdcc-and-fx2lib/ Enjoy! My next challenge is to get the GPIF to commit packets with AUTOIN=1 with large transfer counts. I can use the above method to transfer about 33MBps GPIF but I think I can boost that up to the Max of 43-44 if I get AUTOIN working right. Any of you done this yet? How about with fx2lib? -Dennis |