From b5cfa7ef9b83271278da11cf229524324c0b57d0 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 22 Jan 2023 14:26:47 -0800 Subject: Ignore redundant fill responses in inline_cache. --- memory/cache.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/memory/cache.h b/memory/cache.h index 8554910..c7fb602 100644 --- a/memory/cache.h +++ b/memory/cache.h @@ -32,7 +32,7 @@ namespace memory { for (unsigned int i = 0; i < WAYS; ++i) { auto &stag = stags[i]; if (stag.serial && stag.line_address == r.line_address) { - handle_response(r, stag, sdata[i]); + handle_response(r, stag); return; } } @@ -48,10 +48,14 @@ namespace memory { handle_response(r, stags[victim], sdata[victim]); } - void handle_response(const dram::response &r, tag &t, line &d) { + void handle_response(const dram::response &r, tag &t) { t.serial = ++last_serial; - t.line_address = r.line_address; t.transaction = r.transaction; + } + + void handle_response(const dram::response &r, tag &t, line &d) { + handle_response(r, t); + t.line_address = r.line_address; d = r.data; } -- cgit v1.2.3