Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > double queue of begindataxfer

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



double queue of begindataxfer
Moderator:
RSKV

Post Reply
Follow this topic



double queue of begindataxfer

Tomixworks posted on 19 Mar 2013 6:52 AM PST
Member
3 Forum Posts

Hi

I am experimenting with FX2LP device, which is connected to an FPGA. I generate cca. 24MB/s data load. With streamer program (c#) it was great, the speed was excellent >30MB/s. Then I noticed that the load is not coherent, it is bursty. It depends on the settings of packet / transfer and transfer / queue. For example for 64 pac/xfer  -  64 xfer/que  i get 1 - 2ms when the queue is empty and the c# program refills it. The endpoints were configured as Bulk

The problem is that it is no additional RAM connected to FPGA, so it will be great if the load will be more coherent. (There won’t be the 1 - 2 ms gaps).

So I had an idea, but I don’t know if it is supported by the driver:

It is possible to double buffer the queue? So when the first is empty, the second is already started. Then there won’t be any gaps, and the transfer will be smooth.

Thank you




Re: double queue of begindataxfer

NIKL posted on 20 Mar 2013 10:58 PM PST
Cypress Employee
148 Forum Posts

 If you look at the streamer code, you will understand that the queue is never empty. When you choose 64 xfers to queue, before the waitforxfer and finishdataxfer are called, begindataxfer is called 64 times. And then on for each wait-finishdataxfer, one begindataxfer is called. So there are 64 xfers in queue all the time.

Could you please explain more what you mean when you say the queue is empty for 1-2ms? Also a little more explanation on your double buffer implementation would help us understand more.

 

Thanks

Nikhil



Re: double queue of begindataxfer

Tomixworks posted on 22 Mar 2013 01:19 AM PST
Member
3 Forum Posts

Ok thanks for reply,

but then it is more complicated than I thought.

So the 1-2ms dead time was examined by connecting FLAGx of CY7C68013A (as a full flag of endpoint) to oscilloscope. Then what I saw, was transfer in every uframe (flag indicated empty buffer), and then 1 to 2ms silence (flag indicated full buffer). The number of transfers in uframes was equal to number set in queue. So 64 queue / 64 packet resulted in 4096 consecutive uframes to be filled with my data, then the dead time. I assuming that transfer was in every uframe is because the full flag indicated 125us periodicity.

That is why i thought that the queue is empty and refilled again, and that is why I wanted to double buffer it. But if the queue is kept full all the time, than I don't have any idea why the transfer is like that.

Can it be by OP system ? (win7 x86, dual core 3GHz, 4GB of RAM), or by other devices connected to USB ? I had only keyboard and mouse connected to the PC by USB at that time.

Thank you



Re: double queue of begindataxfer

NIKL posted on 22 Mar 2013 04:57 AM PST
Cypress Employee
148 Forum Posts

 Try using the CPP streamer. There was an issue reported by one of the customers: http://www.cypress.com/?app=forum&id=167&rID=63567

Thanks

Nikhil



Re: double queue of begindataxfer

NIKL posted on 22 Mar 2013 05:05 AM PST
Cypress Employee
148 Forum Posts

 I would also suggest you to carry the test out on multiple systems (say XP OS or machine with USB 3.0 host controller) just to rule out if it is a host related issue. 

I am not sure if USB keyboard and mouse will affect your data transfer.

FYI, AN61345 will be updated by next week. I recorded a speed of 44.3 MBps with the updated stream-in project (not of web as of today, 22 march 13) . The same speed with the stream-out project on Win7 OS 64-bit with Intel's USB 3.0 host controller.

You could also check out the projects once they are on web.

 

Thanks

Nikhil



Re: double queue of begindataxfer

NIKL posted on 22 Mar 2013 05:24 AM PST
Cypress Employee
148 Forum Posts

 I meant USB 2.0 speed of 44.3MBps (both stream-in/streamout) on a FX2LP+FPGA setup*



Re: double queue of begindataxfer

Tomixworks posted on 11 Apr 2013 06:39 AM PST
Member
3 Forum Posts

Hi

I made some research according to c# and c++ streamer software.

What I got surprised me. With c++ streamer soft with 64 packets / 4 queue I got 43800KB/s and totally consistent load on USB. With c# soft with the same settings I got only 7600KB/s and 10-12 ms gaps in transfer.

I made some screenshots, there are in attachment. Within the attachment you can find 2 screenshots of apps, and 3 screenshots of an oscilloscope measuring, made on FLAGD configured as full flag of the endpoint. Please notice that 2 of measurements are made with 5ms time base and the detailed is with 50us

I am using Cypress Suite USB 3.4.7 on win 7 x86 machine.

 

Is the issue mentioned in http://www.cypress.com/?app=forum&id=167&rID=63567 solved ? And also what is causing this behavior ?






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20