diff options
author | bd <bdunahu@operationnull.com> | 2025-04-17 20:52:55 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-17 20:52:55 -0400 |
commit | 496a08fbfafb8399c9addaf2501262fee228ffd6 (patch) | |
tree | 3e87aed03b50673c8e8c53dba98a45f32f979f48 /src/sim/if.cc | |
parent | 025cdd8e174fcf1a229355ecaf63861ac388fa63 (diff) | |
parent | 984ce6eef2e439955ff991f90c2b654be7c6c3f3 (diff) |
Merge remote-tracking branch 'origin/bdunahu' into dev-sid
Diffstat (limited to 'src/sim/if.cc')
-rw-r--r-- | src/sim/if.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sim/if.cc b/src/sim/if.cc index 1223149..bab2608 100644 --- a/src/sim/if.cc +++ b/src/sim/if.cc @@ -37,13 +37,14 @@ void IF::advance_helper() int i; signed int bits; - if (this->curr_instr == nullptr) { + if (this->curr_instr == nullptr && (this->is_pipelined || this->is_empty)) { 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); this->curr_instr->set_pc(this->pc); + this->is_empty = false; } } } |