diff options
author | bd <bdunahu@operationnull.com> | 2025-03-26 12:21:52 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-26 12:21:52 -0400 |
commit | b81c86b438123457be86af2e7c24375856afa742 (patch) | |
tree | 74f271585bce27de2434d8cd826fee09f6a71738 /inc/controller.h | |
parent | 9eeea1ab8bf4eb17e5da46d57a6c1d455a0a262e (diff) |
Add fetch stage implementation, tests, program loading, DTO object
Diffstat (limited to 'inc/controller.h')
-rw-r--r-- | inc/controller.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/inc/controller.h b/inc/controller.h index 56f3836..4b102ce 100644 --- a/inc/controller.h +++ b/inc/controller.h @@ -2,6 +2,7 @@ #define CONTROLLER_H #include "response.h" #include "stage.h" +#include "instrDTO.h" /** * Houses the clock, and acts as the main API to the GUI. @@ -11,11 +12,12 @@ class Controller : public Stage public: /** * Constructor. + * @param The stage(s) to interface with. * @param The storage object to use. * @param Whether or not efficient pipelining will be used. * @return A newly allocated controller object. */ - Controller(Storage *storage, bool is_pipelined); + Controller(Stage *stage, Storage *storage, bool is_pipelined); /** * Direct the simulator to run for `number` clock cycles. @@ -34,13 +36,7 @@ class Controller : public Stage * @return the pc. */ int get_pc(); - Response advance(); - - private: - /** - * The current clock cycle. - */ - int clock_cycle; + Response advance(InstrDTO &i) override; }; #endif /* CONTROLLER_H_INCLUDED */ |