From 8e56373a5436852fe9c7934e03d7b57493625003 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 30 Mar 2025 00:28:55 -0400 Subject: Minor simplification to API between pipeline components --- src/sim/controller.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/sim/controller.cc') 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 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; } -- cgit v1.2.3