diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-26 22:05:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 22:05:46 -0400 |
commit | 7abc8926670c1701db8011cacc9c5e2e2ca95be8 (patch) | |
tree | fd3263d2754d662fdad6d69851f14a84f44db4d1 /inc/controller.h | |
parent | 9eeea1ab8bf4eb17e5da46d57a6c1d455a0a262e (diff) | |
parent | 8d37d15ebd1221e3b1698abb3b051d9d0c044c93 (diff) |
Merge pull request #36 from bdunahu/bdunahu
Add fetch stage implementation, tests, program loading, DTO object
Base classes plus base tests for Instruction Fetch stage with a default program
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 */ |