diff options
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 */ |