diff options
author | bd <bdunahu@operationnull.com> | 2025-03-09 18:28:08 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-09 18:28:08 -0400 |
commit | 6bfae0ef7c7583cfd8a9771332db74ee6eb77a68 (patch) | |
tree | f79d3f7c3edde913dadb739fe3d88ffba5e76641 /src/storage/storage.cc | |
parent | 56c92e4785fa6952e390fd249cd654f0e5b2d83e (diff) |
Move do_write to dram.h, is_blocked flag
Diffstat (limited to 'src/storage/storage.cc')
-rw-r--r-- | src/storage/storage.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/storage/storage.cc b/src/storage/storage.cc index e3067a2..f382b3e 100644 --- a/src/storage/storage.cc +++ b/src/storage/storage.cc @@ -13,20 +13,12 @@ Storage::view(int base, int lines) return ret; } -void Storage::do_write(signed data, int address) -{ - int line = address / LINE_SIZE; - int word = address % LINE_SIZE; - - this->data->at(line).at(word) = data; -} - void Storage::resolve() { if (this->wait_time == 0) { this->requester = IDLE; this->wait_time = delay; - } else if (this->requester != IDLE) { + } else if (this->requester != IDLE && !this->is_blocked) { --this->wait_time; } } |