one more supplement..
While FLAGB abnormal behavior occurs, FLAGB keeps low, but FLAGA is high.
Since transmision is determined by FLAGA and FLAGB, the abnormal phenomenon will halt the transmission
Does any one have the same experience?
If I just monitor FLAGA(full), FLAGB(partial full) function well, but data loss exist.
If I monitor both FLAGA and FLAGB, FLAGB will be assertes randomly regardless of the setting in watermark.
I had observed that if i stop transmitting data(SLWR pull high) after FLAGB asserted, FLAGB will always keep low and never recover to high state, at the moment FLAGA is still high.
But if I keep writing data regardless of FLAGB, FLAGA will finally goes low and after a while FLAGB recover to high state and then so as FLAGA.
It seems that partial full will recover to high state only when FLAGA is going to recover.
Is there any wrong setting that causes this issue?
P.S. PC is always requesting data from FX3 by cypress streamer (with 64 packets per Xfer and 2 data queues)
FlagB transitioning low indicates that buffer has become almost full. If you stop writing then, buffer actually never becomes full (FlagA remains high).
Every single data item written into GPIF buffer is not transferred to PC immediately. Data remains in GPIF buffer until the GPIF state machine hands the buffer over to USB automata for transferring the data to PC from there.
GPIF state machine submits buffer to USB automata automatically when buffer becomes full. Or, FPGA can force GPIF to submit half-filled/empty buffer by asserting PKTEND signal during write cycle.
So, you should continue to write data until buffer becomes full (FlagA goes low) or assert PKTEND for one write cycle.