diff options
author | bd <bdunahu@operationnull.com> | 2025-03-22 14:19:10 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-22 14:19:10 -0400 |
commit | 2416cce2eec7ecdf0587896620806c465747eada (patch) | |
tree | abcff26473cc45b23a7b9bd501f2974050479efa /inc/stage.h | |
parent | b73f7fbe952494e245c44fdd4b6123bac1b4ec97 (diff) |
Add controller.h, implementation and tests.
Diffstat (limited to 'inc/stage.h')
-rw-r--r-- | inc/stage.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/inc/stage.h b/inc/stage.h new file mode 100644 index 0000000..769818c --- /dev/null +++ b/inc/stage.h @@ -0,0 +1,35 @@ +#ifndef STAGE_H +#define STAGE_H +#include "definitions.h" +#include "storage.h" +#include <array> + +class Stage +{ + public: + virtual ~Stage() = default; + + protected: + /** + * The shared pool of general-purpose integer registers. + */ + static std::array<int, GPR_NUM> gprs; + /** + * The address of the currently executing instruction. + */ + static int pc; + /** + * A pointer to the next stage in the pipeline. + */ + Stage *next; + /** + * A pointer to the top-level storage device. + */ + static Storage *storage; + /** + * A flag indicating whether pipelining should be used. + */ + bool is_pipelined; +}; + +#endif /* STAGE_H_INCLUDED */ |