diff options
author | bd <bdunahu@operationnull.com> | 2025-04-28 18:24:49 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-28 18:24:49 -0400 |
commit | 930ec733e988c4996918065b4656f0508c6e2df6 (patch) | |
tree | cb12daab120a8298d5e78219602fded822bdd671 /src | |
parent | 9e7debd7bff14893f2722c37f42d9c6b70fbdcbf (diff) |
Fix bug with pipeline blockage, swap DRAM delay to 100
Diffstat (limited to 'src')
-rw-r--r-- | src/controller.cc | 2 | ||||
-rw-r--r-- | src/stage.cc | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/controller.cc b/src/controller.cc index a5c6691..e439b30 100644 --- a/src/controller.cc +++ b/src/controller.cc @@ -35,7 +35,7 @@ Controller::Controller(Stage *stage, Storage *storage, bool is_pipelined) this->gprs.at(2) = MEM_WORDS; // set the stack pointer } -void Controller::run_for(int number) +void Controller::run_for(long number) { int i; for (i = 0; i < number; ++i) { diff --git a/src/stage.cc b/src/stage.cc index ac688d8..4eab7d3 100644 --- a/src/stage.cc +++ b/src/stage.cc @@ -59,10 +59,15 @@ InstrDTO *Stage::advance(Response p) this->status = READY; } - n = (p != READY || this->status != READY) ? STALLED : READY; + if (!this->curr_instr) + n = READY; + else + n = (p != READY || this->status != READY) ? STALLED : READY; + s = this->next->advance(n); - if (s) + if (s) { this->curr_instr = s; + } return r; } |