Advertisement
Guest User

FX3 GPIF Underrun and Overrun in Synchronous Slave FIFO inte

a guest
Jul 24th, 2013
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. Hello,
  2.  
  3. 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.
  4.  
  5. We're using the following application note as our reference.
  6.  
  7. Designing with the EZ-USB FX3 Slave FIFO Interface
  8. http://www.cypress.com/?docID=44080
  9. AN65974 Rev. H
  10.  
  11. 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
  12.  
  13. /* Create a DMA MANUAL channel for U2P transfer. */
  14. dmaCfg.size = 512;
  15. dmaCfg.count = 2;
  16. dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
  17. dmaCfg.prodSckId = CY_FX_PRODUCER_USB_SOCKET;
  18. dmaCfg.consSckId = CY_FX_CONSUMER_PPORT_SOCKET;
  19.  
  20. We are doing block transfers of 512 bytes. Flag A is dedicated to thread 0 and Flag B is dedicated to thread 3.
  21.  
  22. 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.
  23.  
  24. 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?
  25.  
  26. Given that we are using dedicated flags I don't believe we should be encountering multicycle latency problems. Is that correct?
  27.  
  28. 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?
  29.  
  30. 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.
  31.  
  32. Thanks!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement