summaryrefslogtreecommitdiff
path: root/src/sim/stage.cc
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-03-30 22:35:06 -0400
committerGitHub <noreply@github.com>2025-03-30 22:35:06 -0400
commit44cb9d396b909c84ef7ad3338e0a12cfcc082748 (patch)
treeb080d1ad4989ab5f5848d9571b01c0fc505b136a /src/sim/stage.cc
parent52e1ca72925444b8e5a9bb5b240a4063a4d7b958 (diff)
parent723d582d1108975caf071a76c1556a01fb0553d1 (diff)
Merge pull request #43 from bdunahu/bdunahu
Sanity check for pipeline up to exe
Diffstat (limited to 'src/sim/stage.cc')
-rw-r--r--src/sim/stage.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/stage.cc b/src/sim/stage.cc
index 2c03741..5b81e4c 100644
--- a/src/sim/stage.cc
+++ b/src/sim/stage.cc
@@ -7,7 +7,7 @@ Stage::Stage(Stage *next)
{
this->next = next;
this->curr_instr = nullptr;
- this->status = STALLED;
+ this->status = OK;
this->checked_out = {};
}
@@ -35,7 +35,7 @@ InstrDTO *Stage::advance(Response p)
Response n;
this->advance_helper();
- if (this->status == OK && p == OK) {
+ if (this->curr_instr != nullptr && p == OK) {
// mutual consent
this->curr_instr->set_time_of(this->id, this->clock_cycle);
r = new InstrDTO(*this->curr_instr);