-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpPHistory.h
60 lines (43 loc) · 1.38 KB
/
pPHistory.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
#ifndef PPHISTORY_H
#define PPHISTORY_H
// @brown9804 Belinda Brown
// September, 2020
///////////////////////////////
// Jump Predictor
// --> Private History
//////////////////////////////
#include "includes.h"
/////////////////////////////
// Two bits counter
// Has four types of posible values:
// * Strongly taken - 11 = 3
// * Weakly taken - 10 = 2
// * Weakly not taken - 01 = 1
// * Strongly not taken - 00 = 0
// Table counter & all couter init in Strongly not taken
// Considering the mention in the bimodal predictor:
// Two bit table
// MSB LSB
// X X
// bit address/prediction - Prediction/Conviction
// [taken/untaken] - How sure?
// branch-trace-gcc.trace.gz | branch -s < # > -bp < # > -gh < # > -ph < # >
// file_name: Compress file entry
// s: Branch History Table (BHT) size
// gh: GShare size (given value)
// ph: PShare size (given value)
// This one follows the same logic but it consider all the history of each branch
// so the output is a table.
class privateHistory_F {
public:
// VAR
std::string filepath;
int s;
int gh;
int ph;
int ph_mask;
privateHistory_F(std::string filepath, int s, int gh, int ph);
void begin_prediction_P();
};
#endif