summaryrefslogtreecommitdiff
path: root/src/storage/dram.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-09 23:49:29 -0400
committerbd <bdunahu@operationnull.com>2025-03-09 23:49:29 -0400
commit2669ab2cfccd9b0b3954e6a68af3de67bd951938 (patch)
treeb5a53b6e85f59392267a8a26e631c00445c30e94 /src/storage/dram.cc
parent95d90e454beca2e467613d0c0fbb035b02eada23 (diff)
Properly set cache metadata when a value is loaded
Diffstat (limited to 'src/storage/dram.cc')
-rw-r--r--src/storage/dram.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/storage/dram.cc b/src/storage/dram.cc
index 9dab4ed..441f10b 100644
--- a/src/storage/dram.cc
+++ b/src/storage/dram.cc
@@ -57,13 +57,16 @@ Response Dram::read(
Accessor accessor, int address, std::array<signed int, LINE_SIZE> &data)
{
Response r = WAIT;
+
if (this->requester == IDLE)
this->requester = accessor;
+
if (this->requester == accessor) {
if (this->wait_time == 0) {
this->do_read(data, address);
r = OK;
}
}
+
return r;
}