-
Notifications
You must be signed in to change notification settings - Fork 0
/
issue.h
72 lines (66 loc) · 2.09 KB
/
issue.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
68
69
70
71
72
#ifndef H_ISSUE
#define H_ISSUE
#include "stage.h"
#define RS_COUNT_INT 4
#define RS_COUNT_LOAD 2
#define RS_COUNT_STORE 2
#define RS_COUNT_FPADD 3
#define RS_COUNT_FPMULT 3
#define RS_COUNT_FPDIV 2
#define RS_COUNT_BU 2
class Issue: public Stage {
private:
deque<Instruction> & dInstructionQueue;
// reservation stations
vector<RSStatus> & rsUnitInt;
vector<RSStatus> & rsUnitLoad;
vector<RSStatus> & rsUnitStore;
vector<RSStatus> & rsUnitFpAdd;
vector<RSStatus> & rsUnitFpMult;
vector<RSStatus> & rsUnitFpDiv;
vector<RSStatus> & rsUnitBu;
deque<ROBStatus> & rob;
const int nw;
const int nr;
const bool debugMode;
bool insertInstructionInReservationStation(
vector<RSStatus> & inpReservationStation,
int inpReservationStationCount,
Instruction inpInstruction
);
RSStatus getReservationStationForInstruction(
Instruction inpInstruction
);
int getReservationStationIndex(
vector<RSStatus> inpRsUnit,
RSStatus inpReseravtionStation
);
ROBStatus & getROBStatusEntryForInstruction(
Instruction inpInstruction
);
int getROBStatusEntryIndex(
deque<ROBStatus> inpRob,
ROBStatus inpEntry
);
vector<RSStatus> & getReservationStationUnitFromInstructionType(InstructionType inpInstrType);
string generateROBStatusEntryName(Instruction inpInstr);
void updateReservationStation(Instruction inpInstr, RSStatus inpRs);
public:
bool dispatch();
Issue(
deque<Instruction> & dInstructionQueue,
vector<RSStatus> & rsUnitInt,
vector<RSStatus> & rsUnitLoad,
vector<RSStatus> & rsUnitStore,
vector<RSStatus> & rsUnitFpAdd,
vector<RSStatus> & rsUnitFpMult,
vector<RSStatus> & rsUnitFpDiv,
vector<RSStatus> & rsUnitBu,
deque<ROBStatus> & rob,
const int nw,
const int nr,
const bool debugMode
);
~Issue();
};
#endif