Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ft245_sync_if.vhd: may loose some bytes on close small data transfer #2

Open
RandomReaper opened this issue Oct 5, 2017 · 1 comment

Comments

@RandomReaper
Copy link
Owner

There is a bug when small data transfers are too close (in the same direction) probably for RX and TX.

If you face this bug, the workaround for TX is to put the small packets in a buffer and send them at once, for RX, data should be read in a similar manner.

Since this bug is not in my use case, I won't fix it, but feel free to participate.

@RandomReaper RandomReaper changed the title ft245_sync_if may loose some bytes on close small data transfer ft245_sync_if.vhd: may loose some bytes on close small data transfer Oct 5, 2017
@set-soft
Copy link

set-soft commented Dec 7, 2017

I think this is related to the following bug in the description:
When you have two transfers separated by a few clocks, and the first transfer fills the FT FIFO, you'll lose one byte.
This is because the first transfer will make TXE# go inactive, but the input FFs will delay it. So when the FSM sees the second transfer will go to the STATE_WRITE state. The problem is that as soon as we get there we realize that TXE# is no longer active. So we don't send data to the FT. The problem is that we retired one byte.
The solution is to set the write_failed condition when we retired a value in the previous cycle and now we see TXE# deasserted.

RandomReaper added a commit that referenced this issue Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants