diff options
author | bd <bdunahu@operationnull.com> | 2025-03-30 00:28:55 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-30 00:28:55 -0400 |
commit | 8e56373a5436852fe9c7934e03d7b57493625003 (patch) | |
tree | fd61e2ed0419fea1d531c39d95df1986cd1c8bb5 /src/sim/controller.cc | |
parent | df747f79abecc53e7ff696e020caf856746bad0d (diff) |
Minor simplification to API between pipeline components
Diffstat (limited to 'src/sim/controller.cc')
-rw-r--r-- | src/sim/controller.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sim/controller.cc b/src/sim/controller.cc index 17937eb..622f1dc 100644 --- a/src/sim/controller.cc +++ b/src/sim/controller.cc @@ -16,10 +16,9 @@ Controller::Controller(Stage *stage, Storage *storage, bool is_pipelined) void Controller::run_for(int number) { - InstrDTO instr; int i; for (i = 0; i < number; ++i) { - this->advance(instr, OK); + this->advance(OK); } } @@ -29,11 +28,11 @@ std::array<int, GPR_NUM> Controller::get_gprs() { return this->gprs; } int Controller::get_pc() { return this->pc; } -Response Controller::advance(InstrDTO &next_instr, Response p) +InstrDTO *Controller::advance(Response p) { - Response r; + InstrDTO *r; - r = this->next->advance(next_instr, p); + r = this->next->advance(p); ++this->clock_cycle; return r; } |