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

Implement memory management unit for allocation and access. #2

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

yezzfusl
Copy link
Owner

@yezzfusl yezzfusl commented Aug 6, 2024

  1. A new memory.rs file that implements the MemoryManagementUnit struct.
  2. The MemoryManagementUnit provides methods for reading and writing both bytes and words (32-bit values) to memory.
  3. The CPU struct now uses the MemoryManagementUnit instead of a raw memory array.
  4. Two new instructions, load and store, have been added to interact with memory.
  5. The fetch method now uses the MMU to read instructions from memory.
  6. Additional tests have been added to verify the correctness of memory operations and the new instructions.

Copy link
Owner Author

@yezzfusl yezzfusl left a comment

Choose a reason for hiding this comment

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

The memory management unit is implemented efficiently. Memory allocation, reading, and writing operations are handled correctly. The code is clean and modular, making it easy to follow.

@yezzfusl yezzfusl merged commit cd857c7 into main Aug 6, 2024
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.

1 participant