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

more fine-grained memorymap #15

Closed
anuejn opened this issue May 14, 2020 · 2 comments
Closed

more fine-grained memorymap #15

anuejn opened this issue May 14, 2020 · 2 comments
Labels

Comments

@anuejn
Copy link

anuejn commented May 14, 2020

Hey,
if I understand the intended use of Memorymap correctly, it should hold all information that is needed to write software for the SoC one is generating.
This works already quite well for me if I only have one "logical register" at one address. However, if I want to have registers which are smaller than 8 bits, and want to have them packed (e.g. when emulating the memory map of an existing peripheral to reuse driver code) I wasn't able to come up with a solution that expresses that using the current Memorymap class in a clean way.

@whitequark
Copy link
Member

There isn't such a solution. There is an inherent tradeoff between expressibility and complexity in something like the MemoryMap, and no matter how much complexity will go into it, there will always be patterns that are not possible to express. Use a single logical register and work around this in your code.

@anuejn
Copy link
Author

anuejn commented May 14, 2020

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants