GPIF II hiccup first time through buffer ring | Cypress Semiconductor
GPIF II hiccup first time through buffer ring
We're using a Cypress FX3 GPIF II Slave FIFO interface in a many-to-one configuration driven by a custom FPGA. We have noticed an issue that we cannot explain.
Our FPGA is running on a continuous 112MHz sampling clock generating 16kB frames of data. We are using two ping-pong buffers 4 deep for both channels feeding the socket. Every such frame, the FPGA updates a unique 16 bit ID that is placed in the frame to allow us to ensure data integrity - we need to avoid gaps. During normal operation, the system works just fine. The initial startup is the problem - the very first time we cycle back to the front of the DMA buffer ring (that is, after the eight frame), we see a gap in the data. Our frame IDs run through a sequence 0, 1, 2, 3, 4, 5, 6, 7, 77, 78.....
We start and stop the FPGA when starting and stopping data acquisition frequently during normal operation, which also pauses the Slave FIFO interface. Upon restart, there is no such gap in the data. It happens only on the very first startup of the channel. Another product uses a similar system but a different DMA buffer count, and it too sees the exact same wrap around problem once and only once every power cycle. Let me add that the actual channel creation and state machine startup happens much earlier than the first acquisition, so we believe the system to be fully up and running when this happens.
So it seems that there is a 1-time delay associated with wrapping the GPIF II engine back around to the front of the DMA buffer queue. Is this expected?