-
Notifications
You must be signed in to change notification settings - Fork 411
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
Bug in 4K boundary crossing detection in DMA modules #12
Comments
Not sure what the issue is. If max burst size is larger than 4096, then the only thing that can split a burst is a 4kb address boundary. If I remove that check, then the only line in the lower block that gets hit would be when a 4kb boundary is crossed, and this is handled by the top block in exactly the same way so doing a separate check based on the burst length is not necessary. |
Think about it like this: this code is splitting the requested transfer into valid bursts. The burst must end either 1. when the configured max burst size is met, 2. when a 4 kb address boundary is reached, or 3. at the end of the transfer. The max burst size is checked first ( If I remove |
Alright, it looks like my 'optimized' check for 4k boundary crossings is problematic. I will rework that. |
Try replacing
with
and let me know what happens. |
I just committed those changes to the repo, try it out and see if that bug is fixed. |
Good to hear! |
In axi_dma_rd.v and axi_dma_wr.v
Take axi_dma_rd.v as an example:
Line 342, if setting
AXI_MAX_BURST_SIZE = 4096
, which is the maximum number defined in AXI4 spec, line 342 always returns "true", and then no matter what the remaining length is, the packet is treated as "smaller than max burst size". That means the last burst beat with possible invalid bytes masked by strobe (for write) or ignored (for read).This issue can be fixed by changing ">=" to ">" or completely removing the expression of
|| AXI_MAX_BURST_SIZE >= 4096
.The text was updated successfully, but these errors were encountered: