FX3 GPIF FlagA delay with SDK 1.3.4

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sergey
Level 3
Level 3
25 sign-ins 25 replies posted 10 replies posted

We send data from FPGA to FX3 with constant data rate(~390MB/s). We use GPIF FlagA as busy signaling and from time to time  FlagA declares busy (Not empty)  for longer period ~300-400us instead of 10-20us, but we have some buffer on FPGA side and it can cover this delays. We have installed SDK 1.3.4, rebuilt FX3 firmware and now delay with the same setup can be up to 1ms, which our buffering can't handle. 

We use bulk endpoint, DMA auto channel, 32KB x 8 buffers. 

Would you be so kind giving us information about buffets handling with SDK 1.3.4 and why it differs with SDK 1.3.3?

Regards

 

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Sergey,

The gap maybe occurring because of USB host being too slow. You could retry changing the buffer size and see the difference. 

As the issue is reproducible on both the SDK's, it can be concluded that the delay issue is not related to the new SDK. 

Best Regards,
AliAsgar

View solution in original post

0 Likes
7 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hello,

1. Are both the SDK versions being tested on the same PC and the same host application?

2.  Can you confirm if the build variable in project settings is 1_3_4 when firmware is built with sdk 1.3.4.

3. If possible, could you share the firmware with us, it would be of great help.

Best Regards,

AliAsgar

0 Likes
lock attach
Attachments are accessible only for community members.
Sergey
Level 3
Level 3
25 sign-ins 25 replies posted 10 replies posted

Dear AliAsgar,

Thank you for reply.

1. Yes, absolutely the same setup.

2. I have system variable, which points to SDK installation, 1.3.4 and 1.3.3 I have installed on different PCs.

3. I will try to reproduce issue with one of your examples, but can't share our firmware.

I have found next issue : https://community.cypress.com/t5/USB-Superspeed-Peripherals/How-to-enable-FX3-USB-3-0-LTM-function/m...

And looks like I am facing the same issue.  

Sending LTM 125-512us doesn't help.

I have done simulation of issue, sending by FPGA data 128bytes in loop and sometimes got "huge" gaps about 1-2ms, issue reproducible with both 1.3.4 and 1.3.3 SDK, with 1.3.3 reproducible less. Please see attached image (scope_23.jpg, FlagA state). 

Regards,

Sergey

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Sergey,

The latency is caused maybe because the DMA buffers are not getting consumed by the consumer fast enough, that is, the DMA buffers are not free.

You could try these methods to reduce latency,

1. The size of the buffers can be increased more than 32KB. The buffer count must be reduced accordingly to keep the buffer memory constant.

2. GPIF Thread switching is faster than DMA buffer switching, so MultiDMA channel can be used.

I have some questions:

1.Why is LTM used here?

2. In the photo shared, the flag goes HIGH and there is some noise. What is that noise? Should it be ignored?

Best Regards,
AliAsgar

0 Likes
Sergey
Level 3
Level 3
25 sign-ins 25 replies posted 10 replies posted

Dear AliAsgar,

I have tried different sizes of buffer, the same behavior. 

1. Just trying  any possibilities. 

2.  Noise comes from our device(I guess), just soldered thin wires to pins.

What I have found: Gaps occasionally occur during new buffer(s) committing. I have done next test: committed 256 buffers, started sending data, committed one more buffer and reproduced issue in 20% of tests, if I don't commit this additional buffer during data flow, issue is not reproducible. So I think it is USB host issue or driver issue.

Thank you   for your support.  

Regards,

Sergey

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Sergey,

Has your issue been resolved, or is further support needed on this issue?

Best Regards,
AliAsgar

0 Likes
Sergey
Level 3
Level 3
25 sign-ins 25 replies posted 10 replies posted

Hi AliAsgar,

Unfortunately issue has not been resolved. I have installed back SDK 1.3.3,  written code, which makes less access to device and driver and now it works more stable, but gaps still occur.  If you don't have any advises, how I can eliminate these gaps, then case can be closed.

Thank you for support.

Regards,

Sergey

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Sergey,

The gap maybe occurring because of USB host being too slow. You could retry changing the buffer size and see the difference. 

As the issue is reproducible on both the SDK's, it can be concluded that the delay issue is not related to the new SDK. 

Best Regards,
AliAsgar

0 Likes