diff options
author | bd <bdunahu@operationnull.com> | 2025-04-16 15:06:04 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-16 15:06:04 -0400 |
commit | 0041cc424b5711559302bd77a534922a9dbca8ae (patch) | |
tree | 86336777ef72cedf7a0185c36501979b2eaff848 /inc/cache.h | |
parent | 7a94defa477d5dd0a5f7c77a7c64d46aa4266e6a (diff) |
Use signed integers for cache eviction
Diffstat (limited to 'inc/cache.h')
-rw-r--r-- | inc/cache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/cache.h b/inc/cache.h index 4b2521a..8075d1a 100644 --- a/inc/cache.h +++ b/inc/cache.h @@ -64,7 +64,7 @@ nn * Constructor. * @return -1 if the tag is not present in this set of ways (not in cache), or the true index if * the tag is present. */ - unsigned int is_address_missing(unsigned int true_index, unsigned int tag); + int is_address_missing(int true_index, int tag); /** * Converts an index into a set of ways into an index into `this->data', which is a * 1D array. The next `this->ways' entries after the returned index represent the ways in the @@ -72,14 +72,14 @@ nn * Constructor. * @param an index to a set of ways * @param an index aligned to the set of ways in `this->data' */ - unsigned int get_true_index(unsigned int index); + int get_true_index(int index); /** * Selects an index into the `data' and `meta' tables for write back using a random replacement * policy. * @param an index aligned to the set of ways in `this->data' * @return an index aligned to the data line selected for eviction */ - unsigned int get_replacement_index(unsigned int index); + int get_replacement_index(int index); /** * The number of bits required to specify a line in this level of cache. */ |