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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Make sure IMEM/DMEM sizes are a power of two #658

Merged
merged 5 commits into from
Jul 27, 2023
Merged

Conversation

stnolting
Copy link
Owner

The address logic of the internal memories as well as the central address decoding of the bus system cannot cope with address space sizes, which are not a power of two. This is especially true for the internal IMEM and DMEM memories. This PR fixes this problem by ensuring that the configured memory sizes are always a power of two:

If the configured memory size (via the MEM_INT_IMEM_SIZE / MEM_INT_DMEM_SIZE generic) is not a power of two the actual memory size will be auto-adjusted to the next power of two (e.g. configuring a memory size of 60kB will result in a physical memory size of 64kB).

馃憤 Identified by GitHub user @cmenendezzz in #642.

馃悰 This is not a real bug, but something that can cause problems.

@stnolting stnolting added bug Something isn't working HW hardware-related labels Jul 27, 2023
@stnolting stnolting self-assigned this Jul 27, 2023
@stnolting stnolting marked this pull request as ready for review July 27, 2023 13:14
@stnolting stnolting merged commit 2e99380 into main Jul 27, 2023
8 checks passed
@stnolting stnolting deleted the mem_size_fix branch July 27, 2023 14:43
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

1 participant