Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
_Shri_
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hi team, we are trying to integrate a two-socket implementation in FX3. These two sockets must be mapped to two threads and the external processor will switch the address lines to put data in the corresponding sockets. Can someone explain or share the GPIF designer for this configuration.

 

Explanations are welcome!

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi,

First of all, please start by checking source code of AN75779 .It can be found here .

The #define CY_FX_EP_PRODUCER will be used for referring to OUT endpoint 1 and CY_FX_EP_CONSUMER will be used for referring to IN endpoint 1. As for the USB sockets (i.e CY_U3P_UIB_SOCKET_PROD_1 and CY_U3P_UIB_SOCKET_CONS_1), there is a direct mapping between the USB endpoints and the corresponding DMA sockets. That is, the socket CY_U3P_UIB_SOCKET_PROD_1 will be mapped to out endpoint 1 and CY_U3P_UIB_SOCKET_CONS_1 will be mapped to IN endpoint 1.

or the P-Port sockets, CY_U3P_PIB_SOCKET_0 will be mapped to socket 0 of P-Port. SImilarly,CY_U3P_PIB_SOCKET_3 will be mapped to socket 3 of P-Port. The API CyU3PGpifSocketConfigure () is used to map the active socket with a thread which is actually addressed by the FPGA.

Now, as you would like to create a DMA channel between multiple producers (2 producer socket) and one consumer socket, you should be using the API CyU3PDmaMultiChannelCreate (). You can use the source code of AN75779 as a reference to understand how to set the different parameters of this API.

Regards,

Mallika

 

View solution in original post

0 Likes
1 Reply
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi,

First of all, please start by checking source code of AN75779 .It can be found here .

The #define CY_FX_EP_PRODUCER will be used for referring to OUT endpoint 1 and CY_FX_EP_CONSUMER will be used for referring to IN endpoint 1. As for the USB sockets (i.e CY_U3P_UIB_SOCKET_PROD_1 and CY_U3P_UIB_SOCKET_CONS_1), there is a direct mapping between the USB endpoints and the corresponding DMA sockets. That is, the socket CY_U3P_UIB_SOCKET_PROD_1 will be mapped to out endpoint 1 and CY_U3P_UIB_SOCKET_CONS_1 will be mapped to IN endpoint 1.

or the P-Port sockets, CY_U3P_PIB_SOCKET_0 will be mapped to socket 0 of P-Port. SImilarly,CY_U3P_PIB_SOCKET_3 will be mapped to socket 3 of P-Port. The API CyU3PGpifSocketConfigure () is used to map the active socket with a thread which is actually addressed by the FPGA.

Now, as you would like to create a DMA channel between multiple producers (2 producer socket) and one consumer socket, you should be using the API CyU3PDmaMultiChannelCreate (). You can use the source code of AN75779 as a reference to understand how to set the different parameters of this API.

Regards,

Mallika

 

0 Likes