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

csr.wishbone: Only ack for 1 cycle #32

Merged
merged 1 commit into from Sep 16, 2021

Conversation

antonblanchard
Copy link
Contributor

Currently we ack for 2 cycles, even if in the second cycle stb and cyc
are not asserted. This could cause issues on a shared wishbone with
asynchronous cycle termination, because that ack would be interpreted
as completing the next transaction.

To avoid this just ack for 1 cycle only.

@antonblanchard
Copy link
Contributor Author

A write and read from a CSR before and after the fix.

The current behaviour:

bad

and with this fix:

good

@whitequark
Copy link
Member

Looks reasonable. Can you add a test?

Currently we ack for 2 cycles, even if in the second cycle stb and cyc
are not asserted. This could cause issues on a shared wishbone with
asynchronous cycle termination, because that ack would be interpreted
as completing the next transaction.

To avoid this just ack for 1 cycle only.
@antonblanchard
Copy link
Contributor Author

Looks reasonable. Can you add a test?

Sure, I added checks to the existing tests. Does that look ok, or would you prefer a separate test?

@whitequark whitequark merged commit e9f73e4 into amaranth-lang:master Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants