diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-10 10:28:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-10 10:28:28 -0400 |
commit | 66edce63597093cf5f3afa5b577fd9e3ecae0ef6 (patch) | |
tree | a0b0df4fff6f7d680901cd6007df67b15b3df3b6 /src/utils/utils.cc | |
parent | 92b41d1a8b970c46b0c6d2d8d538c68855a4de25 (diff) | |
parent | 1f8b8babcfb383f1fb0281663561161061684206 (diff) |
Merge pull request #19 from bdunahu/bdunahu
cache store, handle load requests to memory, write allocate policy
-- changes look good
Diffstat (limited to 'src/utils/utils.cc')
-rw-r--r-- | src/utils/utils.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/utils.cc b/src/utils/utils.cc index b4bdb2f..dfeb2b3 100644 --- a/src/utils/utils.cc +++ b/src/utils/utils.cc @@ -1,11 +1,11 @@ -#include "definitions.h" #include "utils.h" +#include "definitions.h" void get_bit_fields(int address, int *tag, int *index, int *offset) { *tag = - MID(address, LINE_SPEC + L1_CACHE_SPEC, + GET_MID_BITS(address, LINE_SPEC + L1_CACHE_SPEC, MEM_SPEC + LINE_SPEC + L1_CACHE_SPEC); - *index = MID(address, LINE_SPEC, L1_CACHE_SPEC + LINE_SPEC); - *offset = LAST(address, LINE_SPEC); + *index = GET_MID_BITS(address, LINE_SPEC, L1_CACHE_SPEC + LINE_SPEC); + *offset = GET_LS_BITS(address, LINE_SPEC); } |