summaryrefslogtreecommitdiff
path: root/src/storage/dram.cc
diff options
context:
space:
mode:
authorSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-03-09 11:39:59 -0400
committerSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-03-09 11:39:59 -0400
commitb87f192702f5a02be473c9b05b8b34f1dc7e4296 (patch)
tree48d34db1bf24205d971cc25c63dfe6f5df6e341c /src/storage/dram.cc
parent0c6c9f8074aa5c356e2a1e582ab81355967a2060 (diff)
Implement dram load
Diffstat (limited to 'src/storage/dram.cc')
-rw-r--r--src/storage/dram.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/storage/dram.cc b/src/storage/dram.cc
index 7db5676..43c092d 100644
--- a/src/storage/dram.cc
+++ b/src/storage/dram.cc
@@ -38,4 +38,15 @@ Response Dram::write(Accessor accessor, signed int data, int address)
return r;
}
-Response Dram::read(Accessor accessor, int address) { return WAIT; }
+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;
+ }