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 byte calculation in axi_sim_mem R and W forks #331

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

LucaZulberti
Copy link
Contributor

Hi all!

I found this bug when accessing the simulation RAM with ax.size = 0 and 32-bit data bus.
During an increment access to the memory, when r_cnt % strb_width != 0, the address of the location accessed (addr) is calculated with ax_queue[0].addr (e.g. 2nd beat of an INCR burst at location 0x10 has an address of 0x11), but then addr is used to determine the byte in the 32-bit word, causing it to make the offset with 0x11 instead of 0x10.
In particular, for r_cnt = 1, the byte calculated was 2 instead of 1.

@LucaZulberti LucaZulberti changed the title Fix byte calculation in R and W forks Fix byte calculation in axi_sim_mem R and W forks Feb 6, 2024
Copy link
Member

@micprog micprog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@thommythomaso thommythomaso merged commit eb1fe63 into pulp-platform:master Mar 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants