Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > How to select PIB socket ID

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



How to select PIB socket ID
Moderator:
RSKV

Post Reply
Follow this topic



How to select PIB socket ID

SKAN posted on 22 Sep 2011 10:36 AM PST
Senior Member
14 Forum Posts

I aksed this question through a case also. Can anyone help me?

How to get the socket id for the P port for U to P or P to U  transfer? What is the basis of selecting CY_U3P_PIB_SOCKET_0 and  CY_U3P_PIB_SOCKET_3 in SlaveFifoAsync example?
We are likely to use 32 bits async slave fifo interface. We will have 2  IN and 2 OUT endpoints.  e.g. -
2 - OUT
4 - OUT
86- IN
88-  IN

What will be the "prodSktId" and "consSktId" for 4 DMA channels?

2  - OUT , prodSktId =  CY_U3P_UIB_SOCKET_PROD_2  , consSktId  = ?
4  - OUT,  prodSktId =  CY_U3P_UIB_SOCKET_PROD_4 ,  consSktId =  ?
86 - IN,   prodSktId =  ?  , consSktId = CY_U3P_UIB_SOCKET_CONS_6
88 - IN,   prodSktId =  ?  , consSktId = CY_U3P_UIB_SOCKET_CONS_8
 




Re: How to select PIB socket ID

SKAN posted on 24 Sep 2011 07:43 PM PST
Senior Member
14 Forum Posts

I do not see any reply. Is there anything wrong in my question that does not make sense to others?



Re: How to select PIB socket ID

aasi posted on 26 Sep 2011 03:31 AM PST
Cypress Employee
1073 Forum Posts

Socket 0 to 15 are bi-directional and the rest can only be producer sockets. There is nothing specific behind the reason for selection of socket 0 or socket 3. socket 1 or 2 etc can also be used.

The restriction here is that it has to match the GPIF descriptor. We've designed it with socket 0 and 3 in the example. That is all.

Regards,

Anand



Re: How to select PIB socket ID

SKAN posted on 26 Sep 2011 10:20 AM PST
Senior Member
14 Forum Posts

OK Thanks this clarifies.

How does the thread map with the socket? Lines A1:A0 point to the thread. Can you please tell me how this mapping is controlled in firmware?

As per application note AN65974 -

EZ-USB FX3 provides up to four physical threads for data transfer over the GPIF II. At a time, any one socket may be mapped to a thread. The sockets that are to be used must be mapped to a thread. This mapping is done by EZ-USB FX3 firmware. For example, suppose socket 2 is mapped to thread 0 and socket 3 is mapped to thread 1.

Note that the address signals A0:A1 on the interface indicate the thread to be accessed. FX3’s DMA fabric then routes the data to the socket mapped to that thread. Therefore, in this example, when A0:A1 = 0, thread 0 is accessed, and any data that is transferred over thread 0, will be routed to socket 2. Similarly, when A0:A1 = 1, data is transferred in and out of socket 3



Re: How to select PIB socket ID

Chris R. posted on 26 Sep 2011 12:45 PM PST
Top Contributor
135 Forum Posts

Take a look in my topic: http://www.cypress.com/?app=forum&id=167&rID=53798 I think, I found the solution for the mapping in the GPIF register settings. But this suggestion is not veryfied yet.



Re: How to select PIB socket ID

SKAN posted on 27 Sep 2011 10:43 PM PST
Senior Member
14 Forum Posts

Thanks Chris.

 I looked at the topic and the file gpif_regs.h. You have written  -

"The 4 registers CY_U3P_PIB_GPIF_THREAD_CONFIG_ADDRESS map one of the 32 PIB sockets to the 4 physical threads of the GPIF. This is coded in the 5 least significant bits. So the SyncSlaveFIFO firmware example uses thread 0 and 3, as the 4 threads are mapped to the PIB sockets 0 to 3."

WHat is the basis of  - "This is coded in the 5 least significant bits" ?  Do you have any details of the registers ? In the file I see only  -

#define  CY_U3P_PIB_GPIF_THREAD_CONFIG_ADDRESS(n)     (0xe00140fc + ((n) * (0x0004)))

Can someone from Cypress confirm the statement from Chris? I think at this stage this is sufficient for me.

 

 

 

 

 

 

 

 

 

 



Re: How to select PIB socket ID

Chris R. posted on 27 Sep 2011 01:29 AM PST
Top Contributor
135 Forum Posts

In the lines below the Register address you can find the following comment:

/*
   Active Socket Number for this thread.
   Can be written by software for fixed socket assignment.
   Can be modified by h/w as result of PP_DMA_XFER accesses
   Can be modified by h/w as result of alpha 'sample AIN'
 */
#define CY_U3P_GPIF_THREAD_SOCK_MASK                        (0x0000001f) /* <0:4> RW:RW:0:Yes */
#define CY_U3P_GPIF_THREAD_SOCK_POS                         (0)

 

So I think, the socket number has to be written in the last 5 bits....in the example the sockets 0...3 are used.



Re: How to select PIB socket ID

winyio posted on 06 Jun 2012 01:04 AM PST

1 Forum Post

 Hi aasi,

>> The restriction here is that it has to match the GPIF descriptor. We've designed it with socket 0 and 3 in the example.

How to set (multiple)socket id in GPIF II designer?  I'm also trying to follow Chris's solution, but can not really catch his idea.  It seems hard for me to make the CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE work. Can you point me a way?






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.