From cb81b76f72ff5ce8176d28b1c19967907d272f10 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Wed, 10 Apr 2024 20:37:08 -0400 Subject: [PATCH] was it the vars? --- cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.c b/cache.c index c8877fa..fa725be 100644 --- a/cache.c +++ b/cache.c @@ -74,12 +74,12 @@ int cread(unsigned int cmf, unsigned int* hex_addr, bool* hit, bool* replace) { if (cache[line]->tag == tag) { // hit - *hit = true; + *replace = true; cache[line]->hit_count++; ret_val = cache[line]->block[block_offset]; } else { // miss - *replace = true; + *hit = true; cache[line]->tag = tag; cache[line]->hit_count = 1;