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

This seems very very wrong #2

Open
duaneellissd opened this issue Mar 27, 2023 · 1 comment
Open

This seems very very wrong #2

duaneellissd opened this issue Mar 27, 2023 · 1 comment

Comments

@duaneellissd
Copy link

https://github.com/Mi-V-Soft-RISC-V/miv-rv32-bare-metal-examples/blob/main/driver-examples/miv-plic/miv-rv32-plic/src/platform/drivers/fpga_ip/miv_plic/miv_plic.h#L303

Specificlally this loop will write at offset +0 for a 32bit value.
Then when INC=1, it will write at offset +1 for a 32bit value

But this is no aligned so you get an alignement fault.
So how does this work? Confused..

Also - why is this code calculating an address
But other places have/use a structure that overlays the MIV_PLIC?

@duaneellissd
Copy link
Author

Also - why does the loop use (N + 32) / 32 - should this not use (N+31)/32 instead?

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

No branches or pull requests

1 participant