Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Communication between FX3 and FPGA

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



Communication between FX3 and FPGA
Moderator:
RSKV

Post Reply
Follow this topic



Communication between FX3 and FPGA

diwo posted on 27 Nov 2012 6:49 AM PST
Member
6 Forum Posts

Hello,

I am starting with a new project, where the FX3 is connected to a FPGA. The main data flow is from the FPGA to USB. So I have to transfer data from, P-Port to U-Port and may be vice versa. The Synchronous Slave FIFO example should be a good base for this.

I also have to communicate from USB-Side with the FX3 ARM-Processor. I think I can do this by adding two additional DMA-Channels from USB (2 additional Bulk Endpoints / Sockets) to the CPU (CY_U3P_CPU_SOCKET_CONS and CY_U3P_CPU_SOCKET_PROD). I have tested this already with the FX3 Development-Board and it seems to work.

But what is the best way for a communication between the FX3 CPU and the FPGA?

Should I add two DMA-channels from P-Port to the CPU, like I have done this already for the U-Port.? Can I use the “sync_slave_fifo_2bit” interface to address 4 threads (sockets) where 2 are connected with the U-Port (AUTO-Channel In/Out) and 2 are connected with the CPU (MANUAL-Channel-In and MANUAL-Channel-Out)?

Another way for the communication may be the mailbox registers. But I have found no example for them.

I know I can also use the I2C-Bus to communicate with the FPGA, but a communication via the P-Port should be much faster.




Re: Communication between FX3 and FPGA

Lumpi6 posted on 27 Nov 2012 07:40 AM PST
Top Contributor
183 Forum Posts

Hi,

you may also be able to use the UART (max. baudrate 4MHz) to communicate between FPGA and FX3, that is a bit faster than the I2C (max 1MHz). Third solution but may be the best if you also like to communicate to FPGA while transferring data from P-port to USB3.

regards,

lumpi



Re: Communication between FX3 and FPGA

diwo posted on 28 Nov 2012 11:34 PM PST
Member
6 Forum Posts

The UART is not an option for me, because the first revision of my board is already out at the manufacturer. I have connected all GPIF II Pins and the I2C-Bus to the FPGA. However I have not connected the UART Pins, because I want to use the UART for debug purposes only. Nevertheless thank you for your suggestion.

 



Re: Communication between FX3 and FPGA

Lumpi6 posted on 28 Nov 2012 01:20 AM PST
Top Contributor
183 Forum Posts

Ok then it is too late for that. But take care, because you can not use the UART api in DMA mode (not sure if also in other mode) while you are in some interrupt/callback context (e. g. GPIO interrupt). In this cases it is better you are using an own created SPI with GPIO switching, that will work all the time. The SPI could easy be converted through a hardware SPI to UART bridge.

regards

lumpi



Re: Communication between FX3 and FPGA

RSKV posted on 03 Dec 2012 11:22 PM PST
Cypress Employee
655 Forum Posts

Hi Diwo,

I think the purpose of I2C bus in your design is to send/recieve control/status information between FX3 and FPGA.

As per my understanding, the frequency of  information running on this path is less. So, I think I2C bus should be good enough as you already designed your hardware boards.

Thanks,

sai krishna.



Re: Communication between FX3 and FPGA

diwo posted on 04 Dec 2012 02:14 AM PST
Member
6 Forum Posts

I think I will start with I2C-Interface.

However I am having all possibilities with the GPIF II Interface, because I have connected all signals to the FPGA. I think my configuration (FX3 connected to FPGA) is very common.

That's why I hoped someone has a solution for a communication besides the I2C-Bus or the UART.

 






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.