This repository was archived by the owner on Jul 9, 2022. It is now read-only.
Open
Conversation
* cache-entry struct * default values (cache size, associativity, ...)
information (and some more for better runtime performance) This is way cleaner than declaring all necessary variables for every cache and allows us to write more general algorithms.
Also started preparations for LRU replacement strategy
cache misses the number of sets in the cache was reset
instead This way the function is more general so that it can also be used for cache writes.
into caches; use paddr instead of vaddr in fill_cache_block()
Since this field was always used indicating the size of a set, the name was adapted accordingly.
* only flush blocks that were actually valid
* reset dirty flag after flushing
* flush to the correct paddr
We do not allocate less memory in the cache block struct, because we forgot to allocate more memory when we introduced the dirty flag.
Since do_sd() is used to emulate a SD instruction, it should produce only one memory access and thus at most one cash hit. load_virtual_memory() could result in a hit, or a miss, but store_virtual_memory() would definitely result in a cache hit. This increases the number of potential cache hits to two, which is not the intended behavior.
…f for example '-m'
the cache is turned on
, since the cache is always in a flushed state during the system calls.
load/store_virtual_memory() The L1-cache is now only accessed in the emulation of instruction fetches, loads, and stores.
cache-profiler reset function
"data-cache" when printing cache statistic This also fixes the alignment in the output.
…cache() and store_in_cache() respectively
declaration of get_new_timestamp()
the common code into handle_cache_miss() As a side-effect the function signatures of cache_lookup() and handle_cache_miss() have been changed by passing the paddr instead of the tag.
3ff93bb to
2e311c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.