summaryrefslogtreecommitdiff
path: root/src/storage/storage.cc
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-03-11 11:28:25 -0400
committerGitHub <noreply@github.com>2025-03-11 11:28:25 -0400
commit33c7c78b1c65c375d0291fd435e02ddc9d35681b (patch)
tree25646d98b4bfcf4b9a664eabfc2651c481984c1d /src/storage/storage.cc
parent66edce63597093cf5f3afa5b577fd9e3ecae0ef6 (diff)
parent202f9a05d449ddc1160584c4e8a87f397f248e94 (diff)
Merge pull request #23 from bdunahu/bdunahu
Memory simulator CLI function implementation
Diffstat (limited to 'src/storage/storage.cc')
-rw-r--r--src/storage/storage.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/storage/storage.cc b/src/storage/storage.cc
index 61531d1..8e2e461 100644
--- a/src/storage/storage.cc
+++ b/src/storage/storage.cc
@@ -3,7 +3,7 @@
#include <algorithm>
std::vector<std::array<signed int, LINE_SIZE>>
-Storage::view(int base, int lines)
+Storage::view(int base, int lines) const
{
base = (base / LINE_SIZE) * LINE_SIZE;
std::vector<std::array<signed int, LINE_SIZE>> ret(lines + 1);
@@ -13,8 +13,12 @@ Storage::view(int base, int lines)
return ret;
}
+Storage *Storage::get_lower() { return this->lower; }
+
void Storage::resolve()
{
+ if (this->lower)
+ this->lower->resolve();
if (this->wait_time == 0) {
this->requester = IDLE;
this->wait_time = delay;