From 1f3cf180558ef7cda801e379fb8a7340e126807c Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Mon, 2 Mar 2020 13:26:47 -0500 Subject: [PATCH] Update how M is calculated Project description seems to imply it's unconditionally 64? --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 80a6693..778db82 100644 --- a/main.py +++ b/main.py @@ -43,7 +43,8 @@ def main(set_identifier_bit_count, line_count, block_identifier_bit_count, file_ b = block_identifier_bit_count B = block_size = int(math.pow(2, b)) m = address_identifier_bit_count = E * S - M = total_bytes = int(math.pow(2, m)) + # M = total_bytes = int(math.pow(2, m)) + M = int(math.pow(2, 64)) C = capacity = S * E * B tag_identifier_bit_count = m - (b + s) @@ -107,7 +108,7 @@ def handle_line(cache, line, M, B, S, hits, misses, evictions): # Check if instruction load. If so, we can skip line. if split_line[0] == 'I': # Found instruction load. Returning. - return (hits, misses, evictions) + return (cache, hits, misses, evictions) else: line = line.strip() conflict_miss = -1 -- GitLab