summaryrefslogtreecommitdiff
path: root/src/sim/stage.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-31 23:49:13 -0400
committerbd <bdunahu@operationnull.com>2025-03-31 23:49:13 -0400
commit2235e18ad81be4ed7097cd9cab93e35a990ec327 (patch)
tree08f0db7cdc05fc2447f90da2cb7bde92590ba0cb /src/sim/stage.cc
parent723d582d1108975caf071a76c1556a01fb0553d1 (diff)
Partial commit before merge
Diffstat (limited to 'src/sim/stage.cc')
-rw-r--r--src/sim/stage.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/stage.cc b/src/sim/stage.cc
index 5b81e4c..11eb822 100644
--- a/src/sim/stage.cc
+++ b/src/sim/stage.cc
@@ -34,8 +34,9 @@ InstrDTO *Stage::advance(Response p)
InstrDTO *r = nullptr;
Response n;
- this->advance_helper();
- if (this->curr_instr != nullptr && p == OK) {
+ if (this->curr_instr && this->status != OK)
+ this->advance_helper();
+ if (this->curr_instr && p == OK) {
// mutual consent
this->curr_instr->set_time_of(this->id, this->clock_cycle);
r = new InstrDTO(*this->curr_instr);