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

🧪 Add processor data cache #560

Merged
merged 15 commits into from
Mar 28, 2023
Merged

🧪 Add processor data cache #560

merged 15 commits into from
Mar 28, 2023

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Mar 25, 2023

This PR adds a data cache to the processor - finally 😅

Right now, it provides external generics to configure the number of blocks and the actual block size. The cache is direct-mapped and uses the "write-through" strategy for memory-cache synchronization. Accesses to addresses 0xF0000000 .. 0xFFFFFFFF are always uncached (for memory-mapped IO).

  • a MISSED cache read access will fetch the according memory block from main memory
  • a HIT cache read access will return data from the cache
  • a MISSED cache write access will directly write to main memory (requires 1 additional cycle)
  • a HIT cache write access will write to the cache and also to main memory (requires 1 additional cycle)
  • an uncached accesses requires 1 additional cycle

The cache is operational but still quite experimental. Feedback is highly welcome 😉

@stnolting stnolting added enhancement New feature or request HW hardware-related experimental Experimental feature optimization Make things faster, smaller and more efficient labels Mar 25, 2023
@stnolting stnolting self-assigned this Mar 25, 2023
@stnolting stnolting marked this pull request as ready for review March 25, 2023 14:29
@stnolting stnolting marked this pull request as draft March 27, 2023 20:00
@stnolting stnolting marked this pull request as ready for review March 28, 2023 19:11
@stnolting stnolting merged commit adf4d6c into main Mar 28, 2023
@stnolting stnolting deleted the dcache branch March 28, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Experimental feature HW hardware-related optimization Make things faster, smaller and more efficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant