-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocessor.hpp
executable file
·49 lines (42 loc) · 1.16 KB
/
processor.hpp
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
// ============================================================================
// ============================================================================
class processor_t {
private:
public:
// ====================================================================
/// Methods
// ====================================================================
processor_t();
void allocate();
void clock();
void statistics();
// BTB attribute
btb_t *btb;
// btb_t *btb2Bit;
//BTB Methods
void updateLruAll(uint32_t add);
void replaceBTB(uint32_t address);
uint32_t searchLine(uint32_t pc);
uint32_t installLine(opcode_package_t instruction);
inline uint32_t searchLru(btb_t *btb);
// Statistics values
int32_t btbHits;
int32_t btbMiss;
int32_t branchTaken;
int32_t branchNotTaken;
int32_t branches;
int32_t BtMiss;
int32_t BntMiss;
//others
int32_t index;
int32_t assoc;
int32_t has_branch;
uint32_t nextInstruction;
//plbt
int32_t predict;
int32_t oldAdd;
//Methods to interact with cache
uint32_t statusCache;
void searchCache(uint64_t address);
void writeCache(uint64_t address);
};