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 --- inc/controller.h | 2 +- inc/ex.h | 2 +- inc/id.h | 2 +- inc/if.h | 2 +- inc/mm.h | 2 +- inc/stage.h | 2 +- inc/wb.h | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/controller.h b/inc/controller.h index ac83a78..1c7b2d6 100644 --- a/inc/controller.h +++ b/inc/controller.h @@ -36,7 +36,7 @@ class Controller : public Stage * @return the pc. */ int get_pc(); - Response advance(InstrDTO &i, Response p) override; + InstrDTO *advance(Response p) override; }; #endif /* CONTROLLER_H_INCLUDED */ diff --git a/inc/ex.h b/inc/ex.h index e67980d..2ca8876 100644 --- a/inc/ex.h +++ b/inc/ex.h @@ -14,7 +14,7 @@ class EX : public Stage */ EX(Stage *next); - Response advance(InstrDTO &next_instr, Response p) override; + InstrDTO *advance(Response p) override; }; #endif /* EX_H_INCLUDED */ diff --git a/inc/id.h b/inc/id.h index 49637ce..c5c1f1d 100644 --- a/inc/id.h +++ b/inc/id.h @@ -15,7 +15,7 @@ class ID : public Stage */ ID(Stage *next); - Response advance(InstrDTO &next_instr, Response p) override; + InstrDTO *advance(Response p) override; /* The following methods are made public so that they may be tested, and are * not to be called from outside classes during standard execution. diff --git a/inc/if.h b/inc/if.h index 3fafe53..d58b06a 100644 --- a/inc/if.h +++ b/inc/if.h @@ -15,7 +15,7 @@ class IF : public Stage */ IF(Stage *next); - Response advance(InstrDTO &next_instr, Response p) override; + InstrDTO *advance(Response p) override; private: /** diff --git a/inc/mm.h b/inc/mm.h index 0d2ce82..6081802 100644 --- a/inc/mm.h +++ b/inc/mm.h @@ -14,7 +14,7 @@ class MM : public Stage */ MM(Stage *next); - Response advance(InstrDTO &next_instr, Response p) override; + InstrDTO *advance(Response p) override; }; #endif /* MM_H_INCLUDED */ diff --git a/inc/stage.h b/inc/stage.h index b68293b..50c413a 100644 --- a/inc/stage.h +++ b/inc/stage.h @@ -27,7 +27,7 @@ class Stage * @return a response, indicating whether this pipeline stage is stalling, * busy, or done. */ - virtual Response advance(InstrDTO &next_instr, Response p) = 0; + virtual InstrDTO *advance(Response p) = 0; protected: /** diff --git a/inc/wb.h b/inc/wb.h index 9a708a6..7c796ab 100644 --- a/inc/wb.h +++ b/inc/wb.h @@ -1,8 +1,8 @@ #ifndef WB_H #define WB_H +#include "instrDTO.h" #include "response.h" #include "stage.h" -#include "instrDTO.h" class WB : public Stage { @@ -14,7 +14,7 @@ class WB : public Stage */ WB(Stage *next); - Response advance(InstrDTO &next_instr, Response p) override; + InstrDTO *advance(Response p) override; }; #endif /* WB_H_INCLUDED */ -- cgit v1.2.3