summaryrefslogtreecommitdiff
path: root/inc/stage.h
blob: 769818ced1afa51b38040f47f183ef1616f5ed25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 */