-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathID.h
67 lines (65 loc) · 1.17 KB
/
ID.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef ID_H
#define ID_H
#include "regsblock.h"
#include <stack>
#include <bitset>
#include <string>
class ID
{
public:
ID(int, int, int, int*, int**, stack <int>&, int, int, int, int);
void setRt();
int getRt();
int getRd();
int getRs();
int getSE();
int getControls();
int getRD1();
int getRD2();
int getPCsrc();
int getAddress();
int get_regwrite();
int getMTR();
bool getFlush();
bool getStall1();
bool getStall2();
void checkBranch();
void update();
void checkJump();
void setRd();
void setRs();
void setPCplus1(int);
void readBoth();
void se();
void checkStall();
void checkPrediction();
//void writeregister(int regDst, int writedata);
//int checkType(int&);
void setControls();
private:
int rd1, rd2;
int rs, rd, rt;
int signextension;
int controls;
int pcplus1;
int pcsrc;
int branch;
int address;
int store;
int IDEXmemread;
int IDEXrt;
int EXMEMmemread;
int EXMEMrt;
int regwrite;
bool jump;
//int storeback;
bool flush;
bool stall1;
bool stall2;
bool Nequal; // to check of RD1 != RD2
unsigned int instruction;
int* regs;
int **branchAddr;
stack <int> S;
};
#endif