- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the fpga+fx3+slavefifo to test the speed of transfer data to PC.
but the speed is 6MB/s,so slow,the firmware is use the SlaveFifoSync.
Any problem happened?
so there is any solutions to fixed it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please look at http://www.cypress.com/?rID=59492
A sync slave FIFO 2bit interface is used for this demonstration. 6MB/s is way too low.
What is the configuration/waveform you're using?
Regards,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In the part of the code that creates a DMA channel change the type of DMA transfer from manual to auto. For example
change
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU,
CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);
to
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU,
CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
I would be interested to know what speed you get.
Sodafarl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have achieved 78 MB/s for a 32 Bit slave fifo loopback configuration using Windows 7 and NEC uPD 720202 host adapter.
Still, this is far below the theoretical possible. Has somebody measured more than that and is able to give some hints how to improve the performance? Thanks.
-Silvio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got ~300MB/s from FX3 to PC, with slave fifo, 32 bit, auto-mode, 16 packets per burst and 80 MHz PCLK on an AMD board with on-board NEC controller. Connecting the same hardware to a HP office system with PCIe host controller in a PCIe 1.1 slot, the speed is only ~180MB/s.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sodafarl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK,now the speed is 80M/s.but it dit't stable.sometimes it can be detected as usb3.0 sometimes not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chris, can you please specify the P/N of the AMD board you are using?
Does it make a difference if you specify burst length of 16 instead of 1? My PCIe NEC USB host controller doesn't recognise the FX3 anymore if i use burst lenght of 16, while the on-board ASmedia controller does 😞
Thanks for letting me know.
-Silvio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You get much more speed if you use the 16 packets per burst instead of one, but you have to set up this correctly in the descriptors, the dma config and so on. The 300MB/s I got on a Gigabyte GA-790FXTA-UD5 board with NEC controller even running Windows XP. I assume the controller is connected via PCIe 2.0 there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Chris for detailled info. Now I've tested upstream and downstream bandwidth separately instead of using a loopback configuration. The outcome is that upstream (FX3 to PC) I get about 270 MB/s while donwstream (PC to FX3) only 80 MB/s.
What do you measure downstream? And have you tested a loopback configuration as well? Thanks.
-Silvio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Chris R what application are you using to measure the bandwidth. Take the point about the burst length being configured correctly as in the descriptor file the burst length value is equal to n + 1 where n is the burst length number so if you want a burst packet length of 4 you set n = 3. However when configuring the endpoints in the main source file the packet burst length is equal to n so if you want 4, n = 4.
Sodafarl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used my own application based on WinUSB Driver. I transferred hundrets of megabytes or even up to two gigabytes in one single blocking WinUSB read request and measured the time using the QueryPerformanceCounter function. WinUSB handles all packaging internally, so you can request every size you want, regardless of the burst settings and other low level stuff.
I set up the descriptors to 15 and the endpoint config to 16, the dma transfer size to 16*1024 byte in super speed mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What write / downstream performance do you achieve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The downstream was slower, as far as I remember, I got 120MB/s on PCIe 1.1 and 220MB/s on the AMD board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ChrisR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can anybody write in one place what values must be specified in Super Speed descriptor, isochronous endpoint configuration and DMA channel configuration in order to get max data transfer speed using slave FIFO ? Thanks.
// EP2 isochronous IN
0x07, // Descriptor size
CY_U3P_USB_ENDPNT_DESCR, // Endpoint Descriptor Type
CY_FX_EP2_ISO, // Endpoint address and description
CY_U3P_USB_EP_ISO, // Iso End point Type
0x00,0x04, // Max packet size = 1024 bytes
0x01, // Servicing interval for data transfers
// Super Speed Endpoint Companion Descriptor
0x06, // Descriptor size
CY_U3P_SS_EP_COMPN_DESCR, // SS Endpoint Companion Descriptor Type
0x02, // ??? 2+1=3 ??? Max no. of packets in a Burst
0x0F, // ??? 15+1=16 ??? Mult.: Max number of packets
0x00,0x04 // Bytes per interval : 1024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
// Super Speed Endpoint Companion Descriptor
0x06, // Descriptor size
CY_U3P_SS_EP_COMPN_DESCR, // SS Endpoint Companion Descriptor Type
0x0F, // ??? 15+1=16 ??? Max no. of packets in a Burst
0x02, // ??? 2+1=3 ??? Mult.: Max number of packets
0x00,0x04 // Bytes per interval : 1024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Endpoint:
epCfg.enable = CyTrue;
epCfg.epType = CY_U3P_USB_EP_BULK;
epCfg.burstLen = CY_FX_SLFIFO_PACKETS_PER_BURST;
epCfg.streams = 0;
epCfg.pcktSize = size;
DMA:
if(CY_U3P_SUPER_SPEED == usbSpeed)size *= CY_FX_SLFIFO_PACKETS_PER_BURST;
/* Create a DMA MANUAL channel for U2P transfer.
* DMA size is set based on the USB speed. */
dmaCfg.size = size;
Descriptor:
/* Super speed endpoint companion descriptor for producer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type */
CY_FX_SLFIFO_PACKETS_PER_BURST - 1, /* Max no. of packets in a burst : 0: burst 1 packet at a time */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
And in the header file:
#define CY_FX_SLFIFO_PACKETS_PER_BURST (16) //SuperSpeed Packets per Burst
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
endPointConfig.isoPkts = 3; // ???
endPointConfig.burstLen = 16; // ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dmaConfig.count = 8; // ??? 2, 8 or what ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
isoPkts is only for iso endpoints. DMA buffers is 4 per dma channel at the moment in my design. But you can leave it unchanged at two buffers also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help Chris. Now I set burst size to 16 for downstream channel and left the upstream channel at 1. Now I get 275 MB/s downstream and 280 MB/s upstream. The Loopback configuration acheives 145 MB/s but the bottleneck may be the DDR memory read and write access from the attached FPGA (data is written to DDR memory and read back).
-Silvio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.cypress.com/?rID=59492
I've seen above demo.
Could you pls let me have the host pgm source & firmware source & FPGA src ?
On my board, the speed is 6MB/s.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
if you go on as proposed you'll find yourself in troubles when connecting to usb2.0 (at least we did) . The device will not enumerate. Make sure you check for usb3.0 before setting the burstLen.
if(CY_U3P_SUPER_SPEED == usbSpeed) epCfg.burstLen = CY_FX_SLFIFO_PACKETS_PER_BURST;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi!Vytautas2!
u can try this:
// Super Speed Endpoint Companion Descriptor
0x06, // Descriptor size
CY_U3P_SS_EP_COMPN_DESCR, // SS Endpoint Companion Descriptor Type
0x0F, // ??? 1+15=16 ??? Max no. of packets in a Burst
0x02, // ??? 1+2=3 ??? Mult.: Max number of packets
0x00,0xC0 // reserved bandwith,Bytes per interval : 1024*3*16 (max packge counts per interval is 48)
CyU3PMemSet ((uint8_t *)&dmaConfig, 0, sizeof (dmaConfig));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested the speed using fpga+slavefifo+FX3 bulk ep , the speed is 350MB/S when the max burst size is 16 and using DMA AUTO, I tested it using streamer of cypress superspeed USBSuite, next time I wanna test it using ISO ep.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the ISO using ep 3 or 7 ,and I referring to what u told ,but it failed ,it cannot transfer data successfully,someone can upload ur Firmware src codes of USBIsoSourceSink?Thx!