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

Parameterize memory block sizes and modularize specific memory code #65

Open
jardhu opened this issue Jun 12, 2019 · 0 comments
Open

Parameterize memory block sizes and modularize specific memory code #65

jardhu opened this issue Jun 12, 2019 · 0 comments
Assignees

Comments

@jardhu
Copy link
Collaborator

jardhu commented Jun 12, 2019

The memory is currently hardcoded to handle 32-bit block sizes. This is sufficient for our current purposes, but for involved implementations like caches which usually use 64-bit blocks we must be able to support arbitrary block sizes.

This will be best done with a blocksize parameter included in the CPU's configuration. This will be passed along with the latency into the backing memory and instruction/data memory ports' constructors, which initialize the inner wiring with the appropriate bit widths. I attempted to do this in one single side commit but there were clearly some aspects of the memory that required a more directed, thoughtful approach to parameterization.

We should also split the memory mask mode and sign-extension code into a function
and generalize the logic for any block size. At this moment the synchronous and async memory both use the same copy-pasted masking and sign-extension logic, and both instances are hardcoded to 32 bit block widths. Splitting this into its own function would make debugging and maintenance much easier for us.

@powerjg powerjg mentioned this issue Jun 12, 2019
9 tasks
@jardhu jardhu self-assigned this Jun 13, 2019
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