From df580c5352528a4837b996a838f486d3838050a4 Mon Sep 17 00:00:00 2001 From: bd Date: Fri, 11 Apr 2025 23:09:49 -0400 Subject: Move storage to a separate git repository. --- src/sim/if.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sim/if.cc') diff --git a/src/sim/if.cc b/src/sim/if.cc index 85fb27f..4ab7f3e 100644 --- a/src/sim/if.cc +++ b/src/sim/if.cc @@ -26,10 +26,12 @@ InstrDTO *IF::advance(Response p) void IF::advance_helper() { Response r; + int i; signed int bits; if (this->curr_instr == nullptr) { - r = this->storage->read_word(this->id, this->pc, bits); + i = this->storage->read_word(this, this->pc, bits); + r = i ? OK : STALLED; if (r == OK) { this->curr_instr = new InstrDTO(); this->curr_instr->set_instr_bits(bits); -- cgit v1.2.3