summaryrefslogtreecommitdiff
path: root/src/sim/if.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/if.cc')
-rw-r--r--src/sim/if.cc4
1 files changed, 3 insertions, 1 deletions
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);