diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-11 11:28:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 11:28:25 -0400 |
commit | e24e3cd4d296599b9ef1b705846b1c868148b0fd (patch) | |
tree | 25646d98b4bfcf4b9a664eabfc2651c481984c1d /src/storage/storage.cc | |
parent | 357e7fb37caf58cdfcdf85f7553db9378ff16e0c (diff) | |
parent | fde996690d77b81e445450671a0723f837de4eb3 (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.cc | 6 |
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; |