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

Collision detection is not reliable #13

Open
ZipCPU opened this issue Aug 14, 2024 · 0 comments
Open

Collision detection is not reliable #13

ZipCPU opened this issue Aug 14, 2024 · 0 comments
Labels

Comments

@ZipCPU
Copy link
Owner

ZipCPU commented Aug 14, 2024

This issue surrounds the GO_IRQ_STATE command. This command typically follows a request from the device to perform some action, and then waits for the device to respond to the command once the action is complete. However, it is possible for the controller to also interrupt the device if/when it decides it no longer wishes to wait for the IRQ.

This leads to the very real possibility that both device and host might attempt to exit the IRQ state at the same time.

Mitigating this requires that the host leave the push-pull IO model, and also that it slow down the clock significantly.

Logic exists within the front end to detect collisions like this and to stop attempting to drive the bus if any are detected. This logic is known to have issues. Specifically, the synchronization between outgoing and incoming data doesn't (yet) match simulations with actually known hardware delays. As a result, collisions are likely to be detected if the host ever tries to exit the IRQ state even if no collision has actually taken place.

One potential solution is to leave collision detection off, and simply risk a malformed reply (CRC failure) in this case. Either way, the device will leave the IRQ state--it's just that an error might be detected when none actually existed.

A longer term solution needs to be determined.

@ZipCPU ZipCPU added the bug label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant