- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our basic system has a FPGA that controls a CCD imager. The video data is transferred to the FX3 via the GPIF. We are streaming the data to the PC via a USB 3.0 Bulk Endpoint.
I have based our code on Cypress's "SYNCHRONOUS SLAVE FIFO PROTOCOL EXAMPLE". We are using AUTO DMA to support our bandwidth ( 350 mega bits per second).
We are using CYUSB overlapped IO on the PC side.
The FPGA continuously sends 18.75 * 16K data and asserts the EOP on the GPIF interface on the last byte. I am able to see the EOP asserted in the DMA channel on the FX3.
Each queued request is for 16K of data. on the PC side. The issue is that I always receive 16K data on the PC side. I would expect to receive .75 * 16K bytes at some point.
How can I set up the DMA channel to terminate the current transaction when the GPIF receives an EOP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please make sure that SLWR and EOP are both asserted at the last byte? If EOP alone is asserted it will send a Zero length buffer while leaving the current traction unterminated.
So any new transfer would merge with 0.75 * 16K and make it as a complete 16K buffer.
i.e You need to ake sure that the state machine goes to SHORT_PKT state instead of ZLP state. (Refer your state machine diagram in the GPIF Designer software)
Regards,
- Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes both SLWR and EOP are both asserted on the last byte.
I used the GPIFII_Designer_sync_SlaveFIFO.cyfx GPIF project. Looking at the SHORT_PKT state there is a COMMIT, IN_ADDR, and IN_DATA action. According to help, the IN_DATA action suppresses the ZLP. I removed the IN_DATA action and recompile. Still no terminated transaction.
I also tried making the the last transfer an odd size, i.e. 750 bytes. This did not work either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have observed that if I synchronize the the PC to start reading from the usb bulk endpoint and then enable the hardware to start transferring data to the FX3 via the GPIF, I receive short packets on the PC side.
If I first enable the hardware to transfer data to the PC and then start reading from the bulk endpoint on the pc, I never receive a short packet.
I have worked around the problem for now by embedding a sync code in the video stream.