From d7437f27a1fa1610b06262ec89b3b9ea2932e1f6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 5 Dec 2021 12:41:56 +0000 Subject: [PATCH] using same tag/row functions as in dcache.py --- src/soc/experiment/icache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/experiment/icache.py b/src/soc/experiment/icache.py index a4a6fac5..5936cbe9 100644 --- a/src/soc/experiment/icache.py +++ b/src/soc/experiment/icache.py @@ -227,7 +227,7 @@ def get_row(addr): # Return the index of a row within a line def get_row_of_line(row): - return row[:ROW_LINE_BITS] + return row[:ROW_BITS][:ROW_LINE_BITS] # Returns whether this is the last row of a line def is_last_row_addr(addr, last): @@ -256,7 +256,7 @@ def get_tag(addr): # Read a tag from a tag memory row def read_tag(way, tagset): - return tagset.word_select(way, TAG_BITS) + return tagset.word_select(way, TAG_WIDTH)[:TAG_BITS] # Write a tag to tag memory row def write_tag(way, tagset, tag): -- 2.30.2