GPIFII - Dual Sockets don’t follow order of socket linked list

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

cross mob
HuYa_4249091
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi, I've referred AN75779 doc to accomplish that for our project.

Now, we want to change the transmission mechanism:

  1. FPGA will send out 2 type of data: image & info to FX3
  2. image data uses dual socket & info data use single socket to receive
  3. Use sw_pin to determine the type of the next incoming data
  4. Each HREF may receives different type of data(ex: HREF1 – image, HREF2 – info, HREF3 – image…)
  5. FPGA designs that each HREF data length is equal as the DMA buffer size(all are 8k)

Dummy state machine:
GPIF.JPG

 

According to Getting Started doc, I've understood the mechanism for dual sockets yield:
Dual Sockets.JPG

The normal step behavior which use dual socket should like:
normal step.JPG

However, now, each HREF may receive different type of data. I worry it may cause Socket Linked List  conflict...

Ex: HREF1 – image, HREF2 – info, HREF3 – image, HREF4 – image

My inference step behavior:
my step.JPG
In the step 1, load the DMA Descriptor1 on socket1(thread1). However, the next image data is received by socket0, not the expected socket1.

Q1: Will it cause the conflict as the following fig and cause crash for USB transmission?
transfer arch.JPG

Q2: If the answer for Q1 is yes. Can I use the commands in FW to reset Socket Linked List to avoid the conflict?CyU3PDmaMultiChannelReset(&glChHandleSlFifoPtoU);
CyU3PDmaMultiChannelSetXfer(&glChHandleSlFifoPtoU, 0, 0);
CyU3PDmaMultiChannelSetXfer(&glChHandleSlFifoPtoU, 0, 1); 

Thanks for your patience to read it. Any help will be highly appreciated!

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Hughes,

Ex: HREF1 - image, HREF2 - image, HREF3 - info, HREF4 - image
In this condition, it seems that your state machine isn't fit...

>> Yes, I had modified the state machine assuming the data format as Ex: HREF1 – image, HREF2 – info, HREF3 – image, HREF4 – image

Confirm again. If the condition is like the following fig, it may cause system error, right?

>> Yes, If the data is not written in PING PONG manner, then the error will occur. Once the DMA buffer associated to socket 0 is completely filled, the thread will switch and point to socket 1 and its associated buffer will be pointed. So it is expected to write to DMA buffer in ping pong format when two sockets are used as shown in the figure shared by you.

Q2: If the answer for Q1 is yes. I can require the FPGA to send out consecutive pair HREF - image without any HREF - info between the 2 HREF - image.

>> Yes, if the data format can be controlled from the FPGA then the new format, as below, will make GPIF state machine easier.

ex: HREF1 - image, HREF2 - image, HREF3 - info, HREF4 - image, HREF5 - image, HREF6 - info, HREF7 -

Regards,
Rashi

View solution in original post

3 Replies