You are here

FX3 GPIF Underrun and Overrun in Synchronous Slave FIFO interface | Cypress Semiconductor

FX3 GPIF Underrun and Overrun in Synchronous Slave FIFO interface

Summary: 1 Reply, Latest post by dkozel_rn on 24 Jul 2013 03:41 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
dkozel_rn's picture
2 posts


I'm working on a project with an FX3 connected to a Xilinx FPGA. We are using a 16 bit Synchronous Slave FIFO interface with the FPGA being the master. We are using our own FPGA code.

We're using the following application note as our reference.

Designing with the EZ-USB FX3 Slave FIFO Interface
AN65974 Rev. H

We are using a dedicated USB endpoint for transfers and using DMA to link it to the GPIF threads. The DMA buffers are 512 bytes large and there are two per channel

/* Create a DMA MANUAL channel for U2P transfer. */
dmaCfg.size = 512;
dmaCfg.count = 2;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

We are doing block transfers of 512 bytes. Flag A is dedicated to thread 0 and Flag B is dedicated to thread 3.

I added the gpif_error_cb callback function from the application note and found that we are encountering two CYU3P_PIB_ERR_THR0_RD_UNDERRUN errors when the FPGA reads from the FX3 and two CYU3P_PIB_ERR_THR3_WR_OVERRUN errors when it writes to the FX3.

What is unclear from the documentation is exactly what these errors mean. Is the FPGA (master) trying to read two 16 bit words too many? And trying to write two 16 bit words too many?

Given that we are using dedicated flags I don't believe we should be encountering multicycle latency problems. Is that correct?

There a period after the SLWR or SLRD lines are asserted during which data is not yet transferred (two cycles stated on page 5), do we need to deassert SLRD before actually receiving 256 16 bit words?

We aren't currently using watermarks for either transaction, I understand you can use that, but it doesn't seem to be required so we'd like to understand the exact transaction before trying that.


dkozel_rn's picture
2 posts

The formatting of that post is horrendous, my apologies. I don't know how to edit it, or fix it even if I could.

Here is a fixed version on Pastebin.

Log in to post new comments.