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

🐛 Fix Wishbone timeout bug #230

Merged
merged 4 commits into from
Dec 3, 2021
Merged

🐛 Fix Wishbone timeout bug #230

merged 4 commits into from
Dec 3, 2021

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Dec 3, 2021

This PR fixes a bug in the Wishbone timeout counter.

Wishbone timeout configurations (via the MEM_EXT_TIMEOUT generic) that are a power of two (like 256) caused an immediate timeout exception since the timeout counter was one bit short.

The same problem occurred in the BUSKEEPER's timeout counter. However, this bug did not actually appeared because the default BUSKEEPER timeout is not a power of two.

Thanks to @emb4fun for identifying this bug. 👍

@stnolting stnolting added bug Something isn't working HW hardware-related labels Dec 3, 2021
@stnolting stnolting self-assigned this Dec 3, 2021
@stnolting stnolting changed the title 🐛 Fix Wishbone timeout buf 🐛 Fix Wishbone timeout bug Dec 3, 2021
@stnolting stnolting marked this pull request as ready for review December 3, 2021 04:59
@stnolting stnolting merged commit fa4b240 into master Dec 3, 2021
@stnolting stnolting deleted the wb_timeout_bugfix branch December 3, 2021 05:05
@emb4fun
Copy link
Collaborator

emb4fun commented Dec 3, 2021

I had yesterday some problems with running code out of the SDRAM, TIMEOUT_ERR.
After pointing out the problem with the MEM_EXT_TIMEOUT and the latest fix it
is working now.

Before the fix it was not working even with a timeout value of 8191. Now it works
with a timeout of 255. The maximum length of the Avalon waitrequest is 1.68us here.
And with the CPU frequency of 100MHz the timeout of 255 is enough. It looks that
the NEORV32 is more stable than before.

@stnolting
Copy link
Owner Author

Great to hear! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants